Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe912ab5fb
|
||
|
|
86ccf3bb2d
|
+5
-4
@@ -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 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).
|
- 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)
|
||||||
|
|
||||||
## Theme Showcase
|
## Theme Showcase
|
||||||
|
|
||||||
@@ -88,7 +88,8 @@ 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)
|
||||||
- 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!
|
- 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 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)
|
||||||
@@ -112,7 +113,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/siduck13)
|
[](https://paypal.me/siduck76)
|
||||||
[](https://www.buymeacoffee.com/siduck)
|
[](https://www.buymeacoffee.com/siduck)
|
||||||
[](https://www.patreon.com/siduck)
|
[](https://www.patreon.com/siduck)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
spell
|
spell
|
||||||
ftplugin
|
ftplugin
|
||||||
syntax
|
|
||||||
coc-settings.json
|
coc-settings.json
|
||||||
.luarc.json
|
.luarc.json
|
||||||
lazy-lock.json
|
lazy-lock.json
|
||||||
after
|
|
||||||
**/.DS_Store
|
|
||||||
|
|||||||
@@ -18,4 +18,6 @@ end
|
|||||||
|
|
||||||
dofile(vim.g.base46_cache .. "defaults")
|
dofile(vim.g.base46_cache .. "defaults")
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
vim.api.nvim_command "packadd cfilter"
|
||||||
|
vim.api.nvim_command "packadd justify"
|
||||||
require "plugins"
|
require "plugins"
|
||||||
|
|||||||
+16
-24
@@ -1,24 +1,18 @@
|
|||||||
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 = fn.stdpath "data" .. "/lazy/base46"
|
local lazy_path = vim.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"
|
||||||
shell_call { "git", "clone", "--depth", "1", "-b", "v2.0", base46_repo, lazy_path }
|
vim.fn.system { "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()
|
||||||
@@ -26,37 +20,35 @@ 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"
|
||||||
shell_call { "git", "clone", "--filter=blob:none", "--branch=stable", repo, install_path }
|
vim.fn.system { "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_bootstrap screen
|
-- mason packages & show post_boostrap screen
|
||||||
require "nvchad.post_install"()
|
require "nvchad.post_bootstrap"()
|
||||||
end
|
end
|
||||||
|
|
||||||
M.gen_chadrc_template = function()
|
M.gen_chadrc_template = function()
|
||||||
local path = fn.stdpath "config" .. "/lua/custom"
|
if not vim.api.nvim_get_runtime_file("lua/custom/chadrc.lua", false)[1] then
|
||||||
|
local path = vim.fn.stdpath "config" .. "/lua/custom/"
|
||||||
|
local input = vim.fn.input "Do you want to install example custom config? (y/N) : "
|
||||||
|
|
||||||
if fn.isdirectory(path) ~= 1 then
|
-- clone example_config repo
|
||||||
local input = fn.input "Do you want to install example custom config? (y/N): "
|
if input == "y" then
|
||||||
|
M.echo "cloning example custom config repo ..."
|
||||||
if input:lower() == "y" then
|
vim.fn.system { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path }
|
||||||
M.echo "Cloning example custom config repo..."
|
vim.fn.delete(path .. ".git", "rf")
|
||||||
shell_call { "git", "clone", "--depth", "1", "https://github.com/NvChad/example_config", path }
|
|
||||||
fn.delete(path .. "/.git", "rf")
|
|
||||||
else
|
else
|
||||||
-- use very minimal chadrc
|
-- use very minimal chadrc
|
||||||
fn.mkdir(path, "p")
|
vim.fn.mkdir(path, "p")
|
||||||
|
|
||||||
local file = io.open(path .. "/chadrc.lua", "w")
|
local file = io.open(path .. "chadrc.lua", "w")
|
||||||
if file then
|
file:write "---@type ChadrcConfig \n local M = {}\n M.ui = {theme = 'onedark'}\n return M"
|
||||||
file:write "---@type ChadrcConfig\nlocal M = {}\n\nM.ui = { theme = 'onedark' }\n\nreturn M"
|
|
||||||
file:close()
|
file:close()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -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 = require "core.mappings"
|
M.mappings = {}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
+9
-14
@@ -60,7 +60,7 @@ 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.loop.os_uname().sysname == "Windows_NT"
|
||||||
vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH
|
vim.env.PATH = vim.env.PATH .. (is_windows and ";" or ":") .. vim.fn.stdpath "data" .. "/mason/bin"
|
||||||
|
|
||||||
-------------------------------------- autocmds ------------------------------------------
|
-------------------------------------- autocmds ------------------------------------------
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
@@ -74,10 +74,11 @@ autocmd("FileType", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- reload some chadrc options on-save
|
-- reload some chadrc options on-save
|
||||||
autocmd("BufWritePost", {
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
pattern = vim.tbl_map(function(path)
|
pattern = vim.tbl_map(
|
||||||
return vim.fs.normalize(vim.loop.fs_realpath(path))
|
vim.fs.normalize,
|
||||||
end, vim.fn.glob(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua", true, true, true)),
|
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)
|
||||||
@@ -96,14 +97,8 @@ autocmd("BufWritePost", {
|
|||||||
vim.g.transparency = true
|
vim.g.transparency = true
|
||||||
|
|
||||||
-- statusline
|
-- statusline
|
||||||
require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme)
|
require("plenary.reload").reload_module("nvchad_ui.statusline." .. config.ui.statusline.theme)
|
||||||
vim.opt.statusline = "%!v:lua.require('nvchad.statusline." .. config.ui.statusline.theme .. "').run()"
|
vim.opt.statusline = "%!v:lua.require('nvchad_ui.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!")
|
||||||
@@ -114,5 +109,5 @@ autocmd("BufWritePost", {
|
|||||||
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.updater"()
|
require "nvchad.update"()
|
||||||
end, {})
|
end, {})
|
||||||
|
|||||||
+36
-21
@@ -70,8 +70,6 @@ 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 = {
|
||||||
@@ -114,7 +112,14 @@ 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>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>tt"] = { ":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>wm"] = { ":WinShift<CR>", "Enter move window mode" },
|
||||||
|
["<leader>ws"] = { ":WinShift swap<CR>", "Swap window, with selection" },
|
||||||
|
|
||||||
|
["<leader>gg"] = { ":LazyGit<CR>", "Open lazygit" },
|
||||||
},
|
},
|
||||||
v = {
|
v = {
|
||||||
["n"] = { "nzz", "Next + auto center" },
|
["n"] = { "nzz", "Next + auto center" },
|
||||||
@@ -135,14 +140,14 @@ M.tabufline = {
|
|||||||
-- cycle through buffers
|
-- cycle through buffers
|
||||||
["<tab>"] = {
|
["<tab>"] = {
|
||||||
function()
|
function()
|
||||||
require("nvchad.tabufline").tabuflineNext()
|
require("nvchad_ui.tabufline").tabuflineNext()
|
||||||
end,
|
end,
|
||||||
"Goto next buffer",
|
"Goto next buffer",
|
||||||
},
|
},
|
||||||
|
|
||||||
["<S-tab>"] = {
|
["<S-tab>"] = {
|
||||||
function()
|
function()
|
||||||
require("nvchad.tabufline").tabuflinePrev()
|
require("nvchad_ui.tabufline").tabuflinePrev()
|
||||||
end,
|
end,
|
||||||
"Goto prev buffer",
|
"Goto prev buffer",
|
||||||
},
|
},
|
||||||
@@ -150,7 +155,7 @@ M.tabufline = {
|
|||||||
-- close buffer + hide terminal buffer
|
-- close buffer + hide terminal buffer
|
||||||
["<leader>x"] = {
|
["<leader>x"] = {
|
||||||
function()
|
function()
|
||||||
require("nvchad.tabufline").close_buffer()
|
require("nvchad_ui.tabufline").close_buffer()
|
||||||
end,
|
end,
|
||||||
"Close buffer",
|
"Close buffer",
|
||||||
},
|
},
|
||||||
@@ -228,7 +233,7 @@ M.lspconfig = {
|
|||||||
|
|
||||||
["<leader>ra"] = {
|
["<leader>ra"] = {
|
||||||
function()
|
function()
|
||||||
require("nvchad.renamer").open()
|
require("nvchad_ui.renamer").open()
|
||||||
end,
|
end,
|
||||||
"LSP rename",
|
"LSP rename",
|
||||||
},
|
},
|
||||||
@@ -247,7 +252,7 @@ M.lspconfig = {
|
|||||||
"LSP references",
|
"LSP references",
|
||||||
},
|
},
|
||||||
|
|
||||||
["<leader>lf"] = {
|
["<leader>f"] = {
|
||||||
function()
|
function()
|
||||||
vim.diagnostic.open_float { border = "rounded" }
|
vim.diagnostic.open_float { border = "rounded" }
|
||||||
end,
|
end,
|
||||||
@@ -256,14 +261,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",
|
||||||
},
|
},
|
||||||
@@ -275,6 +280,13 @@ 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()
|
||||||
@@ -296,15 +308,6 @@ 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 = {
|
||||||
@@ -332,9 +335,15 @@ M.telescope = {
|
|||||||
["<C-b>"] = { "<cmd> Telescope buffers <CR>", "Find buffers" },
|
["<C-b>"] = { "<cmd> Telescope buffers <CR>", "Find buffers" },
|
||||||
|
|
||||||
["<leader>fg"] = { "<cmd> lua require('telescope.builtin').live_grep({default_text=vim.fn.getreg('/')}) <CR>", "Live grep with actual search value as prefix" },
|
["<leader>fg"] = { "<cmd> lua require('telescope.builtin').live_grep({default_text=vim.fn.getreg('/')}) <CR>", "Live grep with actual search value as prefix" },
|
||||||
|
["<leader>gf"] = { "<cmd> lua require('telescope.builtin').find_files({default_text=vim.fn.getreg('/')}) <CR>", "Live grep with actual search value as prefix" },
|
||||||
["<leader>ac"] = { ":execute 'vimgrep' input('Pattern >', getreg('/')) '**/*' <CR>", "add search term files in quickfix list" },
|
["<leader>ac"] = { ":execute 'vimgrep' input('Pattern >', getreg('/')) '**/*' <CR>", "add search term files in quickfix list" },
|
||||||
["<leader>qc"] = { "<cmd> Telescope quickfix <CR>", "Show quickfix list" },
|
-- ["<leader>qr"] = { ":execute 'cdo' '%s/' . input('Search term >', getreg('/')) . '/' . input('Replace by >', getreg('')) . '/g | update' <CR>", "Replace pattern in all quickfix list" },
|
||||||
["<leader>qr"] = { ":execute 'cdo' '%s/' . input('Search term >', getreg('/')) . '/' . input('Replace by >', getreg('')) . '/g | update' <CR>", "Replace pattern in all quickfix list" },
|
["<leader>qr"] = { ":cdo '%s/' . input('Search term >', getreg('/')) . '/' . input('Replace by >', '') . '/g | update' <CR>", "Replace pattern in all quickfix list" },
|
||||||
|
["<leader>br"] = { ":execute '%s/' . input('Search term >', getreg('/')) . '/' . input('Replace by >', '') . '/g | update' <CR>", "Replace pattern in current buffer" },
|
||||||
|
|
||||||
|
["<leader>ql"] = { "<cmd> Telescope quickfix <CR>", "Show quickfix list" },
|
||||||
|
["<leader>qn"] = { ":cnext<CR>", "Jump to next in quickfix list" },
|
||||||
|
["<leader>qp"] = { ":cprevious<CR>", "Jump to previous in quickfix list" },
|
||||||
|
|
||||||
["<leader>ll"] = { "<cmd> Telescope loclist <CR>", "Show loclist list" },
|
["<leader>ll"] = { "<cmd> Telescope loclist <CR>", "Show loclist list" },
|
||||||
["<leader>ln"] = { ":lnext<CR>", "Jump to next in loclist" },
|
["<leader>ln"] = { ":lnext<CR>", "Jump to next in loclist" },
|
||||||
@@ -344,6 +353,8 @@ M.telescope = {
|
|||||||
["<leader>fo"] = { "<cmd> Telescope oldfiles <CR>", "Find oldfiles" },
|
["<leader>fo"] = { "<cmd> Telescope oldfiles <CR>", "Find oldfiles" },
|
||||||
["<leader>fz"] = { "<cmd> Telescope current_buffer_fuzzy_find <CR>", "Find in current buffer" },
|
["<leader>fz"] = { "<cmd> Telescope current_buffer_fuzzy_find <CR>", "Find in current buffer" },
|
||||||
|
|
||||||
|
["<leader>wl"] = { "<cmd> Telescope workspaces <CR>", "Find workspaces" },
|
||||||
|
|
||||||
-- git
|
-- git
|
||||||
--- Commits
|
--- Commits
|
||||||
["<leader>gc"] = { "<cmd> lua require('custom.telescope').my_git_commits()<CR>", "Custom Git commits" },
|
["<leader>gc"] = { "<cmd> lua require('custom.telescope').my_git_commits()<CR>", "Custom Git commits" },
|
||||||
@@ -366,6 +377,10 @@ M.telescope = {
|
|||||||
-- History
|
-- History
|
||||||
["<leader>ch"] = { "<cmd> Telescope command_history <CR>", "telescope commands history" },
|
["<leader>ch"] = { "<cmd> Telescope command_history <CR>", "telescope commands history" },
|
||||||
["<leader>/"] = { "<cmd> Telescope search_history <CR>", "telescope search history" },
|
["<leader>/"] = { "<cmd> Telescope search_history <CR>", "telescope search history" },
|
||||||
|
|
||||||
|
-- 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>d0"] = { "<cmd>lua require('diaglist').open_buffer_diagnostics()<CR>", "Open current buffer diagnostics in loclist list" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+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, config.mappings)
|
config.mappings = M.remove_disabled_keys(chadrc.mappings, require "core.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
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ local M = {}
|
|||||||
local highlights = require "custom.highlights"
|
local highlights = require "custom.highlights"
|
||||||
|
|
||||||
M.ui = {
|
M.ui = {
|
||||||
theme = "gatekeeper",
|
theme = "onedark",
|
||||||
theme_toggle = { "gatekeeper", "monekai" },
|
theme_toggle = { "onedark", "monekai" },
|
||||||
|
|
||||||
hl_override = highlights.override,
|
hl_override = highlights.override,
|
||||||
hl_add = highlights.add,
|
hl_add = highlights.add,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ local capabilities = require("plugins.configs.lspconfig").capabilities
|
|||||||
local lspconfig = require "lspconfig"
|
local lspconfig = require "lspconfig"
|
||||||
|
|
||||||
-- if you just want default config for the servers then put them in a table
|
-- if you just want default config for the servers then put them in a table
|
||||||
local servers = { "html", "cssls", "tsserver", "clangd" }
|
local servers = { "html", "cssls", "tsserver", "clangd", "salt_ls" }
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup {
|
||||||
|
|||||||
@@ -19,6 +19,15 @@ M.treesitter = {
|
|||||||
-- "python"
|
-- "python"
|
||||||
-- },
|
-- },
|
||||||
},
|
},
|
||||||
|
incremental_selection = {
|
||||||
|
enable = true,
|
||||||
|
keymaps = {
|
||||||
|
init_selection = "<C-space>",
|
||||||
|
node_incremental = "<C-space>",
|
||||||
|
scope_incremental = false,
|
||||||
|
node_decremental = "<bs>",
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
M.mason = {
|
M.mason = {
|
||||||
|
|||||||
@@ -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.icons.lspkind"
|
local icons = require("nvchad_ui.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:None",
|
winhighlight = "Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel",
|
||||||
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.Insert,
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
select = true,
|
select = false,
|
||||||
},
|
},
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
local Hydra = require("hydra")
|
||||||
|
|
||||||
|
Hydra({
|
||||||
|
name = "Change / Resize Window",
|
||||||
|
mode = { "n" },
|
||||||
|
body = "<leader>t",
|
||||||
|
config = {
|
||||||
|
-- color = "pink",
|
||||||
|
},
|
||||||
|
heads = {
|
||||||
|
-- move between windows
|
||||||
|
{ "<C-h>", "<C-w>h", { desc="Noot nooty" } },
|
||||||
|
{ "<C-j>", "<C-w>j" },
|
||||||
|
{ "<C-k>", "<C-w>k" },
|
||||||
|
{ "<C-l>", "<C-w>l" },
|
||||||
|
|
||||||
|
-- resizing window
|
||||||
|
{ "H", "<C-w>3<" },
|
||||||
|
{ "L", "<C-w>3>" },
|
||||||
|
{ "K", "<C-w>2+" },
|
||||||
|
{ "J", "<C-w>2-" },
|
||||||
|
|
||||||
|
-- equalize window sizes
|
||||||
|
{ "e", "<C-w>=" },
|
||||||
|
|
||||||
|
-- close active window
|
||||||
|
{ "Q", ":q<cr>" },
|
||||||
|
{ "<C-q>", ":q<cr>" },
|
||||||
|
|
||||||
|
-- exit this Hydra
|
||||||
|
{ "q", nil, { exit = true, nowait = true } },
|
||||||
|
{ ";", nil, { exit = true, nowait = true } },
|
||||||
|
{ "<Esc>", nil, { exit = true, nowait = true } },
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
dofile(vim.g.base46_cache .. "lsp")
|
dofile(vim.g.base46_cache .. "lsp")
|
||||||
require "nvchad.lsp"
|
require "nvchad_ui.lsp"
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
local utils = require "core.utils"
|
local utils = require "core.utils"
|
||||||
@@ -13,10 +13,10 @@ M.on_attach = function(client, bufnr)
|
|||||||
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.signature").setup(client)
|
require("nvchad_ui.signature").setup(client)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not utils.load_config().ui.lsp_semantic_tokens and client.supports_method "textDocument/semanticTokens" then
|
if not utils.load_config().ui.lsp_semantic_tokens then
|
||||||
client.server_capabilities.semanticTokensProvider = nil
|
client.server_capabilities.semanticTokensProvider = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -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/ui/nvchad_types"] = true,
|
[vim.fn.stdpath "data" .. "/lazy/extensions/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,
|
||||||
|
|||||||
@@ -51,12 +51,12 @@ end
|
|||||||
|
|
||||||
M.gitsigns = {
|
M.gitsigns = {
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = "│" },
|
add = { hl = "DiffAdd", text = "│", numhl = "GitSignsAddNr" },
|
||||||
change = { text = "│" },
|
change = { hl = "DiffChange", text = "│", numhl = "GitSignsChangeNr" },
|
||||||
delete = { text = "" },
|
delete = { hl = "DiffDelete", text = "", numhl = "GitSignsDeleteNr" },
|
||||||
topdelete = { text = "‾" },
|
topdelete = { hl = "DiffDelete", text = "‾", numhl = "GitSignsDeleteNr" },
|
||||||
changedelete = { text = "~" },
|
changedelete = { hl = "DiffChangeDelete", text = "~", numhl = "GitSignsChangeNr" },
|
||||||
untracked = { text = "│" },
|
untracked = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
|
||||||
},
|
},
|
||||||
on_attach = function(bufnr)
|
on_attach = function(bufnr)
|
||||||
utils.load_mappings("gitsigns", { buffer = bufnr })
|
utils.load_mappings("gitsigns", { buffer = bufnr })
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ require('lspconfig').ruff_lsp.setup {
|
|||||||
init_options = {
|
init_options = {
|
||||||
settings = {
|
settings = {
|
||||||
-- Any extra CLI arguments for `ruff` go here.
|
-- Any extra CLI arguments for `ruff` go here.
|
||||||
args = {},
|
args = {"--ignore", "E741"},
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ local options = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
extensions_list = { "themes", "terms", "fzf" },
|
extensions_list = { "themes", "terms", "fzf", "macrothis" },
|
||||||
extensions = {
|
extensions = {
|
||||||
fzf = {
|
fzf = {
|
||||||
fuzzy = true,
|
fuzzy = true,
|
||||||
|
|||||||
@@ -0,0 +1,133 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.textobjects = {
|
||||||
|
select = {
|
||||||
|
enable = true,
|
||||||
|
|
||||||
|
-- Automatically jump forward to textobj, similar to targets.vim
|
||||||
|
lookahead = true,
|
||||||
|
|
||||||
|
keymaps = {
|
||||||
|
-- You can use the capture groups defined in textobjects.scm
|
||||||
|
["a="] = { query = "@assignment.outer", desc = "Select outer part of an assignment" },
|
||||||
|
["i="] = { query = "@assignment.inner", desc = "Select inner part of an assignment" },
|
||||||
|
["l="] = { query = "@assignment.lhs", desc = "Select left hand side of an assignment" },
|
||||||
|
["r="] = { query = "@assignment.rhs", desc = "Select right hand side of an assignment" },
|
||||||
|
|
||||||
|
["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter/argument" },
|
||||||
|
["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter/argument" },
|
||||||
|
|
||||||
|
["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
|
||||||
|
["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
|
||||||
|
|
||||||
|
["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
|
||||||
|
["il"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
|
||||||
|
|
||||||
|
["af"] = { query = "@call.outer", desc = "Select outer part of a function call" },
|
||||||
|
["if"] = { query = "@call.inner", desc = "Select inner part of a function call" },
|
||||||
|
|
||||||
|
["am"] = { query = "@function.outer", desc = "Select outer part of a function def" },
|
||||||
|
["im"] = { query = "@function.inner", desc = "Select inner part of a function def" },
|
||||||
|
|
||||||
|
["ak"] = { query = "@class.outer", desc = "Select outer part of a class" },
|
||||||
|
["ik"] = { query = "@class.inner", desc = "Select inner part of a class" },
|
||||||
|
|
||||||
|
["ac"] = { query = "@comment.outer", desc = "Select outer part of a comment" },
|
||||||
|
["ic"] = { query = "@comment.inner", desc = "Select inner part of a comment" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
move = {
|
||||||
|
enable = true,
|
||||||
|
-- Whether to set jumps in the jumplist
|
||||||
|
set_jumps = true,
|
||||||
|
goto_next_start = {
|
||||||
|
["]a"] = { query = "@parameter.outer", desc = "Goto next start outer parameter" },
|
||||||
|
["]i"] = { query = "@conditional.outer", desc = "Goto next start outer conditional" },
|
||||||
|
["]l"] = { query = "@loop.outer", desc = "Goto next start outer loop" },
|
||||||
|
["]f"] = { query = "@call.outer", desc = "Goto next start outer call" },
|
||||||
|
["]m"] = { query = "@function.outer", desc = "Goto next start outer function" },
|
||||||
|
["]k"] = { query = "@class.outer", desc = "Goto next start outer class" },
|
||||||
|
["]c"] = { query = "@comment.outer", desc = "Goto next start outer comment" },
|
||||||
|
},
|
||||||
|
goto_next_end = {
|
||||||
|
["]A"] = { query = "@parameter.outer", desc = "Goto next end outer parameter" },
|
||||||
|
["]I"] = { query = "@conditional.outer", desc = "Goto next end outer conditional" },
|
||||||
|
["]L"] = { query = "@loop.outer", desc = "Goto next end outer loop" },
|
||||||
|
["]F"] = { query = "@call.outer", desc = "Goto next end outer call" },
|
||||||
|
["]M"] = { query = "@function.outer", desc = "Goto next end outer function" },
|
||||||
|
["]K"] = { query = "@class.outer", desc = "Goto next end outer class" },
|
||||||
|
["]C"] = { query = "@comment.outer", desc = "Goto next end outer comment" },
|
||||||
|
},
|
||||||
|
goto_previous_start = {
|
||||||
|
["[a"] = { query = "@parameter.outer", desc = "Goto previous start outer parameter" },
|
||||||
|
["[i"] = { query = "@conditional.outer", desc = "Goto previous start outer conditional" },
|
||||||
|
["[l"] = { query = "@loop.outer", desc = "Goto previous start outer loop" },
|
||||||
|
["[f"] = { query = "@call.outer", desc = "Goto previous start outer call" },
|
||||||
|
["[m"] = { query = "@function.outer", desc = "Goto previous start outer function" },
|
||||||
|
["[k"] = { query = "@class.outer", desc = "Goto previous start outer class" },
|
||||||
|
["[c"] = { query = "@comment.outer", desc = "Goto previous start outer comment" },
|
||||||
|
},
|
||||||
|
goto_previous_end = {
|
||||||
|
["[A"] = { query = "@parameter.outer", desc = "Goto previous end outer parameter" },
|
||||||
|
["[I"] = { query = "@conditional.outer", desc = "Goto previous end outer conditional" },
|
||||||
|
["[L"] = { query = "@loop.outer", desc = "Goto previous end outer loop" },
|
||||||
|
["[F"] = { query = "@call.outer", desc = "Goto previous end outer call" },
|
||||||
|
["[M"] = { query = "@function.outer", desc = "Goto previous end outer function" },
|
||||||
|
["[K"] = { query = "@class.outer", desc = "Goto previous end outer class" },
|
||||||
|
["[C"] = { query = "@comment.outer", desc = "Goto previous end outer comment" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
swap = {
|
||||||
|
enable = true,
|
||||||
|
|
||||||
|
swap_next = {
|
||||||
|
["<leader>na"] = { query = "@parameter.inner", desc = "Swap with next inner parameter" },
|
||||||
|
["<leader>ni"] = { query = "@conditional.outer", desc = "Swap with next outer conditional" },
|
||||||
|
["<leader>nl"] = { query = "@loop.outer", desc = "Swap with next outer loop" },
|
||||||
|
["<leader>nf"] = { query = "@call.outer", desc = "Swap with next outer call" },
|
||||||
|
["<leader>nm"] = { query = "@function.outer", desc = "Swap with next outer function" },
|
||||||
|
["<leader>nk"] = { query = "@class.outer", desc = "Swap with next outer class" },
|
||||||
|
["<leader>nc"] = { query = "@comment.outer", desc = "Swap with next outer comment" },
|
||||||
|
|
||||||
|
["<leader>nA"] = { query = "@parameter.outer", desc = "Swap with next outer parameter" },
|
||||||
|
["<leader>nI"] = { query = "@conditional.inner", desc = "Swap with next inner conditional" },
|
||||||
|
["<leader>nL"] = { query = "@loop.inner", desc = "Swap with next inner loop" },
|
||||||
|
["<leader>nF"] = { query = "@call.inner", desc = "Swap with next inner call" },
|
||||||
|
["<leader>nM"] = { query = "@function.inner", desc = "Swap with next inner function" },
|
||||||
|
["<leader>nK"] = { query = "@class.inner", desc = "Swap with next inner class" },
|
||||||
|
["<leader>nC"] = { query = "@comment.inner", desc = "Swap with next inner comment" },
|
||||||
|
},
|
||||||
|
swap_previous = {
|
||||||
|
["<leader>pa"] = { query = "@parameter.inner", desc = "Swap with previous inner parameter" },
|
||||||
|
["<leader>pi"] = { query = "@conditional.outer", desc = "Swap with previous outer conditional" },
|
||||||
|
["<leader>pl"] = { query = "@loop.outer", desc = "Swap with previous outer loop" },
|
||||||
|
["<leader>pf"] = { query = "@call.outer", desc = "Swap with previous outer call" },
|
||||||
|
["<leader>pm"] = { query = "@function.outer", desc = "Swap with previous outer function" },
|
||||||
|
["<leader>pk"] = { query = "@class.outer", desc = "Swap with previous outer class" },
|
||||||
|
["<leader>pc"] = { query = "@comment.outer", desc = "Swap with previous outer comment" },
|
||||||
|
|
||||||
|
["<leader>pA"] = { query = "@parameter.outer", desc = "Swap with previous outer parameter" },
|
||||||
|
["<leader>pI"] = { query = "@conditional.inner", desc = "Swap with previous inner conditional" },
|
||||||
|
["<leader>pL"] = { query = "@loop.inner", desc = "Swap with previous inner loop" },
|
||||||
|
["<leader>pF"] = { query = "@call.inner", desc = "Swap with previous inner call" },
|
||||||
|
["<leader>pM"] = { query = "@function.inner", desc = "Swap with previous inner function" },
|
||||||
|
["<leader>pK"] = { query = "@class.inner", desc = "Swap with previous inner class" },
|
||||||
|
["<leader>pC"] = { query = "@comment.inner", desc = "Swap with previous inner comment" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- local ts_repeat_move = require "nvim-treesitter.textobjects.repeatable_move"
|
||||||
|
|
||||||
|
-- Repeat movement with ; and ,
|
||||||
|
-- vim.keymap.set({"n", "x", "o"}, ",", ts_repeat_move.repeat_last_move_next)
|
||||||
|
-- vim.keymap.set({"n", "x", "o"}, ",", ts_repeat_move.repeat_last_move_previous)
|
||||||
|
|
||||||
|
-- Optionnally, make builtin f, F, t, T also repeatable with ; and ,
|
||||||
|
-- vim.keymap.set({"n", "x", "o"}, "f", ts_repeat_move.builtin_f)
|
||||||
|
-- vim.keymap.set({"n", "x", "o"}, "F", ts_repeat_move.builtin_F)
|
||||||
|
-- vim.keymap.set({"n", "x", "o"}, "t", ts_repeat_move.builtin_t)
|
||||||
|
-- vim.keymap.set({"n", "x", "o"}, "T", ts_repeat_move.builtin_T)
|
||||||
|
|
||||||
|
return M
|
||||||
+130
-15
@@ -30,6 +30,9 @@ 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",
|
||||||
@@ -42,6 +45,9 @@ local default_plugins = {
|
|||||||
"NvChad/ui",
|
"NvChad/ui",
|
||||||
branch = "v2.0",
|
branch = "v2.0",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
require "nvchad_ui"
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -73,7 +79,7 @@ local default_plugins = {
|
|||||||
{
|
{
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
opts = function()
|
opts = function()
|
||||||
return { override = require "nvchad.icons.devicons" }
|
return { override = require("nvchad_ui.icons").devicons }
|
||||||
end,
|
end,
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
dofile(vim.g.base46_cache .. "devicons")
|
dofile(vim.g.base46_cache .. "devicons")
|
||||||
@@ -113,6 +119,16 @@ local default_plugins = {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
require("nvim-treesitter.configs").setup(
|
||||||
|
require("plugins.configs.treesitter_textobjects")
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- git stuff
|
-- git stuff
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
@@ -144,7 +160,7 @@ local default_plugins = {
|
|||||||
-- lsp stuff
|
-- lsp stuff
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" },
|
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
|
||||||
opts = function()
|
opts = function()
|
||||||
return require "plugins.configs.mason"
|
return require "plugins.configs.mason"
|
||||||
end,
|
end,
|
||||||
@@ -221,19 +237,113 @@ local default_plugins = {
|
|||||||
|
|
||||||
{
|
{
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
keys = {
|
keys = { "gcc", "gbc" },
|
||||||
{ "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(_, opts)
|
config = function()
|
||||||
require("Comment").setup(opts)
|
require("Comment").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Save and load macro / register
|
||||||
|
{
|
||||||
|
"desdic/macrothis.nvim",
|
||||||
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{ "<Leader>kkd", function() require('macrothis').delete() end, desc = "Delete" },
|
||||||
|
{ "<Leader>kke", function() require('macrothis').edit() end, desc = "Edit" },
|
||||||
|
{ "<Leader>kkl", function() require('macrothis').load() end, desc = "Load" },
|
||||||
|
{ "<Leader>kkn", function() require('macrothis').rename() end, desc = "Rename" },
|
||||||
|
{ "<Leader>kkq", function() require('macrothis').quickfix() end, desc = "Run macro on all files in quickfix" },
|
||||||
|
{ "<Leader>kkr", function() require('macrothis').run() end, desc = "Run macro" },
|
||||||
|
{ "<Leader>kks", function() require('macrothis').save() end, desc = "Save" },
|
||||||
|
{ "<Leader>kkx", function() require('macrothis').register() end, desc = "Edit register" },
|
||||||
|
{ "<Leader>kkp", function() require('macrothis').copy_register_printable() end, desc = "Copy register as printable" },
|
||||||
|
{ "<Leader>kkm", function() require('macrothis').copy_macro_printable() end, desc = "Copy macro as printable" },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"onsails/diaglist.nvim",
|
||||||
|
lazy=false,
|
||||||
|
debug=false,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"anuvyklack/hydra.nvim",
|
||||||
|
lazy=false,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"gioele/vim-autoswap",
|
||||||
|
lazy=false,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"natecraddock/workspaces.nvim",
|
||||||
|
lazy=false,
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
require("workspaces").setup({
|
||||||
|
hooks = {
|
||||||
|
open = {"Telescope find_files"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"mangelozzi/rgflow.nvim",
|
||||||
|
lazy=false,
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
require("rgflow").setup({
|
||||||
|
-- Set the default rip grep flags and options for when running a search via
|
||||||
|
-- RgFlow. Once changed via the UI, the previous search flags are used for
|
||||||
|
-- each subsequent search (until Neovim restarts).
|
||||||
|
cmd_flags = "--smart-case --fixed-strings --ignore --max-columns 200",
|
||||||
|
|
||||||
|
-- Mappings to trigger RgFlow functions
|
||||||
|
default_trigger_mappings = true,
|
||||||
|
-- These mappings are only active when the RgFlow UI (panel) is open
|
||||||
|
default_ui_mappings = true,
|
||||||
|
-- QuickFix window only mapping
|
||||||
|
default_quickfix_mappings = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"yorickpeterse/nvim-window",
|
||||||
|
lazy=false,
|
||||||
|
config = function()
|
||||||
|
require('nvim-window').setup({
|
||||||
|
normal_hl = 'Normal',
|
||||||
|
hint_hl = 'Bold',
|
||||||
|
border = 'single'
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"sindrets/winshift.nvim",
|
||||||
|
lazy=false,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"kdheepak/lazygit.nvim",
|
||||||
|
lazy=false,
|
||||||
|
config = function()
|
||||||
|
require("lazy").setup({
|
||||||
|
{
|
||||||
|
"kdheepak/lazygit.nvim",
|
||||||
|
-- optional for floating window border decoration
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -250,12 +360,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", { "nvim-telescope/telescope-fzf-native.nvim", build = "make" } },
|
|
||||||
cmd = "Telescope",
|
cmd = "Telescope",
|
||||||
init = function()
|
init = function()
|
||||||
require("core.utils").load_mappings "telescope"
|
require("core.utils").load_mappings "telescope"
|
||||||
@@ -278,16 +388,21 @@ local default_plugins = {
|
|||||||
-- Only load whichkey after all the gui
|
-- Only load whichkey after all the gui
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
keys = { "<leader>", "<c-r>", "<c-w>", '"', "'", "`", "c", "v", "g" },
|
lazy=false,
|
||||||
|
keys = { "<leader>", '"', "'", "`", "c", "v" },
|
||||||
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)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
branch = "harpoon2",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" }
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local config = require("core.utils").load_config()
|
local config = require("core.utils").load_config()
|
||||||
|
|||||||
Reference in New Issue
Block a user