🐛 fix(nvim): changed a lot of stuff to adapt to the new 10.0 lazyvim update
the new lazyvim update was huge, especially because none-ls was moved to extras, so conform and lint would be the default formatter-linting
This commit is contained in:
parent
c80a50087a
commit
438af606a1
21 changed files with 812 additions and 616 deletions
31
.config/nvim/lazyvim.json
Normal file
31
.config/nvim/lazyvim.json
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"extras": [
|
||||||
|
"lazyvim.plugins.extras.coding.yanky",
|
||||||
|
"lazyvim.plugins.extras.dap.core",
|
||||||
|
"lazyvim.plugins.extras.dap.nlua",
|
||||||
|
"lazyvim.plugins.extras.editor.symbols-outline",
|
||||||
|
"lazyvim.plugins.extras.formatting.black",
|
||||||
|
"lazyvim.plugins.extras.formatting.prettier",
|
||||||
|
"lazyvim.plugins.extras.lang.docker",
|
||||||
|
"lazyvim.plugins.extras.lang.go",
|
||||||
|
"lazyvim.plugins.extras.lang.java",
|
||||||
|
"lazyvim.plugins.extras.lang.json",
|
||||||
|
"lazyvim.plugins.extras.lang.omnisharp",
|
||||||
|
"lazyvim.plugins.extras.lang.python",
|
||||||
|
"lazyvim.plugins.extras.lang.rust",
|
||||||
|
"lazyvim.plugins.extras.lang.tailwind",
|
||||||
|
"lazyvim.plugins.extras.lang.typescript",
|
||||||
|
"lazyvim.plugins.extras.lang.yaml",
|
||||||
|
"lazyvim.plugins.extras.linting.eslint",
|
||||||
|
"lazyvim.plugins.extras.test.core",
|
||||||
|
"lazyvim.plugins.extras.ui.alpha",
|
||||||
|
"lazyvim.plugins.extras.util.dot",
|
||||||
|
"lazyvim.plugins.extras.util.project",
|
||||||
|
"lazyvim.plugins.extras.vscode",
|
||||||
|
"plugins.extras.alpha"
|
||||||
|
],
|
||||||
|
"news": {
|
||||||
|
"NEWS.md": "2123"
|
||||||
|
},
|
||||||
|
"version": 2
|
||||||
|
}
|
|
@ -2,66 +2,66 @@
|
||||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||||
-- Add any additional keymaps here
|
-- Add any additional keymaps here
|
||||||
local function map(mode, lhs, rhs, opts)
|
local function map(mode, lhs, rhs, opts)
|
||||||
local keys = require("lazy.core.handler").handlers.keys
|
local keys = require("lazy.core.handler").handlers.keys
|
||||||
---@cast keys LazyKeysHandler
|
---@cast keys LazyKeysHandler
|
||||||
-- do not create the keymap if a lazy keys handler exists
|
-- do not create the keymap if a lazy keys handler exists
|
||||||
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
|
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
|
||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
opts.silent = opts.silent ~= false
|
opts.silent = opts.silent ~= false
|
||||||
if opts.remap and not vim.g.vscode then
|
if opts.remap and not vim.g.vscode then
|
||||||
opts.remap = nil
|
opts.remap = nil
|
||||||
end
|
|
||||||
vim.keymap.set(mode, lhs, rhs, opts)
|
|
||||||
end
|
end
|
||||||
|
vim.keymap.set(mode, lhs, rhs, opts)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
map(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader>xs",
|
"<leader>xs",
|
||||||
":FloatermNew --disposable --name=duaroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> dua i<CR>",
|
":FloatermNew --disposable --name=duaroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> dua i<CR>",
|
||||||
{ desc = "Workspace Size (root dir)" }
|
{ desc = "Workspace Size (root dir)" }
|
||||||
)
|
)
|
||||||
|
|
||||||
map(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader>xS",
|
"<leader>xS",
|
||||||
":FloatermNew --disposable --name=duabuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> dua i<CR>",
|
":FloatermNew --disposable --name=duabuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> dua i<CR>",
|
||||||
{ desc = "Workspace Size (cwd)" }
|
{ desc = "Workspace Size (cwd)" }
|
||||||
)
|
)
|
||||||
|
|
||||||
map(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader>fx",
|
"<leader>fx",
|
||||||
":FloatermNew --disposable --name=xplrroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> xplr<CR>",
|
":FloatermNew --disposable --name=xplrroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> xplr<CR>",
|
||||||
{ desc = "Xplr (root dir)" }
|
{ desc = "Xplr (root dir)" }
|
||||||
)
|
)
|
||||||
|
|
||||||
map(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader>fX",
|
"<leader>fX",
|
||||||
":FloatermNew --disposable --name=xplrbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> xplr<CR>",
|
":FloatermNew --disposable --name=xplrbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> xplr<CR>",
|
||||||
{ desc = "Xplr (cwd)" }
|
{ desc = "Xplr (cwd)" }
|
||||||
)
|
)
|
||||||
|
|
||||||
map(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader>gg",
|
"<leader>gg",
|
||||||
":FloatermNew --disposable --name=lazygitroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> lazygit<CR>",
|
":FloatermNew --disposable --name=lazygitroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root> lazygit<CR>",
|
||||||
{ desc = "Lazygit (root dir)" }
|
{ desc = "Lazygit (root dir)" }
|
||||||
)
|
)
|
||||||
|
|
||||||
map(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader>gG",
|
"<leader>gG",
|
||||||
":FloatermNew --disposable --name=lazygitbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> lazygit<CR>",
|
":FloatermNew --disposable --name=lazygitbuffer --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer> lazygit<CR>",
|
||||||
{ desc = "Lazygit (cwd)" }
|
{ desc = "Lazygit (cwd)" }
|
||||||
)
|
)
|
||||||
|
|
||||||
map(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader>fd",
|
"<leader>fd",
|
||||||
":FloatermNew --disposable --name=lazydocker --opener=edit --titleposition=center --height=0.85 --width=0.85 lazydocker<CR>",
|
":FloatermNew --disposable --name=lazydocker --opener=edit --titleposition=center --height=0.85 --width=0.85 lazydocker<CR>",
|
||||||
{ desc = "Lazydocker" }
|
{ desc = "Lazydocker" }
|
||||||
)
|
)
|
||||||
|
|
||||||
map("n", "<leader>T", ":Telescope floaterm<CR>", { desc = "Terminals" })
|
map("n", "<leader>T", ":Telescope floaterm<CR>", { desc = "Terminals" })
|
||||||
|
@ -76,21 +76,21 @@ map("n", "<leader>si", ":Telescope import<CR>", { desc = "Imports" })
|
||||||
|
|
||||||
map("n", "<leader>sI", ":Gitignore<CR>", { desc = "Gitignore" })
|
map("n", "<leader>sI", ":Gitignore<CR>", { desc = "Gitignore" })
|
||||||
|
|
||||||
|
map("n", "<leader>cC", ":ConformInfo<CR>", { desc = "Conform Info" })
|
||||||
|
|
||||||
map("n", "<leader>um", ":MarkdownPreviewToggle<CR>", { desc = "Toggle Markdown Preview" })
|
map("n", "<leader>um", ":MarkdownPreviewToggle<CR>", { desc = "Toggle Markdown Preview" })
|
||||||
|
|
||||||
map("n", "<leader>cn", ":NullLsInfo<CR>", { desc = "NullLs Info" })
|
|
||||||
|
|
||||||
map(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader>ft",
|
"<leader>ft",
|
||||||
":FloatermNew --name=termroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root><CR>",
|
":FloatermNew --name=termroot --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<root><CR>",
|
||||||
{ desc = "New Terminal (root dir)" }
|
{ desc = "New Terminal (root dir)" }
|
||||||
)
|
)
|
||||||
map(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader>fT",
|
"<leader>fT",
|
||||||
":FloatermNew --name=termcwd --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer><CR>",
|
":FloatermNew --name=termcwd --opener=edit --titleposition=center --height=0.85 --width=0.85 --cwd=<buffer><CR>",
|
||||||
{ desc = "New Terminal (cwd)" }
|
{ desc = "New Terminal (cwd)" }
|
||||||
)
|
)
|
||||||
map("n", "<c-Return>", ":FloatermToggle<CR>", { desc = "Toggle Terminal" })
|
map("n", "<c-Return>", ":FloatermToggle<CR>", { desc = "Toggle Terminal" })
|
||||||
map("t", "<C-Return>", "<C-\\><C-n><C-\\><C-n>:FloatermToggle<CR>", { desc = "Toggle Terminal", nowait = true })
|
map("t", "<C-Return>", "<C-\\><C-n><C-\\><C-n>:FloatermToggle<CR>", { desc = "Toggle Terminal", nowait = true })
|
||||||
|
@ -104,51 +104,51 @@ vim.keymap.set("i", "<C-c>", "<cmd>PickColorInsert<cr>", { noremap = true, silen
|
||||||
vim.keymap.set("n", "<leader>ccc", "<cmd>CompilerOpen<cr>", { noremap = true, silent = true, desc = "Open Compiler" })
|
vim.keymap.set("n", "<leader>ccc", "<cmd>CompilerOpen<cr>", { noremap = true, silent = true, desc = "Open Compiler" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>ccR", function()
|
vim.keymap.set("n", "<leader>ccR", function()
|
||||||
vim.cmd("CompilerStop")
|
vim.cmd("CompilerStop")
|
||||||
vim.cmd("CompilerRedo")
|
vim.cmd("CompilerRedo")
|
||||||
end, { noremap = true, silent = true, desc = "Redo Compiler" })
|
end, { noremap = true, silent = true, desc = "Redo Compiler" })
|
||||||
|
|
||||||
-- Toggle compiler results
|
-- Toggle compiler results
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
"n",
|
"n",
|
||||||
"<leader>ccr",
|
"<leader>ccr",
|
||||||
"<cmd>CompilerToggleResults<cr>",
|
"<cmd>CompilerToggleResults<cr>",
|
||||||
{ noremap = true, silent = true, desc = "Toggle Compiler Results" }
|
{ noremap = true, silent = true, desc = "Toggle Compiler Results" }
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap(
|
||||||
"n",
|
"n",
|
||||||
"<leader>cps",
|
"<leader>cps",
|
||||||
"<cmd>lua require('package-info').show({ force = true })<cr>",
|
"<cmd>lua require('package-info').show({ force = true })<cr>",
|
||||||
{ silent = true, noremap = true, desc = "Show Package Versions" }
|
{ silent = true, noremap = true, desc = "Show Package Versions" }
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap(
|
||||||
"n",
|
"n",
|
||||||
"<leader>cpu",
|
"<leader>cpu",
|
||||||
"<cmd>lua require('package-info').update()<cr>",
|
"<cmd>lua require('package-info').update()<cr>",
|
||||||
{ silent = true, noremap = true, desc = "Update Package" }
|
{ silent = true, noremap = true, desc = "Update Package" }
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap(
|
||||||
"n",
|
"n",
|
||||||
"<leader>cpr",
|
"<leader>cpr",
|
||||||
"<cmd>lua require('package-info').delete()<cr>",
|
"<cmd>lua require('package-info').delete()<cr>",
|
||||||
{ silent = true, noremap = true, desc = "Remove Package" }
|
{ silent = true, noremap = true, desc = "Remove Package" }
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap(
|
||||||
"n",
|
"n",
|
||||||
"<leader>cpv",
|
"<leader>cpv",
|
||||||
"<cmd>lua require('package-info').change_version()<cr>",
|
"<cmd>lua require('package-info').change_version()<cr>",
|
||||||
{ silent = true, noremap = true, desc = "Change Package Version" }
|
{ silent = true, noremap = true, desc = "Change Package Version" }
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap(
|
||||||
"n",
|
"n",
|
||||||
"<leader>cpn",
|
"<leader>cpn",
|
||||||
"<cmd>lua require('package-info').install()<cr>",
|
"<cmd>lua require('package-info').install()<cr>",
|
||||||
{ silent = true, noremap = true, desc = "Install New Dependency" }
|
{ silent = true, noremap = true, desc = "Install New Dependency" }
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||||
|
@ -160,75 +160,75 @@ vim.keymap.set("n", "n", "nzzzv")
|
||||||
vim.keymap.set("n", "N", "Nzzzv")
|
vim.keymap.set("n", "N", "Nzzzv")
|
||||||
|
|
||||||
local function goto_prev_node()
|
local function goto_prev_node()
|
||||||
local ts_utils = require("nvim-treesitter.ts_utils")
|
local ts_utils = require("nvim-treesitter.ts_utils")
|
||||||
local node = ts_utils.get_node_at_cursor()
|
local node = ts_utils.get_node_at_cursor()
|
||||||
if not node then
|
if not node then
|
||||||
return
|
return
|
||||||
|
end
|
||||||
|
local dest_node = ts_utils.get_previous_node(node, true, true)
|
||||||
|
if not dest_node then
|
||||||
|
local cur_node = node:parent()
|
||||||
|
while cur_node do
|
||||||
|
dest_node = ts_utils.get_previous_node(cur_node, false, false)
|
||||||
|
if dest_node then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
cur_node = cur_node:parent()
|
||||||
end
|
end
|
||||||
local dest_node = ts_utils.get_previous_node(node, true, true)
|
end
|
||||||
if not dest_node then
|
if not dest_node then
|
||||||
local cur_node = node:parent()
|
return
|
||||||
while cur_node do
|
end
|
||||||
dest_node = ts_utils.get_previous_node(cur_node, false, false)
|
ts_utils.goto_node(dest_node)
|
||||||
if dest_node then
|
|
||||||
break
|
|
||||||
end
|
|
||||||
cur_node = cur_node:parent()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not dest_node then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
ts_utils.goto_node(dest_node)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function goto_next_node()
|
local function goto_next_node()
|
||||||
local ts_utils = require("nvim-treesitter.ts_utils")
|
local ts_utils = require("nvim-treesitter.ts_utils")
|
||||||
local node = ts_utils.get_node_at_cursor()
|
local node = ts_utils.get_node_at_cursor()
|
||||||
if not node then
|
if not node then
|
||||||
return
|
return
|
||||||
|
end
|
||||||
|
local dest_node = ts_utils.get_next_node(node, true, true)
|
||||||
|
if not dest_node then
|
||||||
|
local cur_node = node:parent()
|
||||||
|
while cur_node do
|
||||||
|
dest_node = ts_utils.get_next_node(cur_node, false, false)
|
||||||
|
if dest_node then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
cur_node = cur_node:parent()
|
||||||
end
|
end
|
||||||
local dest_node = ts_utils.get_next_node(node, true, true)
|
end
|
||||||
if not dest_node then
|
if not dest_node then
|
||||||
local cur_node = node:parent()
|
return
|
||||||
while cur_node do
|
end
|
||||||
dest_node = ts_utils.get_next_node(cur_node, false, false)
|
ts_utils.goto_node(dest_node)
|
||||||
if dest_node then
|
|
||||||
break
|
|
||||||
end
|
|
||||||
cur_node = cur_node:parent()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not dest_node then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
ts_utils.goto_node(dest_node)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function goto_parent_node()
|
local function goto_parent_node()
|
||||||
local ts_utils = require("nvim-treesitter.ts_utils")
|
local ts_utils = require("nvim-treesitter.ts_utils")
|
||||||
local node = ts_utils.get_node_at_cursor()
|
local node = ts_utils.get_node_at_cursor()
|
||||||
if not node then
|
if not node then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local dest_node = node:parent()
|
local dest_node = node:parent()
|
||||||
if not dest_node then
|
if not dest_node then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
ts_utils.goto_node(dest_node)
|
ts_utils.goto_node(dest_node)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function goto_child_node()
|
local function goto_child_node()
|
||||||
local ts_utils = require("nvim-treesitter.ts_utils")
|
local ts_utils = require("nvim-treesitter.ts_utils")
|
||||||
local node = ts_utils.get_node_at_cursor()
|
local node = ts_utils.get_node_at_cursor()
|
||||||
if not node then
|
if not node then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local dest_node = ts_utils.get_named_children(node)[1]
|
local dest_node = ts_utils.get_named_children(node)[1]
|
||||||
if not dest_node then
|
if not dest_node then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
ts_utils.goto_node(dest_node)
|
ts_utils.goto_node(dest_node)
|
||||||
end
|
end
|
||||||
|
|
||||||
local keyopts = { noremap = true, silent = true }
|
local keyopts = { noremap = true, silent = true }
|
||||||
|
|
|
@ -11,24 +11,6 @@ require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
-- add LazyVim and import its plugins
|
-- add LazyVim and import its plugins
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
-- import any extras modules here
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
|
||||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
|
||||||
{ import = "lazyvim.plugins.extras.test.core" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.python" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.docker" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.go" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
|
||||||
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
|
||||||
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
|
||||||
-- { import = "lazyvim.plugins.extras.coding.copilot" },
|
|
||||||
{ import = "lazyvim.plugins.extras.util.dot" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
|
||||||
{ import = "lazyvim.plugins.extras.coding.yanky" },
|
|
||||||
{ import = "lazyvim.plugins.extras.util.project" },
|
|
||||||
{ import = "lazyvim.plugins.extras.lang.omnisharp" },
|
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
},
|
},
|
||||||
defaults = {
|
defaults = {
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = function()
|
opts = {},
|
||||||
require("nvim-ts-autotag").setup()
|
},
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
58
.config/nvim/lua/plugins/conform.lua
Normal file
58
.config/nvim/lua/plugins/conform.lua
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
dependencies = { "mason.nvim" },
|
||||||
|
lazy = true,
|
||||||
|
cmd = "ConformInfo",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>cF",
|
||||||
|
function()
|
||||||
|
require("conform").format({ formatters = { "injected" } })
|
||||||
|
end,
|
||||||
|
mode = { "n", "v" },
|
||||||
|
desc = "Format Injected Langs",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>cC",
|
||||||
|
":ConformInfo<CR>",
|
||||||
|
mode = { "n", "v" },
|
||||||
|
desc = "Conform Info",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
formatters_by_ft = {
|
||||||
|
lua = { "stylua" },
|
||||||
|
fish = { "fish_indent" },
|
||||||
|
sh = { "shfmt", "shellharden" },
|
||||||
|
python = { "isort", "black" },
|
||||||
|
bash = { "shfmt", "shellharden" },
|
||||||
|
javascript = { { "prettierd", "prettier", "rustywind" } },
|
||||||
|
javascriptreact = { { "prettierd", "prettier", "rustywind" } },
|
||||||
|
typescript = { { "prettierd", "prettier", "rustywind" } },
|
||||||
|
typescriptreact = { { "prettierd", "prettier", "rustywind" } },
|
||||||
|
vue = { { "prettierd", "prettier", "rustywind" } },
|
||||||
|
html = { { "prettierd", "prettier", "rustywind" } },
|
||||||
|
rust = { "rusfmt" },
|
||||||
|
go = { "gofumpt", "goimports" },
|
||||||
|
},
|
||||||
|
-- LazyVim will merge the options you set here with builtin formatters.
|
||||||
|
-- You can also define any custom formatters here.
|
||||||
|
---@type table<string,table>
|
||||||
|
formatters = {
|
||||||
|
injected = { options = { ignore_errors = true } },
|
||||||
|
-- -- Example of using dprint only when a dprint.json file is present
|
||||||
|
-- dprint = {
|
||||||
|
-- condition = function(ctx)
|
||||||
|
-- return vim.fs.find({ "dprint.json" }, { path = ctx.filename, upward = true })[1]
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
taplo = {
|
||||||
|
condition = function(ctx)
|
||||||
|
return vim.fs.find({ "Cargo.toml" }, { path = ctx.filename, upward = true })[1]
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,9 +1,8 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
event = "BufReadPost",
|
event = "LazyFile",
|
||||||
config = function()
|
enabled = true,
|
||||||
require("treesitter-context").setup()
|
opts = { mode = "cursor" },
|
||||||
end,
|
},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,104 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
|
|
||||||
dependencies = {
|
|
||||||
|
|
||||||
-- fancy UI for the debugger
|
|
||||||
{
|
|
||||||
"rcarriga/nvim-dap-ui",
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
|
||||||
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
|
||||||
},
|
|
||||||
opts = {},
|
|
||||||
config = function(_, opts)
|
|
||||||
local dap = require("dap")
|
|
||||||
local dapui = require("dapui")
|
|
||||||
dapui.setup(opts)
|
|
||||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
|
||||||
dapui.open({})
|
|
||||||
end
|
|
||||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
|
||||||
dapui.close({})
|
|
||||||
end
|
|
||||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
|
||||||
dapui.close({})
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- virtual text for the debugger
|
|
||||||
{
|
|
||||||
"theHamsta/nvim-dap-virtual-text",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- which key integration
|
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
optional = true,
|
|
||||||
opts = {
|
|
||||||
defaults = {
|
|
||||||
["<leader>d"] = { name = "+debug" },
|
|
||||||
["<leader>da"] = { name = "+adapters" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- mason.nvim integration
|
|
||||||
{
|
|
||||||
"jay-babu/mason-nvim-dap.nvim",
|
|
||||||
dependencies = "mason.nvim",
|
|
||||||
cmd = { "DapInstall", "DapUninstall" },
|
|
||||||
opts = {
|
|
||||||
-- Makes a best effort to setup the various debuggers with
|
|
||||||
-- reasonable debug configurations
|
|
||||||
automatic_installation = true,
|
|
||||||
|
|
||||||
-- You can provide additional configuration to the handlers,
|
|
||||||
-- see mason-nvim-dap README for more information
|
|
||||||
handlers = {},
|
|
||||||
|
|
||||||
-- You'll need to check that you have the required things installed
|
|
||||||
-- online, please don't ask me how to install them :)
|
|
||||||
ensure_installed = {
|
|
||||||
-- Update this to ensure that you have the debuggers for the langs you want
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- stylua: ignore
|
|
||||||
keys = {
|
|
||||||
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
|
|
||||||
{ "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
|
|
||||||
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to line (no execute)" },
|
|
||||||
{ "<leader>di", function() require("dap").step_into() end, desc = "Step Into" },
|
|
||||||
{ "<leader>dj", function() require("dap").down() end, desc = "Down" },
|
|
||||||
{ "<leader>dk", function() require("dap").up() end, desc = "Up" },
|
|
||||||
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
|
|
||||||
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
|
|
||||||
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
|
|
||||||
{ "<leader>dp", function() require("dap").pause() end, desc = "Pause" },
|
|
||||||
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
|
|
||||||
{ "<leader>ds", function() require("dap").session() end, desc = "Session" },
|
|
||||||
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
|
|
||||||
{ "<leader>dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
|
|
||||||
},
|
|
||||||
|
|
||||||
config = function()
|
|
||||||
local Config = require("lazyvim.config")
|
|
||||||
vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" })
|
|
||||||
|
|
||||||
for name, sign in pairs(Config.icons.dap) do
|
|
||||||
sign = type(sign) == "table" and sign or { sign }
|
|
||||||
vim.fn.sign_define(
|
|
||||||
"Dap" .. name,
|
|
||||||
{ text = sign[1], texthl = sign[2] or "DiagnosticInfo", linehl = sign[3], numhl = sign[3] }
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
75
.config/nvim/lua/plugins/dashboard.lua
Normal file
75
.config/nvim/lua/plugins/dashboard.lua
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"glepnir/dashboard-nvim",
|
||||||
|
event = "VimEnter",
|
||||||
|
opts = function()
|
||||||
|
local logo = [[
|
||||||
|
|
||||||
|
███████████ █████ ██
|
||||||
|
███████████ █████
|
||||||
|
████████████████ ███████████ ███ ███████
|
||||||
|
████████████████ ████████████ █████ ██████████████
|
||||||
|
██████████████ █████████████ █████ █████ ████ █████
|
||||||
|
██████████████████████████████████ █████ █████ ████ █████
|
||||||
|
██████ ███ █████████████████ ████ █████ █████ ████ ██████
|
||||||
|
]]
|
||||||
|
-- local logo = [[
|
||||||
|
-- ▄ ▄
|
||||||
|
-- ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄
|
||||||
|
-- █ ▄ █▄█ ▄▄▄ █ █▄█ █ █
|
||||||
|
-- ▄▄ █▄█▄▄▄█ █▄█▄█▄▄█▄▄█ █
|
||||||
|
-- ▄ █▄▄█ ▄ ▄▄ ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄
|
||||||
|
-- █▄▄▄▄ ▄▄▄ █ ▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄ █ ▄
|
||||||
|
-- ▄ █ █▄█ █▄█ █ █ █▄█ █ █▄█ ▄▄▄ █ █
|
||||||
|
-- █▄█ ▄ █▄▄█▄▄█ █ ▄▄█ █ ▄ █ █▄█▄█ █
|
||||||
|
-- █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█ █▄█▄▄▄█
|
||||||
|
-- ]]
|
||||||
|
|
||||||
|
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||||
|
|
||||||
|
local opts = {
|
||||||
|
theme = "doom",
|
||||||
|
hide = {
|
||||||
|
-- this is taken care of by lualine
|
||||||
|
-- enabling this messes up the actual laststatus setting after loading a file
|
||||||
|
statusline = false,
|
||||||
|
},
|
||||||
|
config = {
|
||||||
|
header = vim.split(logo, "\n"),
|
||||||
|
center = {
|
||||||
|
{ action = "Telescope find_files", desc = " Find file", icon = " ", key = "f" },
|
||||||
|
{ action = "ene | startinsert", desc = " New file", icon = " ", key = "n" },
|
||||||
|
{ action = "Telescope oldfiles", desc = " Recent files", icon = " ", key = "r" },
|
||||||
|
{ action = "Telescope live_grep", desc = " Find text", icon = " ", key = "g" },
|
||||||
|
{ action = "e $MYVIMRC", desc = " Config", icon = " ", key = "c" },
|
||||||
|
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
||||||
|
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||||
|
{ action = "qa", desc = " Quit", icon = " ", key = "q" },
|
||||||
|
},
|
||||||
|
footer = function()
|
||||||
|
local stats = require("lazy").stats()
|
||||||
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
|
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, button in ipairs(opts.config.center) do
|
||||||
|
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- close Lazy and re-open when the dashboard is ready
|
||||||
|
if vim.o.filetype == "lazy" then
|
||||||
|
vim.cmd.close()
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "DashboardLoaded",
|
||||||
|
callback = function()
|
||||||
|
require("lazy").show()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return opts
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
103
.config/nvim/lua/plugins/extras/dap.lua
Normal file
103
.config/nvim/lua/plugins/extras/dap.lua
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
|
||||||
|
dependencies = {
|
||||||
|
|
||||||
|
-- fancy UI for the debugger
|
||||||
|
{
|
||||||
|
"rcarriga/nvim-dap-ui",
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{ "<leader>du", function() require("dapui").toggle({ }) end, desc = "Dap UI" },
|
||||||
|
{ "<leader>de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} },
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
config = function(_, opts)
|
||||||
|
local dap = require("dap")
|
||||||
|
local dapui = require("dapui")
|
||||||
|
dapui.setup(opts)
|
||||||
|
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||||
|
dapui.open({})
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||||
|
dapui.close({})
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||||
|
dapui.close({})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- virtual text for the debugger
|
||||||
|
{
|
||||||
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- which key integration
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
defaults = {
|
||||||
|
["<leader>d"] = { name = "+debug" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- mason.nvim integration
|
||||||
|
{
|
||||||
|
"jay-babu/mason-nvim-dap.nvim",
|
||||||
|
dependencies = "mason.nvim",
|
||||||
|
cmd = { "DapInstall", "DapUninstall" },
|
||||||
|
opts = {
|
||||||
|
-- Makes a best effort to setup the various debuggers with
|
||||||
|
-- reasonable debug configurations
|
||||||
|
automatic_installation = true,
|
||||||
|
|
||||||
|
-- You can provide additional configuration to the handlers,
|
||||||
|
-- see mason-nvim-dap README for more information
|
||||||
|
handlers = {},
|
||||||
|
|
||||||
|
-- You'll need to check that you have the required things installed
|
||||||
|
-- online, please don't ask me how to install them :)
|
||||||
|
ensure_installed = {
|
||||||
|
-- Update this to ensure that you have the debuggers for the langs you want
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
|
||||||
|
{ "<leader>dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" },
|
||||||
|
{ "<leader>dg", function() require("dap").goto_() end, desc = "Go to line (no execute)" },
|
||||||
|
{ "<leader>di", function() require("dap").step_into() end, desc = "Step Into" },
|
||||||
|
{ "<leader>dj", function() require("dap").down() end, desc = "Down" },
|
||||||
|
{ "<leader>dk", function() require("dap").up() end, desc = "Up" },
|
||||||
|
{ "<leader>dl", function() require("dap").run_last() end, desc = "Run Last" },
|
||||||
|
{ "<leader>do", function() require("dap").step_out() end, desc = "Step Out" },
|
||||||
|
{ "<leader>dO", function() require("dap").step_over() end, desc = "Step Over" },
|
||||||
|
{ "<leader>dp", function() require("dap").pause() end, desc = "Pause" },
|
||||||
|
{ "<leader>dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" },
|
||||||
|
{ "<leader>ds", function() require("dap").session() end, desc = "Session" },
|
||||||
|
{ "<leader>dt", function() require("dap").terminate() end, desc = "Terminate" },
|
||||||
|
{ "<leader>dw", function() require("dap.ui.widgets").hover() end, desc = "Widgets" },
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
local Config = require("lazyvim.config")
|
||||||
|
vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" })
|
||||||
|
|
||||||
|
for name, sign in pairs(Config.icons.dap) do
|
||||||
|
sign = type(sign) == "table" and sign or { sign }
|
||||||
|
vim.fn.sign_define(
|
||||||
|
"Dap" .. name,
|
||||||
|
{ text = sign[1], texthl = sign[2] or "DiagnosticInfo", linehl = sign[3], numhl = sign[3] }
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
30
.config/nvim/lua/plugins/lint.lua
Normal file
30
.config/nvim/lua/plugins/lint.lua
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-lint",
|
||||||
|
event = "LazyFile",
|
||||||
|
opts = {
|
||||||
|
-- Event to trigger linters
|
||||||
|
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
|
||||||
|
linters_by_ft = {
|
||||||
|
fish = { "fish" },
|
||||||
|
markdown = { "markdownlint" },
|
||||||
|
python = { "pylint" },
|
||||||
|
yaml = { "yamllint" },
|
||||||
|
dockerfile = { "hadolint" },
|
||||||
|
},
|
||||||
|
-- LazyVim extension to easily override linter options
|
||||||
|
-- or add custom linters.
|
||||||
|
---@type table<string,table>
|
||||||
|
linters = {
|
||||||
|
-- -- Example of using selene only when a selene.toml file is present
|
||||||
|
-- selene = {
|
||||||
|
-- -- `condition` is another LazyVim extension that allows you to
|
||||||
|
-- -- dynamically enable/disable linters based on the context.
|
||||||
|
-- condition = function(ctx)
|
||||||
|
-- return vim.fs.find({ "selene.toml" }, { path = ctx.filename, upward = true })[1]
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,12 +1,12 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"aurum77/live-server.nvim",
|
"aurum77/live-server.nvim",
|
||||||
build = function()
|
build = function()
|
||||||
require("live_server.util").install()
|
require("live_server.util").install()
|
||||||
end,
|
end,
|
||||||
cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" },
|
cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" },
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>cs", "<cmd>LiveServer<CR>", desc = "Toggle LiveServer" },
|
{ "<leader>cL", "<cmd>LiveServer<CR>", desc = "Toggle LiveServer" },
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
9
.config/nvim/lua/plugins/lsp-lens.lua.bak
Normal file
9
.config/nvim/lua/plugins/lsp-lens.lua.bak
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"VidocqH/lsp-lens.nvim",
|
||||||
|
event = "BufReadPost",
|
||||||
|
config = function()
|
||||||
|
require("lsp-lens").setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
|
@ -1,94 +1,92 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
init = function()
|
init = function()
|
||||||
local keys = require("lazyvim.plugins.lsp.keymaps").get()
|
local keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||||
keys[#keys + 1] = { "gd", "<CMD>Glance definitions<CR>", desc = "Goto definition" }
|
keys[#keys + 1] = { "gd", "<CMD>Glance definitions<CR>", desc = "Goto definition" }
|
||||||
keys[#keys + 1] = { "gr", "<CMD>Glance references<CR>", desc = "References" }
|
keys[#keys + 1] = { "gr", "<CMD>Glance references<CR>", desc = "References" }
|
||||||
keys[#keys + 1] = { "gy", "<CMD>Glance type_definitions<CR>", desc = "Goto t[y]pe definitions" }
|
keys[#keys + 1] = { "gy", "<CMD>Glance type_definitions<CR>", desc = "Goto t[y]pe definitions" }
|
||||||
keys[#keys + 1] = { "gI", "<CMD>Glance implementations<CR>", desc = "Goto implementations" }
|
keys[#keys + 1] = { "gI", "<CMD>Glance implementations<CR>", desc = "Goto implementations" }
|
||||||
end,
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
-- options for vim.diagnostic.config()
|
-- options for vim.diagnostic.config()
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
underline = true,
|
underline = true,
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
virtual_text = {
|
virtual_text = {
|
||||||
spacing = 4,
|
spacing = 4,
|
||||||
source = "if_many",
|
source = "if_many",
|
||||||
prefix = "●",
|
prefix = "●",
|
||||||
-- this will set set the prefix to a function that returns the diagnostics icon based on the severity
|
-- this will set set the prefix to a function that returns the diagnostics icon based on the severity
|
||||||
-- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
|
-- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
|
||||||
-- prefix = "icons",
|
-- prefix = "icons",
|
||||||
float = {
|
float = {
|
||||||
border = {
|
border = {
|
||||||
{ "┌", "FloatBorder" },
|
{ "┌", "FloatBorder" },
|
||||||
{ "─", "FloatBorder" },
|
{ "─", "FloatBorder" },
|
||||||
{ "┐", "FloatBorder" },
|
{ "┐", "FloatBorder" },
|
||||||
{ "│", "FloatBorder" },
|
{ "│", "FloatBorder" },
|
||||||
{ "┘", "FloatBorder" },
|
{ "┘", "FloatBorder" },
|
||||||
{ "─", "FloatBorder" },
|
{ "─", "FloatBorder" },
|
||||||
{ "└", "FloatBorder" },
|
{ "└", "FloatBorder" },
|
||||||
{ "│", "FloatBorder" },
|
{ "│", "FloatBorder" },
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
severity_sort = true,
|
|
||||||
},
|
|
||||||
-- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0
|
|
||||||
-- Be aware that you also will need to properly configure your LSP server to
|
|
||||||
-- provide the inlay hints.
|
|
||||||
inlay_hints = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
-- add any global capabilities here
|
|
||||||
capabilities = {},
|
|
||||||
-- Automatically format on save
|
|
||||||
autoformat = true,
|
|
||||||
-- Enable this to show formatters used in a notification
|
|
||||||
-- Useful for debugging formatter issues
|
|
||||||
format_notify = false,
|
|
||||||
-- options for vim.lsp.buf.format
|
|
||||||
-- `bufnr` and `filter` is handled by the LazyVim formatter,
|
|
||||||
-- but can be also overridden when specified
|
|
||||||
format = {
|
|
||||||
formatting_options = nil,
|
|
||||||
timeout_ms = nil,
|
|
||||||
},
|
|
||||||
-- LSP Server Settings
|
|
||||||
---@type lspconfig.options
|
|
||||||
servers = {
|
|
||||||
jsonls = {},
|
|
||||||
lua_ls = {
|
|
||||||
-- mason = false, -- set to false if you don't want this server to be installed with mason
|
|
||||||
-- Use this to add any additional keymaps
|
|
||||||
-- for specific lsp servers
|
|
||||||
---@type LazyKeys[]
|
|
||||||
-- keys = {},
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
workspace = {
|
|
||||||
checkThirdParty = false,
|
|
||||||
},
|
|
||||||
completion = {
|
|
||||||
callSnippet = "Replace",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- you can do any additional lsp server setup here
|
|
||||||
-- return true if you don't want this server to be setup with lspconfig
|
|
||||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
|
||||||
setup = {
|
|
||||||
-- example to setup with typescript.nvim
|
|
||||||
-- tsserver = function(_, opts)
|
|
||||||
-- require("typescript").setup({ server = opts })
|
|
||||||
-- return true
|
|
||||||
-- end,
|
|
||||||
-- Specify * to use this function as a fallback for any server
|
|
||||||
-- ["*"] = function(server, opts) end,
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
severity_sort = true,
|
||||||
|
},
|
||||||
|
-- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0
|
||||||
|
-- Be aware that you also will need to properly configure your LSP server to
|
||||||
|
-- provide the inlay hints.
|
||||||
|
inlay_hints = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
-- add any global capabilities here
|
||||||
|
capabilities = {},
|
||||||
|
-- Enable this to show formatters used in a notification
|
||||||
|
-- Useful for debugging formatter issues
|
||||||
|
format_notify = false,
|
||||||
|
-- options for vim.lsp.buf.format
|
||||||
|
-- `bufnr` and `filter` is handled by the LazyVim formatter,
|
||||||
|
-- but can be also overridden when specified
|
||||||
|
format = {
|
||||||
|
formatting_options = nil,
|
||||||
|
timeout_ms = nil,
|
||||||
|
},
|
||||||
|
-- LSP Server Settings
|
||||||
|
---@type lspconfig.options
|
||||||
|
servers = {
|
||||||
|
jsonls = {},
|
||||||
|
lua_ls = {
|
||||||
|
-- mason = false, -- set to false if you don't want this server to be installed with mason
|
||||||
|
-- Use this to add any additional keymaps
|
||||||
|
-- for specific lsp servers
|
||||||
|
---@type LazyKeys[]
|
||||||
|
-- keys = {},
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
},
|
||||||
|
completion = {
|
||||||
|
callSnippet = "Replace",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- you can do any additional lsp server setup here
|
||||||
|
-- return true if you don't want this server to be setup with lspconfig
|
||||||
|
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||||
|
setup = {
|
||||||
|
-- example to setup with typescript.nvim
|
||||||
|
-- tsserver = function(_, opts)
|
||||||
|
-- require("typescript").setup({ server = opts })
|
||||||
|
-- return true
|
||||||
|
-- end,
|
||||||
|
-- Specify * to use this function as a fallback for any server
|
||||||
|
-- ["*"] = function(server, opts) end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,85 +1,104 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = function()
|
init = function()
|
||||||
local icons = require("lazyvim.config").icons
|
vim.g.lualine_laststatus = vim.o.laststatus
|
||||||
local Util = require("lazyvim.util")
|
if vim.fn.argc(-1) > 0 then
|
||||||
|
-- set an empty statusline till lualine loads
|
||||||
|
vim.o.statusline = " "
|
||||||
|
else
|
||||||
|
-- hide the statusline on the starter page
|
||||||
|
vim.o.laststatus = 0
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
opts = function()
|
||||||
|
-- PERF: we don't need this lualine require madness 🤷
|
||||||
|
local lualine_require = require("lualine_require")
|
||||||
|
lualine_require.require = require
|
||||||
|
|
||||||
return {
|
local icons = require("lazyvim.config").icons
|
||||||
options = {
|
local Util = require("lazyvim.util")
|
||||||
theme = "catppuccin",
|
|
||||||
globalstatus = true,
|
vim.o.laststatus = vim.g.lualine_laststatus
|
||||||
disabled_filetypes = { statusline = { "dashboard", "alpha" } },
|
|
||||||
component_separators = "",
|
return {
|
||||||
section_separators = { left = "", right = "" },
|
options = {
|
||||||
},
|
theme = "catppuccin",
|
||||||
sections = {
|
globalstatus = true,
|
||||||
lualine_a = { "mode" },
|
disabled_filetypes = { statusline = { "dashboard", "alpha", "starter" } },
|
||||||
lualine_b = { "branch" },
|
component_separators = "",
|
||||||
lualine_c = {
|
section_separators = { left = "", right = "" },
|
||||||
{
|
},
|
||||||
"diagnostics",
|
sections = {
|
||||||
symbols = {
|
lualine_a = { "mode" },
|
||||||
error = icons.diagnostics.Error,
|
lualine_b = { "branch" },
|
||||||
warn = icons.diagnostics.Warn,
|
lualine_c = {
|
||||||
info = icons.diagnostics.Info,
|
{
|
||||||
hint = icons.diagnostics.Hint,
|
"diagnostics",
|
||||||
},
|
symbols = {
|
||||||
},
|
error = icons.diagnostics.Error,
|
||||||
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
warn = icons.diagnostics.Warn,
|
||||||
{ "filename", path = 1, symbols = { modified = " ", readonly = "", unnamed = "" } },
|
info = icons.diagnostics.Info,
|
||||||
-- stylua: ignore
|
hint = icons.diagnostics.Hint,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
||||||
|
{
|
||||||
|
function()
|
||||||
|
return Util.root.pretty_path()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- stylua: ignore
|
||||||
{
|
{
|
||||||
function()
|
function()
|
||||||
local ok, m = pcall(require, "better_escape")
|
local ok, m = pcall(require, "better_escape")
|
||||||
return ok and m.waiting and "✺" or ""
|
return ok and m.waiting and "✺" or ""
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{
|
{
|
||||||
function() return require("noice").api.status.command.get() end,
|
function() return require("noice").api.status.command.get() end,
|
||||||
cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end,
|
cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end,
|
||||||
color = Util.fg("Statement"),
|
color = Util.ui.fg("Statement"),
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{
|
{
|
||||||
function() return require("noice").api.status.mode.get() end,
|
function() return require("noice").api.status.mode.get() end,
|
||||||
cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end,
|
cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end,
|
||||||
color = Util.fg("Constant"),
|
color = Util.ui.fg("Constant"),
|
||||||
},
|
},
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
{
|
{
|
||||||
function() return " " .. require("dap").status() end,
|
function() return " " .. require("dap").status() end,
|
||||||
cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end,
|
cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end,
|
||||||
color = Util.fg("Debug"),
|
color = Util.ui.fg("Debug"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
require("lazy.status").updates,
|
require("lazy.status").updates,
|
||||||
cond = require("lazy.status").has_updates,
|
cond = require("lazy.status").has_updates,
|
||||||
color = Util.fg("Special"),
|
color = Util.ui.fg("Special"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"diff",
|
"diff",
|
||||||
symbols = {
|
symbols = {
|
||||||
added = icons.git.added,
|
added = icons.git.added,
|
||||||
modified = icons.git.modified,
|
modified = icons.git.modified,
|
||||||
removed = icons.git.removed,
|
removed = icons.git.removed,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
lualine_y = {
|
||||||
lualine_y = {
|
{ "progress", separator = " ", padding = { left = 1, right = 1 } },
|
||||||
{ "progress", separator = " ", padding = { left = 1, right = 1 } },
|
},
|
||||||
},
|
lualine_z = {
|
||||||
lualine_z = {
|
{ "location", padding = { left = 1, right = 1 } },
|
||||||
{ "location", padding = { left = 1, right = 1 } },
|
},
|
||||||
},
|
},
|
||||||
},
|
extensions = { "neo-tree", "lazy" },
|
||||||
extensions = { "neo-tree", "lazy" },
|
}
|
||||||
}
|
end,
|
||||||
end,
|
},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,36 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"black",
|
"black",
|
||||||
"prettierd",
|
"prettierd",
|
||||||
"beautysh",
|
"codespell",
|
||||||
"codespell",
|
"csharpier",
|
||||||
"csharpier",
|
"css-lsp",
|
||||||
"css-lsp",
|
"cssmodules-language-server",
|
||||||
"cssmodules-language-server",
|
"ktlint",
|
||||||
"ktlint",
|
"hadolint",
|
||||||
"hadolint",
|
"html-lsp",
|
||||||
"html-lsp",
|
"rustywind",
|
||||||
"rustywind",
|
"sqlfmt",
|
||||||
"sqlfmt",
|
"markdownlint",
|
||||||
"markdownlint",
|
"stylua",
|
||||||
"marksman",
|
"shfmt",
|
||||||
"markuplint",
|
"angular-language-server",
|
||||||
"stylua",
|
"bash-language-server",
|
||||||
"shfmt",
|
"omnisharp",
|
||||||
"angular-language-server",
|
"sqlls",
|
||||||
"bash-language-server",
|
"goimports",
|
||||||
"omnisharp",
|
"shellharden",
|
||||||
"sqlls",
|
"codelldb",
|
||||||
},
|
"markdownlint",
|
||||||
},
|
"pylint",
|
||||||
|
"gofumpt",
|
||||||
|
"delve",
|
||||||
|
"impl",
|
||||||
|
"gomodifytags",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,116 +1,118 @@
|
||||||
|
local Util = require("lazyvim.util")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v3.x",
|
branch = "v3.x",
|
||||||
cmd = "Neotree",
|
cmd = "Neotree",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<leader>fe",
|
"<leader>fe",
|
||||||
function()
|
function()
|
||||||
require("neo-tree.command").execute({ toggle = true, dir = require("lazyvim.util").get_root() })
|
require("neo-tree.command").execute({ toggle = true, dir = Util.root() })
|
||||||
end,
|
|
||||||
desc = "Explorer NeoTree (root dir)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fE",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({ toggle = true, dir = vim.loop.cwd() })
|
|
||||||
end,
|
|
||||||
desc = "Explorer NeoTree (cwd)",
|
|
||||||
},
|
|
||||||
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
|
|
||||||
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
|
||||||
{
|
|
||||||
"<leader>ge",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
|
||||||
end,
|
|
||||||
desc = "Git explorer",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>be",
|
|
||||||
function()
|
|
||||||
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
|
||||||
end,
|
|
||||||
desc = "Buffer explorer",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
deactivate = function()
|
|
||||||
vim.cmd([[Neotree close]])
|
|
||||||
end,
|
end,
|
||||||
init = function()
|
desc = "Explorer NeoTree (root dir)",
|
||||||
if vim.fn.argc() == 1 then
|
},
|
||||||
local stat = vim.loop.fs_stat(vim.fn.argv(0))
|
{
|
||||||
if stat and stat.type == "directory" then
|
"<leader>fE",
|
||||||
require("neo-tree")
|
function()
|
||||||
end
|
require("neo-tree.command").execute({ toggle = true, dir = vim.loop.cwd() })
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
opts = {
|
desc = "Explorer NeoTree (cwd)",
|
||||||
sources = { "filesystem", "git_status", "buffers", "document_symbols" },
|
},
|
||||||
-- source_selector = {
|
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
|
||||||
-- winbar = true,
|
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
||||||
-- statusline = true,
|
{
|
||||||
-- },
|
"<leader>ge",
|
||||||
open_files_do_not_replace_types = { "terminal", "Trouble", "qf", "Outline" },
|
function()
|
||||||
enable_git_status = true,
|
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
||||||
enable_diagnostics = true,
|
|
||||||
filesystem = {
|
|
||||||
bind_to_cwd = false,
|
|
||||||
follow_current_file = { enabled = true },
|
|
||||||
use_libuv_file_watcher = true,
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
mappings = {
|
|
||||||
["<space>"] = "none",
|
|
||||||
["e"] = "open",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
default_component_configs = {
|
|
||||||
indent = {
|
|
||||||
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
|
||||||
expander_collapsed = "",
|
|
||||||
expander_expanded = "",
|
|
||||||
expander_highlight = "NeoTreeExpander",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
opts.event_handlers = opts.event_handlers or {}
|
|
||||||
|
|
||||||
local function on_move(data)
|
|
||||||
local clients = vim.lsp.get_active_clients()
|
|
||||||
for _, client in ipairs(clients) do
|
|
||||||
if client:supports_method("workspace/willRenameFiles") then
|
|
||||||
local resp = client.request_sync("workspace/willRenameFiles", {
|
|
||||||
files = {
|
|
||||||
{
|
|
||||||
oldUri = vim.uri_from_fname(data.source),
|
|
||||||
newUri = vim.uri_from_fname(data.destination),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}, 1000)
|
|
||||||
if resp and resp.result ~= nil then
|
|
||||||
vim.lsp.util.apply_workspace_edit(resp.result, client.offset_encoding)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local events = require("neo-tree.events")
|
|
||||||
vim.list_extend(opts.event_handlers, {
|
|
||||||
{ event = events.FILE_MOVED, handler = on_move },
|
|
||||||
{ event = events.FILE_RENAMED, handler = on_move },
|
|
||||||
})
|
|
||||||
require("neo-tree").setup(opts)
|
|
||||||
vim.api.nvim_create_autocmd("TermClose", {
|
|
||||||
pattern = "*lazygit",
|
|
||||||
callback = function()
|
|
||||||
if package.loaded["neo-tree.sources.git_status"] then
|
|
||||||
require("neo-tree.sources.git_status").refresh()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
end,
|
||||||
|
desc = "Git explorer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>be",
|
||||||
|
function()
|
||||||
|
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
||||||
|
end,
|
||||||
|
desc = "Buffer explorer",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
deactivate = function()
|
||||||
|
vim.cmd([[Neotree close]])
|
||||||
|
end,
|
||||||
|
init = function()
|
||||||
|
if vim.fn.argc() == 1 then
|
||||||
|
local stat = vim.loop.fs_stat(vim.fn.argv(0))
|
||||||
|
if stat and stat.type == "directory" then
|
||||||
|
require("neo-tree")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
opts = {
|
||||||
|
sources = { "filesystem", "git_status", "buffers", "document_symbols" },
|
||||||
|
-- source_selector = {
|
||||||
|
-- winbar = true,
|
||||||
|
-- statusline = true,
|
||||||
|
-- },
|
||||||
|
open_files_do_not_replace_types = { "terminal", "Trouble", "qf", "Outline" },
|
||||||
|
enable_git_status = true,
|
||||||
|
enable_diagnostics = true,
|
||||||
|
filesystem = {
|
||||||
|
bind_to_cwd = false,
|
||||||
|
follow_current_file = { enabled = true },
|
||||||
|
use_libuv_file_watcher = true,
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
mappings = {
|
||||||
|
["<space>"] = "none",
|
||||||
|
["e"] = "open",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
default_component_configs = {
|
||||||
|
indent = {
|
||||||
|
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
||||||
|
expander_collapsed = "",
|
||||||
|
expander_expanded = "",
|
||||||
|
expander_highlight = "NeoTreeExpander",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
opts.event_handlers = opts.event_handlers or {}
|
||||||
|
|
||||||
|
local function on_move(data)
|
||||||
|
local clients = vim.lsp.get_active_clients()
|
||||||
|
for _, client in ipairs(clients) do
|
||||||
|
if client:supports_method("workspace/willRenameFiles") then
|
||||||
|
local resp = client.request_sync("workspace/willRenameFiles", {
|
||||||
|
files = {
|
||||||
|
{
|
||||||
|
oldUri = vim.uri_from_fname(data.source),
|
||||||
|
newUri = vim.uri_from_fname(data.destination),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}, 1000)
|
||||||
|
if resp and resp.result ~= nil then
|
||||||
|
vim.lsp.util.apply_workspace_edit(resp.result, client.offset_encoding)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local events = require("neo-tree.events")
|
||||||
|
vim.list_extend(opts.event_handlers, {
|
||||||
|
{ event = events.FILE_MOVED, handler = on_move },
|
||||||
|
{ event = events.FILE_RENAMED, handler = on_move },
|
||||||
|
})
|
||||||
|
require("neo-tree").setup(opts)
|
||||||
|
vim.api.nvim_create_autocmd("TermClose", {
|
||||||
|
pattern = "*lazygit",
|
||||||
|
callback = function()
|
||||||
|
if package.loaded["neo-tree.sources.git_status"] then
|
||||||
|
require("neo-tree.sources.git_status").refresh()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"simrat39/symbols-outline.nvim",
|
|
||||||
event = "BufReadPost",
|
|
||||||
cmd = "SymbolsOutline",
|
|
||||||
keys = { { "<leader>ul", "<cmd>SymbolsOutline<cr>", desc = "Lsp Symbols Outline" } },
|
|
||||||
config = function()
|
|
||||||
require("symbols-outline").setup()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -39,7 +39,7 @@ return {
|
||||||
---@type TSConfig
|
---@type TSConfig
|
||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
opts = {
|
opts = {
|
||||||
autotag = { enable = true },
|
-- autotag = { enable = true },
|
||||||
endwise = { enable = true },
|
endwise = { enable = true },
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
|
|
|
@ -1,43 +1,44 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
plugins = { spelling = true },
|
plugins = { spelling = true },
|
||||||
defaults = {
|
defaults = {
|
||||||
mode = { "n", "v" },
|
mode = { "n", "v" },
|
||||||
["g"] = { name = "+goto" },
|
["g"] = { name = "+goto" },
|
||||||
["gs"] = { name = "+surround" },
|
["gs"] = { name = "+surround" },
|
||||||
["]"] = { name = "+next" },
|
["]"] = { name = "+next" },
|
||||||
["["] = { name = "+prev" },
|
["["] = { name = "+prev" },
|
||||||
["<leader><tab>"] = { name = "+tabs" },
|
["<leader><tab>"] = { name = "+tabs" },
|
||||||
["<leader>a"] = { name = "+annotation" },
|
["<leader>a"] = { name = "+annotation" },
|
||||||
["<leader>b"] = { name = "+buffer" },
|
["<leader>b"] = { name = "+buffer" },
|
||||||
["<leader>c"] = { name = "+code" },
|
["<leader>c"] = { name = "+code" },
|
||||||
["<leader>f"] = { name = "+file/find" },
|
["<leader>f"] = { name = "+file/find" },
|
||||||
["<leader>g"] = { name = "+git" },
|
["<leader>g"] = { name = "+git" },
|
||||||
["<leader>gh"] = { name = "+hunks" },
|
["<leader>gh"] = { name = "+hunks" },
|
||||||
["<leader>q"] = { name = "+quit/session" },
|
["<leader>q"] = { name = "+quit/session" },
|
||||||
["<leader>s"] = { name = "+search" },
|
["<leader>s"] = { name = "+search" },
|
||||||
["<leader>u"] = { name = "+ui" },
|
["<leader>u"] = { name = "+ui" },
|
||||||
["<leader>w"] = { name = "+windows" },
|
["<leader>w"] = { name = "+windows" },
|
||||||
["<leader>x"] = { name = "+diagnostics/quickfix" },
|
["<leader>x"] = { name = "+diagnostics/quickfix" },
|
||||||
["<leader>cc"] = { name = "+compile" },
|
["<leader>cc"] = { name = "+compile" },
|
||||||
["<leader>cp"] = { name = "+packages" },
|
["<leader>cp"] = { name = "+packages" },
|
||||||
["<leader>gd"] = { name = "+diff" },
|
["<leader>gd"] = { name = "+diff" },
|
||||||
["<leader>gw"] = { name = "+worktrees" },
|
["<leader>gw"] = { name = "+worktrees" },
|
||||||
["<leader>cR"] = { name = "+refactor" },
|
["<leader>cR"] = { name = "+refactor" },
|
||||||
["<leader>D"] = { name = "+database" },
|
["<leader>D"] = { name = "+database" },
|
||||||
["<leader>sS"] = { name = "+Goto Symbols (Workspace)" },
|
["<leader>sS"] = { name = "+Goto Symbols (Workspace)" },
|
||||||
["<leader>ss"] = { name = "+Goto Symbols" },
|
["<leader>ss"] = { name = "+Goto Symbols" },
|
||||||
["<leader>db"] = { name = "+Breakpoints" },
|
["<leader>db"] = { name = "+Breakpoints" },
|
||||||
["<leader>sr"] = { name = "+replace" },
|
["<leader>sr"] = { name = "+replace" },
|
||||||
},
|
["<leader>dP"] = { name = "+python" },
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
|
||||||
local wk = require("which-key")
|
|
||||||
wk.setup(opts)
|
|
||||||
wk.register(opts.defaults)
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
local wk = require("which-key")
|
||||||
|
wk.setup(opts)
|
||||||
|
wk.register(opts.defaults)
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue