Compare commits
16 Commits
0bdaff2282
...
2e7694351b
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e7694351b | |||
|
|
8ccc729ce7 | ||
| be94adda8a | |||
| 4f8489bfdb | |||
| d0e94ed5a7 | |||
| 3f2c2ce65f | |||
| 73dfaec988 | |||
| bf77f1563b | |||
| fd3266912a | |||
| 5238f24acf | |||
| bb5185eac4 | |||
| 2a63e1d8ef | |||
| 9499cc8072 | |||
| 4126124208 | |||
| e1a0c21a6e | |||
| 54db1b62f9 |
@@ -1,6 +1,6 @@
|
|||||||
column_width = 120
|
column_width = 120
|
||||||
line_endings = "Unix"
|
line_endings = "Unix"
|
||||||
indent_type = "Spaces"
|
indent_type = "Spaces"
|
||||||
indent_width = 4
|
indent_width = 2
|
||||||
quote_style = "AutoPreferDouble"
|
quote_style = "AutoPreferDouble"
|
||||||
call_parentheses = "None"
|
call_parentheses = "None"
|
||||||
|
|||||||
24
LICENSE
24
LICENSE
@@ -1,24 +0,0 @@
|
|||||||
This is free and unencumbered software released into the public domain.
|
|
||||||
|
|
||||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
||||||
distribute this software, either in source code form or as a compiled
|
|
||||||
binary, for any purpose, commercial or non-commercial, and by any
|
|
||||||
means.
|
|
||||||
|
|
||||||
In jurisdictions that recognize copyright laws, the author or authors
|
|
||||||
of this software dedicate any and all copyright interest in the
|
|
||||||
software to the public domain. We make this dedication for the benefit
|
|
||||||
of the public at large and to the detriment of our heirs and
|
|
||||||
successors. We intend this dedication to be an overt act of
|
|
||||||
relinquishment in perpetuity of all present and future rights to this
|
|
||||||
software under copyright law.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
For more information, please refer to <https://unlicense.org>
|
|
||||||
13
README.md
13
README.md
@@ -1,13 +0,0 @@
|
|||||||
## Install
|
|
||||||
```
|
|
||||||
git clone https://git.archfox.org/poslop/nvbad ~/.config/nvim && nvim
|
|
||||||
```
|
|
||||||
**This repo is supposed to be used as config by NvChad users!**
|
|
||||||
|
|
||||||
- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo.
|
|
||||||
- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"`
|
|
||||||
- So you can delete the .git from this repo ( when you clone it locally ) or fork it :)
|
|
||||||
|
|
||||||
# Credits
|
|
||||||
|
|
||||||
1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier!
|
|
||||||
38
init.lua
38
init.lua
@@ -1,37 +1 @@
|
|||||||
vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/"
|
require "config.lazy"
|
||||||
vim.g.mapleader = " "
|
|
||||||
|
|
||||||
-- bootstrap lazy and all plugins
|
|
||||||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
|
||||||
|
|
||||||
if not vim.uv.fs_stat(lazypath) then
|
|
||||||
local repo = "https://github.com/folke/lazy.nvim.git"
|
|
||||||
vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath }
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
local lazy_config = require "configs.lazy"
|
|
||||||
|
|
||||||
-- load plugins
|
|
||||||
require("lazy").setup({
|
|
||||||
{
|
|
||||||
"NvChad/NvChad",
|
|
||||||
lazy = false,
|
|
||||||
branch = "v2.5",
|
|
||||||
import = "nvchad.plugins",
|
|
||||||
},
|
|
||||||
|
|
||||||
{ import = "plugins" },
|
|
||||||
}, lazy_config)
|
|
||||||
|
|
||||||
-- load theme
|
|
||||||
dofile(vim.g.base46_cache .. "defaults")
|
|
||||||
dofile(vim.g.base46_cache .. "statusline")
|
|
||||||
|
|
||||||
require "options"
|
|
||||||
require "autocmds"
|
|
||||||
|
|
||||||
vim.schedule(function()
|
|
||||||
require "mappings"
|
|
||||||
end)
|
|
||||||
|
|||||||
9
lsp/lua_ls.lua
Normal file
9
lsp/lua_ls.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
diagnostics = { globals = { "vim" } },
|
||||||
|
workspace = { checkThirdParty = false },
|
||||||
|
telemetry = { enable = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1 +0,0 @@
|
|||||||
require "nvchad.autocmds"
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
-- This file needs to have same structure as nvconfig.lua
|
|
||||||
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
|
|
||||||
-- Please read that file to know all available options :(
|
|
||||||
|
|
||||||
---@type ChadrcConfig
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.base46 = {
|
|
||||||
theme = "onedark",
|
|
||||||
|
|
||||||
-- hl_override = {
|
|
||||||
-- Comment = { italic = true },
|
|
||||||
-- ["@comment"] = { italic = true },
|
|
||||||
-- },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- M.nvdash = { load_on_startup = true }
|
|
||||||
-- M.ui = {
|
|
||||||
-- tabufline = {
|
|
||||||
-- lazyload = false
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
|
|
||||||
return M
|
|
||||||
33
lua/config/lazy.lua
Normal file
33
lua/config/lazy.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system { "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
|
require "config.maps"
|
||||||
|
require "config.opts"
|
||||||
|
|
||||||
|
require("lazy").setup {
|
||||||
|
spec = {
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "tokyonight" } },
|
||||||
|
checker = { enabled = true },
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.cmd [[colorscheme tokyonight]]
|
||||||
|
|
||||||
|
require("bufferline").setup {}
|
||||||
60
lua/config/maps.lua
Normal file
60
lua/config/maps.lua
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
local map = vim.keymap.set
|
||||||
|
|
||||||
|
map("n", "<leader>e", "<cmd>NvimTreeToggle<CR>", { desc = "NvimTree" })
|
||||||
|
|
||||||
|
map("n", "<leader>f", function()
|
||||||
|
require("conform").format { async = true }
|
||||||
|
end, { desc = "Format buffer" })
|
||||||
|
|
||||||
|
map("n", "<C-h>", "<C-w>h", { desc = "switch window left" })
|
||||||
|
map("n", "<C-l>", "<C-w>l", { desc = "switch window right" })
|
||||||
|
map("n", "<C-j>", "<C-w>j", { desc = "switch window down" })
|
||||||
|
map("n", "<C-k>", "<C-w>k", { desc = "switch window up" })
|
||||||
|
|
||||||
|
map("n", "<Esc>", "<cmd>noh<CR>", { desc = "general clear highlights" })
|
||||||
|
|
||||||
|
map("n", "<leader>n", "<cmd>set nu!<CR>", { desc = "toggle line number" })
|
||||||
|
|
||||||
|
map("n", "<leader>/", "gcc", { desc = "toggle comment", remap = true })
|
||||||
|
map("v", "<leader>/", "gc", { desc = "toggle comment", remap = true })
|
||||||
|
|
||||||
|
map("t", "<C-x>", "<C-\\><C-N>", { desc = "terminal escape terminal mode" })
|
||||||
|
|
||||||
|
map("n", "<leader>th", "<cmd>ToggleTerm direction=horizontal<cr>", { desc = "ToggleTerm: horizontal" })
|
||||||
|
map("n", "<leader>tf", "<cmd>ToggleTerm direction=float<cr>", { desc = "ToggleTerm: float" })
|
||||||
|
|
||||||
|
map("n", "<Tab>", "<cmd>BufferLineCycleNext<cr>", { desc = "Next buffer" })
|
||||||
|
map("n", "<S-Tab>", "<cmd>BufferLineCyclePrev<cr>", { desc = "Previous buffer" })
|
||||||
|
map("n", "<leader>ba", "<cmd>BufferLineCloseOthers<CR>", { desc = "Close other buffers" })
|
||||||
|
map("n", "<leader>x", "<cmd>BufferLinePickClose<CR>", { desc = "Close buffer" })
|
||||||
|
map("n", "<leader>bc", "<cmd>BufferLinePick<CR>", { desc = "Close buffer" })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
callback = function(ev)
|
||||||
|
local bufnr = ev.buf
|
||||||
|
|
||||||
|
local opts = function(desc)
|
||||||
|
return { buffer = bufnr, silent = true, desc = desc }
|
||||||
|
end
|
||||||
|
|
||||||
|
map("n", "gd", vim.lsp.buf.definition, opts "LSP: Go to definition")
|
||||||
|
map("n", "gD", vim.lsp.buf.declaration, opts "LSP: Go to declaration")
|
||||||
|
map("n", "gi", vim.lsp.buf.implementation, opts "LSP: Go to implementation")
|
||||||
|
map("n", "gr", vim.lsp.buf.references, opts "LSP: References")
|
||||||
|
map("n", "K", vim.lsp.buf.hover, opts "LSP: Hover")
|
||||||
|
map("n", "<leader>rn", vim.lsp.buf.rename, opts "LSP: Rename")
|
||||||
|
map("n", "<leader>ca", vim.lsp.buf.code_action, opts "LSP: Code action")
|
||||||
|
|
||||||
|
map("n", "[d", function()
|
||||||
|
vim.diagnostic.jump { count = -1, float = true }
|
||||||
|
end, opts "Diag: Prev")
|
||||||
|
map("n", "]d", function()
|
||||||
|
vim.diagnostic.jump { count = 1, float = true }
|
||||||
|
end, opts "Diag: Next")
|
||||||
|
map("n", "<leader>dd", vim.diagnostic.open_float, opts "Diag: Line diagnostics")
|
||||||
|
|
||||||
|
map("n", "<leader>lf", function()
|
||||||
|
vim.lsp.buf.format { async = true }
|
||||||
|
end, opts "LSP: Format (server)")
|
||||||
|
end,
|
||||||
|
})
|
||||||
9
lua/config/opts.lua
Normal file
9
lua/config/opts.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
vim.opt.clipboard = "unnamedplus"
|
||||||
|
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.shiftwidth = 2
|
||||||
|
vim.opt.tabstop = 2
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
vim.opt.autoindent = true
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
local options = {
|
|
||||||
formatters_by_ft = {
|
|
||||||
lua = { "stylua" },
|
|
||||||
-- css = { "prettier" },
|
|
||||||
-- html = { "prettier" },
|
|
||||||
},
|
|
||||||
|
|
||||||
-- format_on_save = {
|
|
||||||
-- -- These options will be passed to conform.format()
|
|
||||||
-- timeout_ms = 500,
|
|
||||||
-- lsp_fallback = true,
|
|
||||||
-- },
|
|
||||||
}
|
|
||||||
|
|
||||||
return options
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
return {
|
|
||||||
defaults = { lazy = true },
|
|
||||||
install = { colorscheme = { "nvchad" } },
|
|
||||||
|
|
||||||
ui = {
|
|
||||||
icons = {
|
|
||||||
ft = "",
|
|
||||||
lazy = " ",
|
|
||||||
loaded = "",
|
|
||||||
not_loaded = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
performance = {
|
|
||||||
rtp = {
|
|
||||||
disabled_plugins = {
|
|
||||||
"2html_plugin",
|
|
||||||
"tohtml",
|
|
||||||
"getscript",
|
|
||||||
"getscriptPlugin",
|
|
||||||
"gzip",
|
|
||||||
"logipat",
|
|
||||||
"netrw",
|
|
||||||
"netrwPlugin",
|
|
||||||
"netrwSettings",
|
|
||||||
"netrwFileHandlers",
|
|
||||||
"matchit",
|
|
||||||
"tar",
|
|
||||||
"tarPlugin",
|
|
||||||
"rrhelper",
|
|
||||||
"spellfile_plugin",
|
|
||||||
"vimball",
|
|
||||||
"vimballPlugin",
|
|
||||||
"zip",
|
|
||||||
"zipPlugin",
|
|
||||||
"tutor",
|
|
||||||
"rplugin",
|
|
||||||
"syntax",
|
|
||||||
"synmenu",
|
|
||||||
"optwin",
|
|
||||||
"compiler",
|
|
||||||
"bugreport",
|
|
||||||
"ftplugin",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
require("nvchad.configs.lspconfig").defaults()
|
|
||||||
|
|
||||||
-- local servers = { "phpactor" }
|
|
||||||
-- vim.lsp.enable(servers)
|
|
||||||
|
|
||||||
-- read :h vim.lsp.config for changing options of lsp servers
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
require "nvchad.mappings"
|
|
||||||
|
|
||||||
-- add yours here
|
|
||||||
|
|
||||||
local map = vim.keymap.set
|
|
||||||
|
|
||||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
|
||||||
map("i", "jk", "<ESC>")
|
|
||||||
|
|
||||||
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
require "nvchad.options"
|
|
||||||
|
|
||||||
-- add yours here!
|
|
||||||
|
|
||||||
-- local o = vim.o
|
|
||||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
|
||||||
70
lua/plugins/cmp.lua
Normal file
70
lua/plugins/cmp.lua
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
event = "InsertEnter",
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-cmdline",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local cmp = require "cmp"
|
||||||
|
local luasnip = require "luasnip"
|
||||||
|
|
||||||
|
cmp.setup {
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
mapping = cmp.mapping.preset.insert {
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
["<CR>"] = cmp.mapping.confirm { select = true },
|
||||||
|
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif luasnip.expand_or_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
|
||||||
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif luasnip.jumpable(-1) then
|
||||||
|
luasnip.jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
},
|
||||||
|
|
||||||
|
sources = cmp.config.sources {
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "luasnip" },
|
||||||
|
{ name = "path" },
|
||||||
|
{ name = "buffer" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
cmp.setup.cmdline({ "/", "?" }, {
|
||||||
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
sources = { { name = "buffer" } },
|
||||||
|
})
|
||||||
|
|
||||||
|
cmp.setup.cmdline(":", {
|
||||||
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
sources = cmp.config.sources({ { name = "path" } }, { { name = "cmdline" } }),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"stevearc/conform.nvim",
|
|
||||||
opts = require "configs.conform",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
34
lua/plugins/format.lua
Normal file
34
lua/plugins/format.lua
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/ts-comments.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
opts = {
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { "stylua" },
|
||||||
|
yml = { "yamlfmt" },
|
||||||
|
yaml = { "yamlfmt" },
|
||||||
|
},
|
||||||
|
default_format_opts = {
|
||||||
|
lsp_format = "fallback",
|
||||||
|
},
|
||||||
|
format_on_save = { timeout_ms = 500 },
|
||||||
|
formatters = {
|
||||||
|
shfmt = {
|
||||||
|
append_args = { "-i", "2" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,8 +1,18 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
{ "hrsh7th/nvim-cmp" },
|
||||||
|
{ "j-hui/fidget.nvim", opts = {} },
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require "configs.lspconfig"
|
local caps = vim.lsp.protocol.make_client_capabilities()
|
||||||
end,
|
caps = require("cmp_nvim_lsp").default_capabilities(caps)
|
||||||
|
|
||||||
|
vim.lsp.config("*", { capabilities = caps })
|
||||||
|
vim.lsp.enable {
|
||||||
|
"lua_ls",
|
||||||
}
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"iamcco/markdown-preview.nvim"
|
"iamcco/markdown-preview.nvim",
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
|
||||||
dependencies = {
|
|
||||||
"mason-org/mason.nvim",
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
ensure_installed = {
|
|
||||||
"phpactor",
|
|
||||||
"lua_ls",
|
|
||||||
"nil_ls"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
53
lua/plugins/syntax.lua
Normal file
53
lua/plugins/syntax.lua
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
lazy = false,
|
||||||
|
build = ":TSUpdate",
|
||||||
|
opts = {
|
||||||
|
indent = { enable = true },
|
||||||
|
highlight = { enable = true },
|
||||||
|
folds = { enable = true },
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"diff",
|
||||||
|
"html",
|
||||||
|
"json",
|
||||||
|
"lua",
|
||||||
|
"luadoc",
|
||||||
|
"luap",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"printf",
|
||||||
|
"regex",
|
||||||
|
"toml",
|
||||||
|
"vim",
|
||||||
|
"vimdoc",
|
||||||
|
"xml",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
local ts = require "nvim-treesitter"
|
||||||
|
|
||||||
|
if type(opts.ensure_installed) == "table" and #opts.ensure_installed > 0 then
|
||||||
|
ts.install(opts.ensure_installed)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
|
opts = {
|
||||||
|
move = {
|
||||||
|
enable = true,
|
||||||
|
set_jumps = true,
|
||||||
|
keys = {
|
||||||
|
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" },
|
||||||
|
goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" },
|
||||||
|
goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" },
|
||||||
|
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
8
lua/plugins/theme.lua
Normal file
8
lua/plugins/theme.lua
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
15
lua/plugins/which.lua
Normal file
15
lua/plugins/which.lua
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>?",
|
||||||
|
function()
|
||||||
|
require("which-key").show { global = false }
|
||||||
|
end,
|
||||||
|
desc = "Buffer Local Keymaps (which-key)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
24
lua/plugins/windows.lua
Normal file
24
lua/plugins/windows.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
version = "*",
|
||||||
|
lazy = false,
|
||||||
|
dependencies = {
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("nvim-tree").setup {}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"akinsho/toggleterm.nvim",
|
||||||
|
version = "*",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"akinsho/bufferline.nvim",
|
||||||
|
version = "*",
|
||||||
|
dependencies = "nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user