Compare commits
68
Commits
fe912ab5fb
...
p53
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19c17b583b | ||
|
|
8638342fa9 | ||
|
|
a62a601e1f | ||
|
|
44a24e2fe5 | ||
|
|
1a98a451ea | ||
|
|
ccf6bc397f | ||
|
|
13cce81d99 | ||
|
|
8fe6a6560e | ||
|
|
0dcd8a91b6 | ||
|
|
e9f6957b99 | ||
|
|
8aec881517 | ||
|
|
f17e83010f | ||
|
|
282a23f446 | ||
|
|
c80f3f0501 | ||
|
|
c2ec317b1b | ||
|
|
2fedda14ed | ||
|
|
e121bde8d8 | ||
|
|
9bb7dcbaf4 | ||
|
|
c8777040fb | ||
|
|
9d37797e6f | ||
|
|
ff99797242 | ||
|
|
a8413849cf | ||
|
|
fd10af115e | ||
|
|
c56f1242df | ||
|
|
250a960698 | ||
|
|
13e9b0f458 | ||
|
|
195fe4ae72 | ||
|
|
3091ea5835 | ||
|
|
215aa2bb2f | ||
|
|
617dca4dc1 | ||
|
|
de85977316 | ||
|
|
456ae88fad | ||
|
|
a69e8dc591 | ||
|
|
a9bc954d02 | ||
|
|
3f1e6d71d4 | ||
|
|
9c013a6aac | ||
|
|
d3d9aa251a | ||
|
|
46a61073a8 | ||
|
|
8ea74bc23b | ||
|
|
487ca44566 | ||
|
|
05f581918a | ||
|
|
6766acefec | ||
|
|
0e27cb4b44 | ||
|
|
682b023fb3 | ||
|
|
f18488d41c | ||
|
|
720d71b546 | ||
|
|
08f3deb901 | ||
|
|
3500e7388d | ||
|
|
83aac1ecc0 | ||
|
|
10b668d98a | ||
|
|
286c951d7b | ||
|
|
4aa283119a | ||
|
|
212bb9a66f | ||
|
|
11c839f870 | ||
|
|
d3433e3c55 | ||
|
|
8ba64ff369 | ||
|
|
e3bb39106e | ||
|
|
a18d92dfa6 | ||
|
|
d73d155287 | ||
|
|
27992efc1c | ||
|
|
1d26f9dc50 | ||
|
|
c2a0bb1684 | ||
|
|
c3c349c830 | ||
|
|
f8a489ea1a | ||
|
|
d72d935b35 | ||
|
|
9c10201ef3 | ||
|
|
582dff9458 | ||
|
|
914f9a400e |
+4
-5
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
[](https://github.com/neovim/neovim)
|
[](https://github.com/neovim/neovim)
|
||||||
[](https://github.com/NvChad/NvChad/issues)
|
[](https://github.com/NvChad/NvChad/issues)
|
||||||
[](https://discord.gg/gADmkJb9Fb)
|
[](https://discord.gg/gADmkJb9Fb)
|
||||||
[](https://matrix.to/#/#nvchad:matrix.org)
|
[](https://matrix.to/#/#nvchad:matrix.org)
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
- Lazy loading is done 93% of the time meaning that plugins will not be loaded by default, they will be loaded only when required also at specific commands, events etc. This lowers the startuptime and it was like 0.07~ secs tested on an old pentium machine 1.4ghz + 4gb ram & HDD.
|
- Lazy loading is done 93% of the time meaning that plugins will not be loaded by default, they will be loaded only when required also at specific commands, events etc. This lowers the startuptime and it was like 0.07~ secs tested on an old pentium machine 1.4ghz + 4gb ram & HDD.
|
||||||
|
|
||||||
- NvChad isnt a framework! Its supposed to be used as a "base" config, so users could tweak the defaults well, can also remove the things they dont like in the default config and build their config on top of it. Users can tweak the entire default config while staying in their custom config (lua/custom dir). This is the control center of the user's config and gitignored so the users can stay update to-date with NvChad's latest config (main branch) while still controlling it with their chadrc (file that controls entire custom dir)
|
- NvChad isn't a framework! It's supposed to be used as a "base" config, so users can tweak the defaults well, and also remove the things they don't like in the default config and build their config on top of it. Users can tweak the entire default config while staying in their custom config (lua/custom dir). This is the control center of the user's config and gitignored so the users can stay up-to-date with NvChad's latest config (main branch) while still controlling it with their chadrc (file that controls entire custom dir).
|
||||||
|
|
||||||
## Theme Showcase
|
## Theme Showcase
|
||||||
|
|
||||||
@@ -88,8 +88,7 @@ A fuzzy file finder, picker, sorter, previewer and much more:
|
|||||||
|
|
||||||
- Many beautiful themes, theme toggler by our [base46 plugin](https://github.com/NvChad/base46)
|
- Many beautiful themes, theme toggler by our [base46 plugin](https://github.com/NvChad/base46)
|
||||||
- Inbuilt terminal toggling & management with [Nvterm](https://github.com/NvChad/nvterm)
|
- Inbuilt terminal toggling & management with [Nvterm](https://github.com/NvChad/nvterm)
|
||||||
- NvChad updater, hide & unhide terminal buffers with [NvChad extensions](https://github.com/NvChad/extensions)
|
- Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui) It provides statusline modules, tabufline ( tabs + buffer manager) , beautiful cheatsheets, NvChad updater, hide & unhide terminal buffers, theme switcher and much more!
|
||||||
- Lightweight & performant ui plugin with [NvChad UI](https://github.com/NvChad/ui) It provides statusline modules, tabufline ( tabs + buffer manager) , beautiful cheatsheets and much more!
|
|
||||||
- File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua)
|
- File navigation with [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua)
|
||||||
- Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons)
|
- Beautiful and configurable icons with [nvim-web-devicons](https://github.com/kyazdani42/nvim-web-devicons)
|
||||||
- Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)
|
- Git diffs and more with [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)
|
||||||
@@ -113,7 +112,7 @@ A fuzzy file finder, picker, sorter, previewer and much more:
|
|||||||
If you like NvChad and would like to support & appreciate it via donation then I'll gladly accept it.
|
If you like NvChad and would like to support & appreciate it via donation then I'll gladly accept it.
|
||||||
|
|
||||||
[](https://ko-fi.com/siduck)
|
[](https://ko-fi.com/siduck)
|
||||||
[](https://paypal.me/siduck76)
|
[](https://paypal.me/siduck13)
|
||||||
[](https://www.buymeacoffee.com/siduck)
|
[](https://www.buymeacoffee.com/siduck)
|
||||||
[](https://www.patreon.com/siduck)
|
[](https://www.patreon.com/siduck)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
spell
|
spell
|
||||||
ftplugin
|
ftplugin
|
||||||
|
syntax
|
||||||
coc-settings.json
|
coc-settings.json
|
||||||
.luarc.json
|
.luarc.json
|
||||||
lazy-lock.json
|
lazy-lock.json
|
||||||
|
after
|
||||||
|
**/.DS_Store
|
||||||
|
|||||||
+17
-17
@@ -1,18 +1,24 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
local fn = vim.fn
|
||||||
|
|
||||||
M.echo = function(str)
|
M.echo = function(str)
|
||||||
vim.cmd "redraw"
|
vim.cmd "redraw"
|
||||||
vim.api.nvim_echo({ { str, "Bold" } }, true, {})
|
vim.api.nvim_echo({ { str, "Bold" } }, true, {})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function shell_call(args)
|
||||||
|
local output = fn.system(args)
|
||||||
|
assert(vim.v.shell_error == 0, "External call failed with error code: " .. vim.v.shell_error .. "\n" .. output)
|
||||||
|
end
|
||||||
|
|
||||||
M.lazy = function(install_path)
|
M.lazy = function(install_path)
|
||||||
------------- base46 ---------------
|
------------- base46 ---------------
|
||||||
local lazy_path = vim.fn.stdpath "data" .. "/lazy/base46"
|
local lazy_path = fn.stdpath "data" .. "/lazy/base46"
|
||||||
|
|
||||||
M.echo " Compiling base46 theme to bytecode ..."
|
M.echo " Compiling base46 theme to bytecode ..."
|
||||||
|
|
||||||
local base46_repo = "https://github.com/NvChad/base46"
|
local base46_repo = "https://github.com/NvChad/base46"
|
||||||
vim.fn.system { "git", "clone", "--depth", "1", "-b", "v2.0", base46_repo, lazy_path }
|
shell_call { "git", "clone", "--depth", "1", "-b", "v2.0", base46_repo, lazy_path }
|
||||||
vim.opt.rtp:prepend(lazy_path)
|
vim.opt.rtp:prepend(lazy_path)
|
||||||
|
|
||||||
require("base46").compile()
|
require("base46").compile()
|
||||||
@@ -20,32 +26,26 @@ M.lazy = function(install_path)
|
|||||||
--------- lazy.nvim ---------------
|
--------- lazy.nvim ---------------
|
||||||
M.echo " Installing lazy.nvim & plugins ..."
|
M.echo " Installing lazy.nvim & plugins ..."
|
||||||
local repo = "https://github.com/folke/lazy.nvim.git"
|
local repo = "https://github.com/folke/lazy.nvim.git"
|
||||||
vim.fn.system { "git", "clone", "--filter=blob:none", "--branch=stable", repo, install_path }
|
shell_call { "git", "clone", "--filter=blob:none", "--branch=stable", repo, install_path }
|
||||||
vim.opt.rtp:prepend(install_path)
|
vim.opt.rtp:prepend(install_path)
|
||||||
|
|
||||||
-- install plugins
|
-- install plugins
|
||||||
require "plugins"
|
require "plugins"
|
||||||
|
|
||||||
-- mason packages & show post_boostrap screen
|
-- mason packages & show post_bootstrap screen
|
||||||
require "nvchad.post_bootstrap"()
|
require "nvchad.post_install"()
|
||||||
end
|
end
|
||||||
|
|
||||||
M.gen_chadrc_template = function()
|
M.gen_chadrc_template = function()
|
||||||
if not vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] then
|
local path = fn.stdpath "config" .. "/lua/custom"
|
||||||
local path = vim.fn.stdpath "config" .. "/lua/custom/"
|
|
||||||
local input = vim.fn.input "Do you want to install example custom config? (y/N) : "
|
|
||||||
|
|
||||||
-- clone example_config repo
|
if fn.isdirectory(path) ~= 1 then
|
||||||
if input == "y" then
|
|
||||||
M.echo "cloning example custom config repo ..."
|
|
||||||
vim.fn.system { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path }
|
|
||||||
vim.fn.delete(path .. ".git", "rf")
|
|
||||||
else
|
|
||||||
-- use very minimal chadrc
|
-- use very minimal chadrc
|
||||||
vim.fn.mkdir(path, "p")
|
fn.mkdir(path, "p")
|
||||||
|
|
||||||
local file = io.open(path .. "chadrc.lua", "w")
|
local file = io.open(path .. "/chadrc.lua", "w")
|
||||||
file:write "---@type ChadrcConfig \n local M = {}\n M.ui = {theme = 'onedark'}\n return M"
|
if file then
|
||||||
|
file:write "---@type ChadrcConfig\nlocal M = {}\n\nM.ui = { theme = 'onedark' }\n\nreturn M"
|
||||||
file:close()
|
file:close()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -90,6 +90,6 @@ M.plugins = "" -- path i.e "custom.plugins", so make custom/plugins.lua file
|
|||||||
|
|
||||||
M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options
|
M.lazy_nvim = require "plugins.configs.lazy_nvim" -- config for lazy.nvim startup options
|
||||||
|
|
||||||
M.mappings = {}
|
M.mappings = require "core.mappings"
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
+41
-10
@@ -59,8 +59,8 @@ for _, provider in ipairs { "node", "perl", "python3", "ruby" } do
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- add binaries installed by mason.nvim to path
|
-- add binaries installed by mason.nvim to path
|
||||||
local is_windows = vim.loop.os_uname().sysname == "Windows_NT"
|
local is_windows = vim.fn.has("win32") ~= 0
|
||||||
vim.env.PATH = vim.env.PATH .. (is_windows and ";" or ":") .. vim.fn.stdpath "data" .. "/mason/bin"
|
vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH
|
||||||
|
|
||||||
-------------------------------------- autocmds ------------------------------------------
|
-------------------------------------- autocmds ------------------------------------------
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
@@ -74,11 +74,10 @@ autocmd("FileType", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- reload some chadrc options on-save
|
-- reload some chadrc options on-save
|
||||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
autocmd("BufWritePost", {
|
||||||
pattern = vim.tbl_map(
|
pattern = vim.tbl_map(function(path)
|
||||||
vim.fs.normalize,
|
return vim.fs.normalize(vim.loop.fs_realpath(path))
|
||||||
vim.fn.glob(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua", true, true, true)
|
end, vim.fn.glob(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua", true, true, true)),
|
||||||
),
|
|
||||||
group = vim.api.nvim_create_augroup("ReloadNvChad", {}),
|
group = vim.api.nvim_create_augroup("ReloadNvChad", {}),
|
||||||
|
|
||||||
callback = function(opts)
|
callback = function(opts)
|
||||||
@@ -97,17 +96,49 @@ vim.api.nvim_create_autocmd("BufWritePost", {
|
|||||||
vim.g.transparency = true
|
vim.g.transparency = true
|
||||||
|
|
||||||
-- statusline
|
-- statusline
|
||||||
require("plenary.reload").reload_module("nvchad_ui.statusline." .. config.ui.statusline.theme)
|
require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme)
|
||||||
vim.opt.statusline = "%!v:lua.require('nvchad_ui.statusline." .. config.ui.statusline.theme .. "').run()"
|
vim.opt.statusline = "%!v:lua.require('nvchad.statusline." .. config.ui.statusline.theme .. "').run()"
|
||||||
|
|
||||||
|
-- tabufline
|
||||||
|
if config.ui.tabufline.enabled then
|
||||||
|
require("plenary.reload").reload_module "nvchad.tabufline.modules"
|
||||||
|
vim.opt.tabline = "%!v:lua.require('nvchad.tabufline.modules').run()"
|
||||||
|
end
|
||||||
|
|
||||||
require("base46").load_all_highlights()
|
require("base46").load_all_highlights()
|
||||||
-- vim.cmd("redraw!")
|
-- vim.cmd("redraw!")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- user event that loads after UIEnter + only if file buf is there
|
||||||
|
vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, {
|
||||||
|
group = vim.api.nvim_create_augroup("NvFilePost", { clear = true }),
|
||||||
|
callback = function(args)
|
||||||
|
local file = vim.api.nvim_buf_get_name(args.buf)
|
||||||
|
local buftype = vim.api.nvim_buf_get_option(args.buf, "buftype")
|
||||||
|
|
||||||
|
if not vim.g.ui_entered and args.event == "UIEnter" then
|
||||||
|
vim.g.ui_entered = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if file ~= "" and buftype ~= "nofile" and vim.g.ui_entered then
|
||||||
|
vim.api.nvim_exec_autocmds("User", { pattern = "FilePost", modeline = false })
|
||||||
|
vim.api.nvim_del_augroup_by_name "NvFilePost"
|
||||||
|
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.api.nvim_exec_autocmds("FileType", {})
|
||||||
|
|
||||||
|
if vim.g.editorconfig then
|
||||||
|
require("editorconfig").config(args.buf)
|
||||||
|
end
|
||||||
|
end, 0)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-------------------------------------- commands ------------------------------------------
|
-------------------------------------- commands ------------------------------------------
|
||||||
local new_cmd = vim.api.nvim_create_user_command
|
local new_cmd = vim.api.nvim_create_user_command
|
||||||
|
|
||||||
new_cmd("NvChadUpdate", function()
|
new_cmd("NvChadUpdate", function()
|
||||||
require "nvchad.update"()
|
require "nvchad.updater"()
|
||||||
end, {})
|
end, {})
|
||||||
|
|||||||
+40
-19
@@ -18,6 +18,7 @@ M.general = {
|
|||||||
n = {
|
n = {
|
||||||
["<leader>n"] = { ":noh <CR>", "Clear highlights" },
|
["<leader>n"] = { ":noh <CR>", "Clear highlights" },
|
||||||
["<leader>rr"] = { ":source $MYVIMRC<CR>", "Reload config file" },
|
["<leader>rr"] = { ":source $MYVIMRC<CR>", "Reload config file" },
|
||||||
|
["<Esc>"] = { "<cmd> noh <CR>", "Clear highlights" },
|
||||||
-- switch between windows
|
-- switch between windows
|
||||||
["<C-h>"] = { "<C-w>h", "Window left" },
|
["<C-h>"] = { "<C-w>h", "Window left" },
|
||||||
["<C-l>"] = { "<C-w>l", "Window right" },
|
["<C-l>"] = { "<C-w>l", "Window right" },
|
||||||
@@ -61,6 +62,13 @@ M.general = {
|
|||||||
-- new buffer
|
-- new buffer
|
||||||
-- ["<leader>b"] = { "<cmd> enew <CR>", "New buffer" },
|
-- ["<leader>b"] = { "<cmd> enew <CR>", "New buffer" },
|
||||||
-- ["<leader>ch"] = { "<cmd> NvCheatsheet <CR>", "Mapping cheatsheet" },
|
-- ["<leader>ch"] = { "<cmd> NvCheatsheet <CR>", "Mapping cheatsheet" },
|
||||||
|
|
||||||
|
["<leader>fm"] = {
|
||||||
|
function()
|
||||||
|
vim.lsp.buf.format { async = true }
|
||||||
|
end,
|
||||||
|
"LSP formatting",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
t = {
|
t = {
|
||||||
@@ -70,6 +78,8 @@ M.general = {
|
|||||||
v = {
|
v = {
|
||||||
-- ["<Up>"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } },
|
-- ["<Up>"] = { 'v:count || mode(1)[0:1] == "no" ? "k" : "gk"', "Move up", opts = { expr = true } },
|
||||||
-- ["<Down>"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } },
|
-- ["<Down>"] = { 'v:count || mode(1)[0:1] == "no" ? "j" : "gj"', "Move down", opts = { expr = true } },
|
||||||
|
["<"] = { "<gv", "Indent line" },
|
||||||
|
[">"] = { ">gv", "Indent line" },
|
||||||
},
|
},
|
||||||
|
|
||||||
x = {
|
x = {
|
||||||
@@ -94,11 +104,18 @@ M.customstuffs = {
|
|||||||
["<C-t>"] = { "<cmd> TagbarToggle<CR>", "Show tagbar" },
|
["<C-t>"] = { "<cmd> TagbarToggle<CR>", "Show tagbar" },
|
||||||
["<leader>ra"] = { "<cmd> call VrcQuery()<CR>", "Call REST endpoint" },
|
["<leader>ra"] = { "<cmd> call VrcQuery()<CR>", "Call REST endpoint" },
|
||||||
["<leader>dl"] = { "0d$", "Delete line from start" },
|
["<leader>dl"] = { "0d$", "Delete line from start" },
|
||||||
["<leader>gp"] = { "<cmd> Git pull<CR>", "Git pull" },
|
["<leader>gpu"] = { "<cmd> Git pull<CR>", "Git pull" },
|
||||||
|
["<leader>gpf"] = { ":Git push ", "Git push with option" },
|
||||||
|
["<leader>gmm"] = { "<cmd> Git merge master<CR>", "Git merge master" },
|
||||||
|
["<leader>gmi"] = { ":Git merge ", "Git merge ..." },
|
||||||
|
["<leader>ga"] = { ":Git commit -a --amend --no-edit --no-verify", "Git commit -a --amend --no-edit --no-verify" },
|
||||||
["<leader>gnb"] = { ":Git checkout -b ", "Checkout to a new branch" },
|
["<leader>gnb"] = { ":Git checkout -b ", "Checkout to a new branch" },
|
||||||
["<leader>gri"] = { ":Git rebase -i HEAD~", "Git rebase interactive from HEAD" },
|
["<leader>gri"] = { ":Git rebase -i HEAD~", "Git rebase interactive from HEAD" },
|
||||||
["<leader>mkd"] = { "<cmd>lua vim.api.nvim_create_user_command('PeekOpen', require('peek').open, {})<CR>", "Open markdown preview" },
|
["<leader>grm"] = { ":Git rebase -i master", "Git rebase interactive from master" },
|
||||||
["<leader>mkc"] = { "<cmd>lua vim.api.nvim_create_user_command('PeekClose', require('peek').close, {})<CR>", "Open markdown preview" },
|
["<leader>grr"] = { ":Git rebase -i ", "Git rebase interactive from <select>" },
|
||||||
|
|
||||||
|
-- ["<leader>mkd"] = { "<cmd>lua vim.api.nvim_create_user_command('PeekOpen', require('peek').open, {})<CR>", "Open markdown preview" },
|
||||||
|
-- ["<leader>mkc"] = { "<cmd>lua vim.api.nvim_create_user_command('PeekClose', require('peek').close, {})<CR>", "Open markdown preview" },
|
||||||
|
|
||||||
["n"] = { "nzz", "Next + auto center" },
|
["n"] = { "nzz", "Next + auto center" },
|
||||||
["N"] = { "Nzz", "Previous + auto center" },
|
["N"] = { "Nzz", "Previous + auto center" },
|
||||||
@@ -112,8 +129,8 @@ M.customstuffs = {
|
|||||||
-- Mappings: TODO
|
-- Mappings: TODO
|
||||||
|
|
||||||
-- "trim(system('git branch --show-current 2>/dev/null'))"
|
-- "trim(system('git branch --show-current 2>/dev/null'))"
|
||||||
-- ["<leader>tt"] = { ":call append(line('.') - 1, repeat(' ', indent('.')) . '# TODO-' . trim(system('git branch --show-current 2>/dev/null')) . ': ' . input('Comment >'))<CR>", "Add TODO comment + add to quickfix list" },
|
-- ["<leader>ct"] = { ":call append(line('.') - 1, repeat(' ', indent('.')) . '# TODO-' . trim(system('git branch --show-current 2>/dev/null')) . ': ' . input('Comment >'))<CR>", "Add TODO comment + add to quickfix list" },
|
||||||
["<leader>tt"] = { ":call append(line('.') - 1, repeat(' ', indent('.')) . '# TODO: ' . input('Comment >'))<CR>", "Add TODO comment + add to quickfix list" },
|
["<leader>ct"] = { ":call append(line('.') - 1, repeat(' ', indent('.')) . '# TODO: ' . input('Comment >'))<CR>", "Add TODO comment + add to quickfix list" },
|
||||||
|
|
||||||
["<leader>ww"] = { ":lua require('nvim-window').pick()<CR>", "Pick window to goto" },
|
["<leader>ww"] = { ":lua require('nvim-window').pick()<CR>", "Pick window to goto" },
|
||||||
["<leader>wm"] = { ":WinShift<CR>", "Enter move window mode" },
|
["<leader>wm"] = { ":WinShift<CR>", "Enter move window mode" },
|
||||||
@@ -140,14 +157,14 @@ M.tabufline = {
|
|||||||
-- cycle through buffers
|
-- cycle through buffers
|
||||||
["<tab>"] = {
|
["<tab>"] = {
|
||||||
function()
|
function()
|
||||||
require("nvchad_ui.tabufline").tabuflineNext()
|
require("nvchad.tabufline").tabuflineNext()
|
||||||
end,
|
end,
|
||||||
"Goto next buffer",
|
"Goto next buffer",
|
||||||
},
|
},
|
||||||
|
|
||||||
["<S-tab>"] = {
|
["<S-tab>"] = {
|
||||||
function()
|
function()
|
||||||
require("nvchad_ui.tabufline").tabuflinePrev()
|
require("nvchad.tabufline").tabuflinePrev()
|
||||||
end,
|
end,
|
||||||
"Goto prev buffer",
|
"Goto prev buffer",
|
||||||
},
|
},
|
||||||
@@ -155,7 +172,7 @@ M.tabufline = {
|
|||||||
-- close buffer + hide terminal buffer
|
-- close buffer + hide terminal buffer
|
||||||
["<leader>x"] = {
|
["<leader>x"] = {
|
||||||
function()
|
function()
|
||||||
require("nvchad_ui.tabufline").close_buffer()
|
require("nvchad.tabufline").close_buffer()
|
||||||
end,
|
end,
|
||||||
"Close buffer",
|
"Close buffer",
|
||||||
},
|
},
|
||||||
@@ -233,7 +250,7 @@ M.lspconfig = {
|
|||||||
|
|
||||||
["<leader>ra"] = {
|
["<leader>ra"] = {
|
||||||
function()
|
function()
|
||||||
require("nvchad_ui.renamer").open()
|
require("nvchad.renamer").open()
|
||||||
end,
|
end,
|
||||||
"LSP rename",
|
"LSP rename",
|
||||||
},
|
},
|
||||||
@@ -252,7 +269,7 @@ M.lspconfig = {
|
|||||||
"LSP references",
|
"LSP references",
|
||||||
},
|
},
|
||||||
|
|
||||||
["<leader>f"] = {
|
["<leader>lf"] = {
|
||||||
function()
|
function()
|
||||||
vim.diagnostic.open_float { border = "rounded" }
|
vim.diagnostic.open_float { border = "rounded" }
|
||||||
end,
|
end,
|
||||||
@@ -261,14 +278,14 @@ M.lspconfig = {
|
|||||||
|
|
||||||
["[d"] = {
|
["[d"] = {
|
||||||
function()
|
function()
|
||||||
vim.diagnostic.goto_prev({ float = { border = "rounded" }})
|
vim.diagnostic.goto_prev { float = { border = "rounded" } }
|
||||||
end,
|
end,
|
||||||
"Goto prev",
|
"Goto prev",
|
||||||
},
|
},
|
||||||
|
|
||||||
["]d"] = {
|
["]d"] = {
|
||||||
function()
|
function()
|
||||||
vim.diagnostic.goto_next({ float = { border = "rounded" }})
|
vim.diagnostic.goto_next { float = { border = "rounded" } }
|
||||||
end,
|
end,
|
||||||
"Goto next",
|
"Goto next",
|
||||||
},
|
},
|
||||||
@@ -280,13 +297,6 @@ M.lspconfig = {
|
|||||||
-- "Diagnostic setloclist",
|
-- "Diagnostic setloclist",
|
||||||
-- },
|
-- },
|
||||||
|
|
||||||
["<leader>fm"] = {
|
|
||||||
function()
|
|
||||||
vim.lsp.buf.format { async = true }
|
|
||||||
end,
|
|
||||||
"LSP formatting",
|
|
||||||
},
|
|
||||||
|
|
||||||
["<leader>wa"] = {
|
["<leader>wa"] = {
|
||||||
function()
|
function()
|
||||||
vim.lsp.buf.add_workspace_folder()
|
vim.lsp.buf.add_workspace_folder()
|
||||||
@@ -308,6 +318,15 @@ M.lspconfig = {
|
|||||||
"List workspace folders",
|
"List workspace folders",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
v = {
|
||||||
|
["<leader>ca"] = {
|
||||||
|
function()
|
||||||
|
vim.lsp.buf.code_action()
|
||||||
|
end,
|
||||||
|
"LSP code action",
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
M.nvimtree = {
|
M.nvimtree = {
|
||||||
@@ -381,6 +400,8 @@ M.telescope = {
|
|||||||
-- Diaglist: LSP diagnostics in quick/loc list
|
-- Diaglist: LSP diagnostics in quick/loc list
|
||||||
["<leader>dw"] = { "<cmd>lua require('diaglist').open_all_diagnostics()<CR>", "Open all open buffers diagnostics in quickfix list" },
|
["<leader>dw"] = { "<cmd>lua require('diaglist').open_all_diagnostics()<CR>", "Open all open buffers diagnostics in quickfix list" },
|
||||||
["<leader>d0"] = { "<cmd>lua require('diaglist').open_buffer_diagnostics()<CR>", "Open current buffer diagnostics in loclist list" },
|
["<leader>d0"] = { "<cmd>lua require('diaglist').open_buffer_diagnostics()<CR>", "Open current buffer diagnostics in loclist list" },
|
||||||
|
|
||||||
|
["<leader>;"] = { "<cmd> Telescope <CR>", "Open Telescope" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -8,11 +8,11 @@ M.load_config = function()
|
|||||||
if chadrc_path then
|
if chadrc_path then
|
||||||
local chadrc = dofile(chadrc_path)
|
local chadrc = dofile(chadrc_path)
|
||||||
|
|
||||||
config.mappings = M.remove_disabled_keys(chadrc.mappings, require "core.mappings")
|
config.mappings = M.remove_disabled_keys(chadrc.mappings, config.mappings)
|
||||||
config = merge_tb("force", config, chadrc)
|
config = merge_tb("force", config, chadrc)
|
||||||
|
config.mappings.disabled = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
config.mappings.disabled = nil
|
|
||||||
return config
|
return config
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
local previewers = require('telescope.previewers')
|
local previewers = require('telescope.previewers')
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
|
|
||||||
local E = {}
|
local E = {}
|
||||||
|
|
||||||
local delta = previewers.new_termopen_previewer {
|
local delta = previewers.new_termopen_previewer {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ local formatting_style = {
|
|||||||
fields = field_arrangement[cmp_style] or { "abbr", "kind", "menu" },
|
fields = field_arrangement[cmp_style] or { "abbr", "kind", "menu" },
|
||||||
|
|
||||||
format = function(_, item)
|
format = function(_, item)
|
||||||
local icons = require("nvchad_ui.icons").lspkind
|
local icons = require "nvchad.icons.lspkind"
|
||||||
local icon = (cmp_ui.icons and icons[item.kind]) or ""
|
local icon = (cmp_ui.icons and icons[item.kind]) or ""
|
||||||
|
|
||||||
if cmp_style == "atom" or cmp_style == "atom_colored" then
|
if cmp_style == "atom" or cmp_style == "atom_colored" then
|
||||||
@@ -52,7 +52,7 @@ local options = {
|
|||||||
window = {
|
window = {
|
||||||
completion = {
|
completion = {
|
||||||
side_padding = (cmp_style ~= "atom" and cmp_style ~= "atom_colored") and 1 or 0,
|
side_padding = (cmp_style ~= "atom" and cmp_style ~= "atom_colored") and 1 or 0,
|
||||||
winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel",
|
winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:None",
|
||||||
scrollbar = false,
|
scrollbar = false,
|
||||||
},
|
},
|
||||||
documentation = {
|
documentation = {
|
||||||
@@ -76,8 +76,8 @@ local options = {
|
|||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
["<C-e>"] = cmp.mapping.close(),
|
["<C-e>"] = cmp.mapping.close(),
|
||||||
["<CR>"] = cmp.mapping.confirm {
|
["<CR>"] = cmp.mapping.confirm {
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
behavior = cmp.ConfirmBehavior.Insert,
|
||||||
select = false,
|
select = true,
|
||||||
},
|
},
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
dofile(vim.g.base46_cache .. "lsp")
|
dofile(vim.g.base46_cache .. "lsp")
|
||||||
require "nvchad_ui.lsp"
|
require "nvchad.lsp"
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
local utils = require "core.utils"
|
local utils = require "core.utils"
|
||||||
|
|
||||||
-- export on_attach & capabilities for custom lspconfigs
|
-- export on_attach & capabilities for custom lspconfigs
|
||||||
|
|
||||||
M.on_attach = function(client, bufnr)
|
M.on_attach = function(client, bufnr)
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
client.server_capabilities.documentRangeFormattingProvider = false
|
|
||||||
|
|
||||||
utils.load_mappings("lspconfig", { buffer = bufnr })
|
utils.load_mappings("lspconfig", { buffer = bufnr })
|
||||||
|
|
||||||
if client.server_capabilities.signatureHelpProvider then
|
if client.server_capabilities.signatureHelpProvider then
|
||||||
require("nvchad_ui.signature").setup(client)
|
require("nvchad.signature").setup(client)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if not utils.load_config().ui.lsp_semantic_tokens then
|
-- disable semantic tokens
|
||||||
|
M.on_init = function(client, _)
|
||||||
|
if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then
|
||||||
client.server_capabilities.semanticTokensProvider = nil
|
client.server_capabilities.semanticTokensProvider = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -42,6 +41,7 @@ M.capabilities.textDocument.completion.completionItem = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
require("lspconfig").lua_ls.setup {
|
require("lspconfig").lua_ls.setup {
|
||||||
|
on_init = M.on_init,
|
||||||
on_attach = M.on_attach,
|
on_attach = M.on_attach,
|
||||||
capabilities = M.capabilities,
|
capabilities = M.capabilities,
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ require("lspconfig").lua_ls.setup {
|
|||||||
library = {
|
library = {
|
||||||
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
|
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
|
||||||
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
|
[vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
|
||||||
[vim.fn.stdpath "data" .. "/lazy/extensions/nvchad_types"] = true,
|
[vim.fn.stdpath "data" .. "/lazy/ui/nvchad_types"] = true,
|
||||||
[vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true,
|
[vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true,
|
||||||
},
|
},
|
||||||
maxPreload = 100000,
|
maxPreload = 100000,
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
local M = {
|
||||||
|
lsp = {
|
||||||
|
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||||
|
override = {
|
||||||
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- you can enable a preset for easier configuration
|
||||||
|
presets = {
|
||||||
|
bottom_search = true, -- use a classic bottom cmdline for search
|
||||||
|
command_palette = true, -- position the cmdline and popupmenu together
|
||||||
|
long_message_to_split = true, -- long messages will be sent to a split
|
||||||
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
|
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||||
|
},
|
||||||
|
views = {
|
||||||
|
cmdline_popup = {
|
||||||
|
-- border = {
|
||||||
|
-- style = "none",
|
||||||
|
-- padding = { 2, 3 },
|
||||||
|
-- },
|
||||||
|
-- position = {
|
||||||
|
-- row = "85%",
|
||||||
|
-- col = "50%",
|
||||||
|
-- },
|
||||||
|
size = {
|
||||||
|
width = 120,
|
||||||
|
height = "auto",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
popupmenu = {
|
||||||
|
-- relative = "editor",
|
||||||
|
-- position = {
|
||||||
|
-- row = 25,
|
||||||
|
-- col = "50%",
|
||||||
|
-- },
|
||||||
|
size = {
|
||||||
|
width = 120,
|
||||||
|
-- height = 10,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -51,12 +51,12 @@ end
|
|||||||
|
|
||||||
M.gitsigns = {
|
M.gitsigns = {
|
||||||
signs = {
|
signs = {
|
||||||
add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" },
|
add = { text = "│" },
|
||||||
change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" },
|
change = { text = "│" },
|
||||||
delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" },
|
delete = { text = "" },
|
||||||
topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" },
|
topdelete = { text = "‾" },
|
||||||
changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" },
|
changedelete = { text = "~" },
|
||||||
untracked = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
|
untracked = { text = "│" },
|
||||||
},
|
},
|
||||||
on_attach = function(bufnr)
|
on_attach = function(bufnr)
|
||||||
utils.load_mappings("gitsigns", { buffer = bufnr })
|
utils.load_mappings("gitsigns", { buffer = bufnr })
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
local options = {
|
local options = {
|
||||||
ensure_installed = { "lua" },
|
ensure_installed = { "lua", "vim", "vimdoc" },
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|||||||
+44
-39
@@ -30,9 +30,6 @@ local default_plugins = {
|
|||||||
|
|
||||||
{"nvim-telescope/telescope-fzf-native.nvim", build="make"},
|
{"nvim-telescope/telescope-fzf-native.nvim", build="make"},
|
||||||
|
|
||||||
-- nvchad plugins
|
|
||||||
{ "NvChad/extensions", branch = "v2.0" },
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"NvChad/base46",
|
"NvChad/base46",
|
||||||
branch = "v2.0",
|
branch = "v2.0",
|
||||||
@@ -45,13 +42,10 @@ local default_plugins = {
|
|||||||
"NvChad/ui",
|
"NvChad/ui",
|
||||||
branch = "v2.0",
|
branch = "v2.0",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
config = function()
|
|
||||||
require "nvchad_ui"
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"NvChad/nvterm",
|
"zbirenbaum/nvterm",
|
||||||
init = function()
|
init = function()
|
||||||
require("core.utils").load_mappings "nvterm"
|
require("core.utils").load_mappings "nvterm"
|
||||||
end,
|
end,
|
||||||
@@ -63,9 +57,7 @@ local default_plugins = {
|
|||||||
|
|
||||||
{
|
{
|
||||||
"NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
init = function()
|
event = "User FilePost",
|
||||||
require("core.utils").lazy_load "nvim-colorizer.lua"
|
|
||||||
end,
|
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("colorizer").setup(opts)
|
require("colorizer").setup(opts)
|
||||||
|
|
||||||
@@ -79,7 +71,7 @@ local default_plugins = {
|
|||||||
{
|
{
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
opts = function()
|
opts = function()
|
||||||
return { override = require("nvchad_ui.icons").devicons }
|
return { override = require "nvchad.icons.devicons" }
|
||||||
end,
|
end,
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
dofile(vim.g.base46_cache .. "devicons")
|
dofile(vim.g.base46_cache .. "devicons")
|
||||||
@@ -93,6 +85,7 @@ local default_plugins = {
|
|||||||
init = function()
|
init = function()
|
||||||
require("core.utils").lazy_load "indent-blankline.nvim"
|
require("core.utils").lazy_load "indent-blankline.nvim"
|
||||||
end,
|
end,
|
||||||
|
event = "User FilePost",
|
||||||
opts = function()
|
opts = function()
|
||||||
return require("plugins.configs.others").blankline
|
return require("plugins.configs.others").blankline
|
||||||
end,
|
end,
|
||||||
@@ -105,9 +98,7 @@ local default_plugins = {
|
|||||||
|
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
init = function()
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
require("core.utils").lazy_load "nvim-treesitter"
|
|
||||||
end,
|
|
||||||
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },
|
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
opts = function()
|
opts = function()
|
||||||
@@ -132,22 +123,7 @@ local default_plugins = {
|
|||||||
-- git stuff
|
-- git stuff
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
ft = { "gitcommit", "diff" },
|
event = "User FilePost",
|
||||||
init = function()
|
|
||||||
-- load gitsigns only when a git file is opened
|
|
||||||
vim.api.nvim_create_autocmd({ "BufRead" }, {
|
|
||||||
group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
|
|
||||||
callback = function()
|
|
||||||
vim.fn.system("git -C " .. '"' .. vim.fn.expand "%:p:h" .. '"' .. " rev-parse")
|
|
||||||
if vim.v.shell_error == 0 then
|
|
||||||
vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
|
|
||||||
vim.schedule(function()
|
|
||||||
require("lazy").load { plugins = { "gitsigns.nvim" } }
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
opts = function()
|
opts = function()
|
||||||
return require("plugins.configs.others").gitsigns
|
return require("plugins.configs.others").gitsigns
|
||||||
end,
|
end,
|
||||||
@@ -160,7 +136,7 @@ local default_plugins = {
|
|||||||
-- lsp stuff
|
-- lsp stuff
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
|
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" },
|
||||||
opts = function()
|
opts = function()
|
||||||
return require "plugins.configs.mason"
|
return require "plugins.configs.mason"
|
||||||
end,
|
end,
|
||||||
@@ -170,7 +146,9 @@ local default_plugins = {
|
|||||||
|
|
||||||
-- custom nvchad cmd to install all mason binaries listed
|
-- custom nvchad cmd to install all mason binaries listed
|
||||||
vim.api.nvim_create_user_command("MasonInstallAll", function()
|
vim.api.nvim_create_user_command("MasonInstallAll", function()
|
||||||
|
if opts.ensure_installed and #opts.ensure_installed > 0 then
|
||||||
vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " "))
|
vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " "))
|
||||||
|
end
|
||||||
end, {})
|
end, {})
|
||||||
|
|
||||||
vim.g.mason_binaries_list = opts.ensure_installed
|
vim.g.mason_binaries_list = opts.ensure_installed
|
||||||
@@ -179,9 +157,7 @@ local default_plugins = {
|
|||||||
|
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
init = function()
|
event = "User FilePost",
|
||||||
require("core.utils").lazy_load "nvim-lspconfig"
|
|
||||||
end,
|
|
||||||
config = function()
|
config = function()
|
||||||
require "plugins.configs.lspconfig"
|
require "plugins.configs.lspconfig"
|
||||||
end,
|
end,
|
||||||
@@ -237,12 +213,19 @@ local default_plugins = {
|
|||||||
|
|
||||||
{
|
{
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
keys = { "gcc", "gbc" },
|
keys = {
|
||||||
|
{ "gcc", mode = "n", desc = "Comment toggle current line" },
|
||||||
|
{ "gc", mode = { "n", "o" }, desc = "Comment toggle linewise" },
|
||||||
|
{ "gc", mode = "x", desc = "Comment toggle linewise (visual)" },
|
||||||
|
{ "gbc", mode = "n", desc = "Comment toggle current block" },
|
||||||
|
{ "gb", mode = { "n", "o" }, desc = "Comment toggle blockwise" },
|
||||||
|
{ "gb", mode = "x", desc = "Comment toggle blockwise (visual)" },
|
||||||
|
},
|
||||||
init = function()
|
init = function()
|
||||||
require("core.utils").load_mappings "comment"
|
require("core.utils").load_mappings "comment"
|
||||||
end,
|
end,
|
||||||
config = function()
|
config = function(_, opts)
|
||||||
require("Comment").setup()
|
require("Comment").setup(opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -360,12 +343,12 @@ local default_plugins = {
|
|||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
dofile(vim.g.base46_cache .. "nvimtree")
|
dofile(vim.g.base46_cache .. "nvimtree")
|
||||||
require("nvim-tree").setup(opts)
|
require("nvim-tree").setup(opts)
|
||||||
vim.g.nvimtree_side = opts.view.side
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||||
cmd = "Telescope",
|
cmd = "Telescope",
|
||||||
init = function()
|
init = function()
|
||||||
require("core.utils").load_mappings "telescope"
|
require("core.utils").load_mappings "telescope"
|
||||||
@@ -389,10 +372,11 @@ local default_plugins = {
|
|||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
lazy=false,
|
lazy=false,
|
||||||
keys = { "<leader>", '"', "'", "`", "c", "v" },
|
keys = { "<leader>", "<c-r>", "<c-w>", '"', "'", "`", "c", "v", "g" },
|
||||||
init = function()
|
init = function()
|
||||||
require("core.utils").load_mappings "whichkey"
|
require("core.utils").load_mappings "whichkey"
|
||||||
end,
|
end,
|
||||||
|
cmd = "WhichKey",
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
dofile(vim.g.base46_cache .. "whichkey")
|
dofile(vim.g.base46_cache .. "whichkey")
|
||||||
require("which-key").setup(opts)
|
require("which-key").setup(opts)
|
||||||
@@ -403,6 +387,27 @@ local default_plugins = {
|
|||||||
branch = "harpoon2",
|
branch = "harpoon2",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" }
|
dependencies = { "nvim-lua/plenary.nvim" }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function()
|
||||||
|
return require "plugins.configs.noice"
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
-- "rcarriga/nvim-notify",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
lazy=false,
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
opts = {
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
-- refer to the configuration section below
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local config = require("core.utils").load_config()
|
local config = require("core.utils").load_config()
|
||||||
|
|||||||
Reference in New Issue
Block a user