advent of neovim is prompting some changes :D
This commit is contained in:
parent
f8bd90f45d
commit
802517b65b
@ -1,64 +1,84 @@
|
|||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
local map = vim.api.nvim_set_keymap
|
|
||||||
|
|
||||||
-- better up/down
|
-- better up/down
|
||||||
map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||||
map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
|
|
||||||
-- Move text up and down
|
-- Move text up and down
|
||||||
map("n", "<C-k>", "<ESC>:m .-2<CR>==", opts)
|
vim.keymap.set("n", "<C-k>", "<ESC>:m .-2<CR>==", opts)
|
||||||
map("n", "<C-j>", "<ESC>:m .+1<CR>==", opts)
|
vim.keymap.set("n", "<C-j>", "<ESC>:m .+1<CR>==", opts)
|
||||||
|
|
||||||
-- Move Lines
|
-- Move Lines
|
||||||
map("n", "<C-j>", ":m .+1<CR>==", { desc = "Move down" })
|
vim.keymap.set("n", "<C-j>", ":m .+1<CR>==", { desc = "Move down" })
|
||||||
map("v", "<C-j>", ":m '>+1<CR>gv=gv", { desc = "Move down" })
|
vim.keymap.set("v", "<C-j>", ":m '>+1<CR>gv=gv", { desc = "Move down" })
|
||||||
map("i", "<C-j>", "<Esc>:m .+1<CR>==gi", { desc = "Move down" })
|
vim.keymap.set("i", "<C-j>", "<Esc>:m .+1<CR>==gi", { desc = "Move down" })
|
||||||
map("n", "<C-k>", ":m .-2<CR>==", { desc = "Move up" })
|
vim.keymap.set("n", "<C-k>", ":m .-2<CR>==", { desc = "Move up" })
|
||||||
map("v", "<C-k>", ":m '<-2<CR>gv=gv", { desc = "Move up" })
|
vim.keymap.set("v", "<C-k>", ":m '<-2<CR>gv=gv", { desc = "Move up" })
|
||||||
map("i", "<C-k>", "<Esc>:m .-2<CR>==gi", { desc = "Move up" })
|
vim.keymap.set("i", "<C-k>", "<Esc>:m .-2<CR>==gi", { desc = "Move up" })
|
||||||
|
|
||||||
-- Clear search with <esc>
|
-- Clear search with <esc>
|
||||||
map("n", "<esc>", "<cmd>noh<cr><esc>", opts)
|
vim.keymap.set("n", "<esc>", "<cmd>noh<cr><esc>", opts)
|
||||||
map("i", "<esc>", "<cmd>noh<cr><esc>", opts)
|
vim.keymap.set("i", "<esc>", "<cmd>noh<cr><esc>", opts)
|
||||||
|
|
||||||
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
|
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
|
||||||
map("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
vim.keymap.set("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
||||||
map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
vim.keymap.set("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
||||||
map("o", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
vim.keymap.set("o", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
|
||||||
map("n", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
|
vim.keymap.set("n", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
|
||||||
map("x", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
|
vim.keymap.set("x", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
|
||||||
map("o", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
|
vim.keymap.set("o", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
|
||||||
|
|
||||||
-- Save
|
-- Save
|
||||||
map("n", "<C-s>", "<ESC>:w<CR>", opts)
|
vim.keymap.set("n", "<C-s>", "<ESC>:w<CR>", opts)
|
||||||
map("i", "<C-s>", "<ESC>:w<CR>", opts)
|
vim.keymap.set("i", "<C-s>", "<ESC>:w<CR>", opts)
|
||||||
|
|
||||||
-- Switch between buffers
|
-- Switch between buffers
|
||||||
map("n", "<S-l>", ":bnext<CR>", opts)
|
vim.keymap.set("n", "<S-l>", ":bnext<CR>", opts)
|
||||||
map("n", "<S-h>", ":bprevious<CR>", opts)
|
vim.keymap.set("n", "<S-h>", ":bprevious<CR>", opts)
|
||||||
|
|
||||||
-- center after up and down movements
|
-- center after up and down movements
|
||||||
map("n", "<C-u>", "<C-u>zz", opts)
|
vim.keymap.set("n", "<C-u>", "<C-u>zz", opts)
|
||||||
map("n", "<C-d>", "<C-d>zz", opts)
|
vim.keymap.set("n", "<C-d>", "<C-d>zz", opts)
|
||||||
|
|
||||||
-- Indenting
|
-- Indenting
|
||||||
map("v", "<", "<gv", opts)
|
vim.keymap.set("v", "<", "<gv", opts)
|
||||||
map("v", ">", ">gv", opts)
|
vim.keymap.set("v", ">", ">gv", opts)
|
||||||
|
|
||||||
-- move through quickfix list
|
-- move through quickfix list
|
||||||
map("n", "<C-l>", ":cnext<cr>zz", { noremap = true, silent = true, desc = "Next quickfix" })
|
vim.keymap.set("n", "<C-l>", ":cnext<cr>zz", { noremap = true, silent = true, desc = "Next quickfix" })
|
||||||
map("n", "<C-h>", ":cprev<cr>zz", { noremap = true, silent = true, desc = "Prev quickfix" })
|
vim.keymap.set("n", "<C-h>", ":cprev<cr>zz", { noremap = true, silent = true, desc = "Prev quickfix" })
|
||||||
map("n", "]q", ":cnext<cr>zz", { noremap = true, silent = true, desc = "Next quickfix" })
|
vim.keymap.set("n", "]q", ":cnext<cr>zz", { noremap = true, silent = true, desc = "Next quickfix" })
|
||||||
map("n", "[q", ":cprev<cr>zz", { noremap = true, silent = true, desc = "Prev quickfix" })
|
vim.keymap.set("n", "[q", ":cprev<cr>zz", { noremap = true, silent = true, desc = "Prev quickfix" })
|
||||||
|
|
||||||
|
-- thanks teej
|
||||||
|
vim.keymap.set("n", "<leader>xx", "<cmd>source %<CR>", { desc = "Source File" })
|
||||||
|
vim.keymap.set("n", "<leader>x", ":.lua<CR>", { desc = "Source Line" })
|
||||||
|
vim.keymap.set("v", "<leader>x", ":lua<CR>", { desc = "Source Selection" })
|
||||||
|
vim.keymap.set("n", "<leader>-", "<cmd>Oil<CR>")
|
||||||
|
vim.keymap.set("t", "<esc><esc>", "<c-\\><c-n>")
|
||||||
|
|
||||||
|
local job_id = 0
|
||||||
|
vim.keymap.set("n", "<leader>Ts", function()
|
||||||
|
vim.cmd.vnew()
|
||||||
|
vim.cmd.term()
|
||||||
|
vim.cmd.wincmd("J")
|
||||||
|
vim.api.nvim_win_set_width(0, 5)
|
||||||
|
|
||||||
|
job_id = vim.bo.channel
|
||||||
|
end, { desc = "Small Terminal" })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>gotest", function()
|
||||||
|
vim.fn.chansend(job_id, { "go test\r\n" })
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>Tf", "<cmd>FloatTerminal<cr>")
|
||||||
|
|
||||||
-- Thanks Prime
|
-- Thanks Prime
|
||||||
vim.keymap.set("x", "<leader>p", [["_dP]])
|
vim.keymap.set("x", "<leader>p", [["_dP]])
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
|
vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
|
||||||
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>d", [["_d]])
|
vim.keymap.set({ "n", "v" }, "<leader>d", [["_d]])
|
||||||
vim.keymap.set("i", "<C-c>", "<Esc>")
|
|
||||||
vim.keymap.set("n", "Q", "<nop>")
|
vim.keymap.set("n", "Q", "<nop>")
|
||||||
vim.keymap.set("n", "<leader>T", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
|
vim.keymap.set("n", "<leader>Tt", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
|
||||||
vim.keymap.set("n", "<leader>S", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
vim.keymap.set("n", "<leader>S", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], { desc = "search and replace" })
|
||||||
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
|
vim.keymap.set("n", "<leader>X", "<cmd>!chmod +x %<CR>", { silent = true, desc = "make me executable" })
|
||||||
|
|||||||
@ -19,6 +19,7 @@ vim.api.nvim_set_keymap("n", "<leader>L", "<cmd>:Lazy<cr>", { desc = "Lazy GUI"
|
|||||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||||
|
|
||||||
require("lazyvim.config").setup()
|
require("lazyvim.config").setup()
|
||||||
|
require("lazyvim.utils").setup()
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = "lazyvim.plugins",
|
spec = "lazyvim.plugins",
|
||||||
|
|||||||
@ -1,48 +1,49 @@
|
|||||||
return {
|
return {
|
||||||
-- {
|
{
|
||||||
-- "goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
-- event = "VimEnter",
|
enabled = false,
|
||||||
-- config = function()
|
event = "VimEnter",
|
||||||
-- local dashboard = require("alpha.themes.dashboard")
|
config = function()
|
||||||
--
|
local dashboard = require("alpha.themes.dashboard")
|
||||||
-- local function button(sc, txt, key, key_opts)
|
|
||||||
-- local b = dashboard.button(sc, txt, key, key_opts)
|
local function button(sc, txt, key, key_opts)
|
||||||
-- b.opts.hl_shortcut = "Macro"
|
local b = dashboard.button(sc, txt, key, key_opts)
|
||||||
-- return b
|
b.opts.hl_shortcut = "Macro"
|
||||||
-- end
|
return b
|
||||||
--
|
end
|
||||||
-- local icons = require("lazyvim.config.icons")
|
|
||||||
--
|
local icons = require("lazyvim.config.icons")
|
||||||
-- dashboard.section.header.val = {
|
|
||||||
-- [[ , __ ___ __. _ __ ` , _ , _ ]],
|
dashboard.section.header.val = {
|
||||||
-- [[ |' `. .' ` .' \ | / | |' `|' `.]],
|
[[ , __ ___ __. _ __ ` , _ , _ ]],
|
||||||
-- [[ | | |----' | | ` / | | | |]],
|
[[ |' `. .' ` .' \ | / | |' `|' `.]],
|
||||||
-- [[ / | `.___, `._.' \/ / / ' /]],
|
[[ | | |----' | | ` / | | | |]],
|
||||||
-- }
|
[[ / | `.___, `._.' \/ / / ' /]],
|
||||||
--
|
}
|
||||||
-- dashboard.section.buttons.val = {
|
|
||||||
-- button("f", icons.documents.Files .. " Find file", ":Telescope find_files <CR>"),
|
dashboard.section.buttons.val = {
|
||||||
-- button("e", icons.ui.NewFile .. " New file", ":ene <BAR> startinsert <CR>"),
|
button("f", icons.documents.Files .. " Find file", ":Telescope find_files <CR>"),
|
||||||
-- button("r", icons.ui.History .. " Recent files", ":Telescope oldfiles <CR>"),
|
button("e", icons.ui.NewFile .. " New file", ":ene <BAR> startinsert <CR>"),
|
||||||
-- button("t", icons.ui.List .. " Find text", ":Telescope live_grep <CR>"),
|
button("r", icons.ui.History .. " Recent files", ":Telescope oldfiles <CR>"),
|
||||||
-- button("c", icons.ui.Gear .. " Config", ":e ~/.config/nvim/init.lua <CR>"),
|
button("t", icons.ui.List .. " Find text", ":Telescope live_grep <CR>"),
|
||||||
-- button("u", icons.ui.CloudDownload .. " Update", ":Lazy<CR>"),
|
button("c", icons.ui.Gear .. " Config", ":e ~/.config/nvim/init.lua <CR>"),
|
||||||
-- button("q", icons.ui.SignOut .. " Quit", ":qa<CR>"),
|
button("u", icons.ui.CloudDownload .. " Update", ":Lazy<CR>"),
|
||||||
-- }
|
button("q", icons.ui.SignOut .. " Quit", ":qa<CR>"),
|
||||||
--
|
}
|
||||||
-- dashboard.section.footer.val = {
|
|
||||||
-- [[┬┌┐┌┬┌─┬ ┌─┐┌┬┐┌┐ ┬ ┌─┐┌┬┐┌─┐┌─┐┌┬┐]],
|
dashboard.section.footer.val = {
|
||||||
-- [[││││├┴┐│ ├┤ │ ├┴┐│ │ │ │ │ │ ││││]],
|
[[┬┌┐┌┬┌─┬ ┌─┐┌┬┐┌┐ ┬ ┌─┐┌┬┐┌─┐┌─┐┌┬┐]],
|
||||||
-- [[┴┘└┘┴ ┴┴─┘└─┘ ┴ └─┘┴─┘└─┘ ┴o└─┘└─┘┴ ┴]],
|
[[││││├┴┐│ ├┤ │ ├┴┐│ │ │ │ │ │ ││││]],
|
||||||
-- }
|
[[┴┘└┘┴ ┴┴─┘└─┘ ┴ └─┘┴─┘└─┘ ┴o└─┘└─┘┴ ┴]],
|
||||||
--
|
}
|
||||||
-- dashboard.section.header.opts.hl = "Include"
|
|
||||||
-- dashboard.section.buttons.opts.hl = "Macro"
|
dashboard.section.header.opts.hl = "Include"
|
||||||
-- dashboard.section.footer.opts.hl = "Type"
|
dashboard.section.buttons.opts.hl = "Macro"
|
||||||
--
|
dashboard.section.footer.opts.hl = "Type"
|
||||||
-- dashboard.opts.opts.noautocmd = true
|
|
||||||
--
|
dashboard.opts.opts.noautocmd = true
|
||||||
-- require("alpha").setup(dashboard.opts)
|
|
||||||
-- end,
|
require("alpha").setup(dashboard.opts)
|
||||||
-- },
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,46 @@
|
|||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
'saghen/blink.cmp',
|
||||||
|
-- optional: provides snippets for the snippet source
|
||||||
|
dependencies = 'rafamadriz/friendly-snippets',
|
||||||
|
|
||||||
|
-- use a release tag to download pre-built binaries
|
||||||
|
version = '*',
|
||||||
|
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
|
||||||
|
-- build = 'cargo build --release',
|
||||||
|
-- If you use nix, you can build from source using latest nightly rust with:
|
||||||
|
-- build = 'nix run .#build-plugin',
|
||||||
|
|
||||||
|
---@module 'blink.cmp'
|
||||||
|
---@type blink.cmp.Config
|
||||||
|
opts = {
|
||||||
|
-- 'default' for mappings similar to built-in completion
|
||||||
|
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
|
||||||
|
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
|
||||||
|
-- See the full "keymap" documentation for information on defining your own keymap.
|
||||||
|
keymap = { preset = 'enter' },
|
||||||
|
|
||||||
|
appearance = {
|
||||||
|
-- Sets the fallback highlight groups to nvim-cmp's highlight groups
|
||||||
|
-- Useful for when your theme doesn't support blink.cmp
|
||||||
|
-- Will be removed in a future release
|
||||||
|
use_nvim_cmp_as_default = true,
|
||||||
|
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||||
|
-- Adjusts spacing to ensure icons are aligned
|
||||||
|
nerd_font_variant = 'mono'
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Default list of enabled providers defined so that you can extend it
|
||||||
|
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||||
|
sources = {
|
||||||
|
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts_extend = { "sources.default" }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
|
enabled = false,
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
@ -8,22 +48,6 @@ return {
|
|||||||
"hrsh7th/cmp-emoji",
|
"hrsh7th/cmp-emoji",
|
||||||
"hrsh7th/cmp-buffer",
|
"hrsh7th/cmp-buffer",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
-- {
|
|
||||||
-- "zbirenbaum/copilot-cmp",
|
|
||||||
-- dependencies = "copilot.lua",
|
|
||||||
-- opts = {},
|
|
||||||
-- config = function(_, opts)
|
|
||||||
-- local copilot_cmp = require("copilot_cmp")
|
|
||||||
-- copilot_cmp.setup(opts)
|
|
||||||
-- -- attach cmp source whenever copilot attaches
|
|
||||||
-- -- fixes lazy-loading issues with the copilot cmp source
|
|
||||||
-- require("lazyvim.utils").on_attach(function(client)
|
|
||||||
-- if client.name == "copilot" then
|
|
||||||
-- copilot_cmp._on_insert_enter({})
|
|
||||||
-- end
|
|
||||||
-- end)
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
@ -70,20 +94,4 @@ return {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- {
|
|
||||||
-- "zbirenbaum/copilot-cmp",
|
|
||||||
-- dependencies = "copilot.lua",
|
|
||||||
-- opts = {},
|
|
||||||
-- config = function(_, opts)
|
|
||||||
-- local copilot_cmp = require("copilot_cmp")
|
|
||||||
-- copilot_cmp.setup(opts)
|
|
||||||
-- -- attach cmp source whenever copilot attaches
|
|
||||||
-- -- fixes lazy-loading issues with the copilot cmp source
|
|
||||||
-- require("lazyvim.utils").on_attach(function(client)
|
|
||||||
-- if client.name == "copilot" then
|
|
||||||
-- copilot_cmp._on_insert_enter({})
|
|
||||||
-- end
|
|
||||||
-- end)
|
|
||||||
-- end,
|
|
||||||
-- }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,24 +1,25 @@
|
|||||||
return {
|
return {
|
||||||
-- {
|
{
|
||||||
-- "zbirenbaum/copilot.lua",
|
"zbirenbaum/copilot.lua",
|
||||||
-- event = "VeryLazy",
|
enabled = false,
|
||||||
-- build = ":Copilot auth",
|
event = "VeryLazy",
|
||||||
-- opts = {
|
build = ":Copilot auth",
|
||||||
-- suggestion = {
|
opts = {
|
||||||
-- enabled = true,
|
suggestion = {
|
||||||
-- auto_trigger = true,
|
enabled = true,
|
||||||
-- keymap = {
|
auto_trigger = true,
|
||||||
-- accept = "<C-c>l",
|
keymap = {
|
||||||
-- next = "<C-c>]",
|
accept = "<C-c>l",
|
||||||
-- prev = "<C-c>[",
|
next = "<C-c>]",
|
||||||
-- dismiss = "<C-c>x",
|
prev = "<C-c>[",
|
||||||
-- },
|
dismiss = "<C-c>x",
|
||||||
-- },
|
},
|
||||||
-- panel = { enabled = true },
|
},
|
||||||
-- filetypes = {
|
panel = { enabled = true },
|
||||||
-- markdown = true,
|
filetypes = {
|
||||||
-- help = true,
|
markdown = true,
|
||||||
-- },
|
help = true,
|
||||||
-- },
|
},
|
||||||
-- }
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
return {
|
return {
|
||||||
-- {
|
{
|
||||||
-- "ray-x/go.nvim",
|
"ray-x/go.nvim",
|
||||||
-- requires = {
|
requires = {
|
||||||
-- "ray-x/guihua.lua",
|
"ray-x/guihua.lua",
|
||||||
-- "neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
-- "nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
-- },
|
},
|
||||||
-- config = function()
|
config = function()
|
||||||
-- require("go").setup()
|
require("go").setup()
|
||||||
-- end,
|
end,
|
||||||
-- event = { "CmdlineEnter" },
|
event = { "CmdlineEnter" },
|
||||||
-- ft = { "go", "gomod" },
|
ft = { "go", "gomod" },
|
||||||
-- build = ':lua require("go.install").update_all_sync()',
|
build = ':lua require("go.install").update_all_sync()',
|
||||||
-- },
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,18 +8,16 @@ function M.toggle()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function M.format()
|
function M.format()
|
||||||
-- TODO: work out how to call conform it it has a formatter and default
|
-- TODO: work out how to call conform if it has a formatter and default
|
||||||
-- to vim.lsp.buf.format()
|
-- to vim.lsp.buf.format()
|
||||||
|
|
||||||
vim.lsp.buf.format()
|
vim.lsp.buf.format()
|
||||||
|
|
||||||
-- local ok, conform = pcall(require, "conform")
|
if require("lazy.core.config").plugins["conform.nvim"]._.loaded then
|
||||||
--
|
require("conform.nvim").format()
|
||||||
-- if ok then
|
else
|
||||||
-- conform.format()
|
vim.lsp.buf.format()
|
||||||
-- else
|
end
|
||||||
-- vim.lsp.buf.format()
|
|
||||||
-- end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.on_attach(client, buf)
|
function M.on_attach(client, buf)
|
||||||
|
|||||||
@ -4,10 +4,20 @@ return {
|
|||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
event = "BufReadPre",
|
event = "BufReadPre",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "folke/neoconf.nvim", cmd = "Neoconf", config = true },
|
{
|
||||||
|
"folke/lazydev.nvim",
|
||||||
|
ft = "lua", -- only load on lua files
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
-- See the configuration section for more details
|
||||||
|
-- Load luvit types when the `vim.uv` word is found
|
||||||
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
"mason.nvim",
|
"mason.nvim",
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
-- "hrsh7th/cmp-nvim-lsp",
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
-- options for vim.diagnostic.config()
|
-- options for vim.diagnostic.config()
|
||||||
@ -109,7 +119,8 @@ return {
|
|||||||
"force",
|
"force",
|
||||||
{},
|
{},
|
||||||
vim.lsp.protocol.make_client_capabilities(),
|
vim.lsp.protocol.make_client_capabilities(),
|
||||||
require("cmp_nvim_lsp").default_capabilities(),
|
-- require("cmp_nvim_lsp").default_capabilities(),
|
||||||
|
require("blink.cmp").get_lsp_capabilities(),
|
||||||
opts.capabilities or {}
|
opts.capabilities or {}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,6 @@ function M.on_attach(client, buffer)
|
|||||||
|
|
||||||
local format = require("lazyvim.plugins.lsp.format").format
|
local format = require("lazyvim.plugins.lsp.format").format
|
||||||
self:map("<leader>lf", format, { desc = "Format Document", has = "documentFormatting" })
|
self:map("<leader>lf", format, { desc = "Format Document", has = "documentFormatting" })
|
||||||
self:map("<leader>lF", format, { desc = "Format Range", mode = "v", has = "documentRangeFormatting" })
|
|
||||||
self:map("<leader>lr", M.rename, { expr = true, desc = "Rename", has = "rename" })
|
self:map("<leader>lr", M.rename, { expr = true, desc = "Rename", has = "rename" })
|
||||||
|
|
||||||
if client.name == "tsserver" and pcall(require, "typescript") then
|
if client.name == "tsserver" and pcall(require, "typescript") then
|
||||||
|
|||||||
@ -3,6 +3,7 @@ local util = require("lazyvim.utils")
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
enabled = false,
|
||||||
branch = "v3.x",
|
branch = "v3.x",
|
||||||
cmd = "Neotree",
|
cmd = "Neotree",
|
||||||
keys = {
|
keys = {
|
||||||
|
|||||||
@ -1,130 +1,131 @@
|
|||||||
return {
|
return {
|
||||||
-- {
|
{
|
||||||
-- "kyazdani42/nvim-tree.lua",
|
"kyazdani42/nvim-tree.lua",
|
||||||
-- cmd = "NvimTreeToggle",
|
enabled = false,
|
||||||
-- config = function()
|
cmd = "NvimTreeToggle",
|
||||||
-- local nvim_tree = require("nvim-tree")
|
config = function()
|
||||||
-- local icons = require("lazyvim.config.icons")
|
local nvim_tree = require("nvim-tree")
|
||||||
--
|
local icons = require("lazyvim.config.icons")
|
||||||
-- local function edit_or_open()
|
|
||||||
-- -- open as vsplit on current node
|
local function edit_or_open()
|
||||||
-- local action = "edit"
|
-- open as vsplit on current node
|
||||||
-- local node = lib.get_node_at_cursor()
|
local action = "edit"
|
||||||
--
|
local node = lib.get_node_at_cursor()
|
||||||
-- -- Just copy what's done normally with vsplit
|
|
||||||
-- if node.link_to and not node.nodes then
|
-- Just copy what's done normally with vsplit
|
||||||
-- require("nvim-tree.actions.node.open-file").fn(action, node.link_to)
|
if node.link_to and not node.nodes then
|
||||||
-- view.close() -- Close the tree if file was opened
|
require("nvim-tree.actions.node.open-file").fn(action, node.link_to)
|
||||||
-- elseif node.nodes ~= nil then
|
view.close() -- Close the tree if file was opened
|
||||||
-- lib.expand_or_collapse(node)
|
elseif node.nodes ~= nil then
|
||||||
-- else
|
lib.expand_or_collapse(node)
|
||||||
-- require("nvim-tree.actions.node.open-file").fn(action, node.absolute_path)
|
else
|
||||||
-- view.close() -- Close the tree if file was opened
|
require("nvim-tree.actions.node.open-file").fn(action, node.absolute_path)
|
||||||
-- end
|
view.close() -- Close the tree if file was opened
|
||||||
-- end
|
end
|
||||||
--
|
end
|
||||||
-- nvim_tree.setup({
|
|
||||||
-- hijack_directories = {
|
nvim_tree.setup({
|
||||||
-- enable = false,
|
hijack_directories = {
|
||||||
-- },
|
enable = false,
|
||||||
-- ignore_ft_on_setup = {
|
},
|
||||||
-- "alpha",
|
ignore_ft_on_setup = {
|
||||||
-- },
|
"alpha",
|
||||||
-- filters = {
|
},
|
||||||
-- custom = { ".git" },
|
filters = {
|
||||||
-- exclude = { ".gitignore" },
|
custom = { ".git" },
|
||||||
-- },
|
exclude = { ".gitignore" },
|
||||||
-- hijack_cursor = false,
|
},
|
||||||
-- update_cwd = true,
|
hijack_cursor = false,
|
||||||
-- renderer = {
|
update_cwd = true,
|
||||||
-- add_trailing = false,
|
renderer = {
|
||||||
-- group_empty = false,
|
add_trailing = false,
|
||||||
-- highlight_git = false,
|
group_empty = false,
|
||||||
-- highlight_opened_files = "none",
|
highlight_git = false,
|
||||||
-- root_folder_modifier = ":t",
|
highlight_opened_files = "none",
|
||||||
-- indent_markers = {
|
root_folder_modifier = ":t",
|
||||||
-- enable = false,
|
indent_markers = {
|
||||||
-- icons = {
|
enable = false,
|
||||||
-- corner = "└ ",
|
icons = {
|
||||||
-- edge = "│ ",
|
corner = "└ ",
|
||||||
-- none = " ",
|
edge = "│ ",
|
||||||
-- },
|
none = " ",
|
||||||
-- },
|
},
|
||||||
-- icons = {
|
},
|
||||||
-- webdev_colors = true,
|
icons = {
|
||||||
-- git_placement = "before",
|
webdev_colors = true,
|
||||||
-- padding = " ",
|
git_placement = "before",
|
||||||
-- symlink_arrow = " ➛ ",
|
padding = " ",
|
||||||
-- show = {
|
symlink_arrow = " ➛ ",
|
||||||
-- file = true,
|
show = {
|
||||||
-- folder = true,
|
file = true,
|
||||||
-- folder_arrow = true,
|
folder = true,
|
||||||
-- git = true,
|
folder_arrow = true,
|
||||||
-- },
|
git = true,
|
||||||
-- glyphs = {
|
},
|
||||||
-- default = "",
|
glyphs = {
|
||||||
-- symlink = "",
|
default = "",
|
||||||
-- folder = {
|
symlink = "",
|
||||||
-- arrow_open = icons.ui.ArrowOpen,
|
folder = {
|
||||||
-- arrow_closed = icons.ui.ArrowClosed,
|
arrow_open = icons.ui.ArrowOpen,
|
||||||
-- default = "",
|
arrow_closed = icons.ui.ArrowClosed,
|
||||||
-- open = "",
|
default = "",
|
||||||
-- empty = "",
|
open = "",
|
||||||
-- empty_open = "",
|
empty = "",
|
||||||
-- symlink = "",
|
empty_open = "",
|
||||||
-- symlink_open = "",
|
symlink = "",
|
||||||
-- },
|
symlink_open = "",
|
||||||
-- git = {
|
},
|
||||||
-- unstaged = "",
|
git = {
|
||||||
-- staged = "S",
|
unstaged = "",
|
||||||
-- unmerged = "",
|
staged = "S",
|
||||||
-- renamed = "➜",
|
unmerged = "",
|
||||||
-- untracked = "U",
|
renamed = "➜",
|
||||||
-- deleted = "",
|
untracked = "U",
|
||||||
-- ignored = "◌",
|
deleted = "",
|
||||||
-- },
|
ignored = "◌",
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- diagnostics = {
|
},
|
||||||
-- enable = true,
|
diagnostics = {
|
||||||
-- icons = {
|
enable = true,
|
||||||
-- hint = icons.diagnostics.Hint,
|
icons = {
|
||||||
-- info = icons.diagnostics.Information,
|
hint = icons.diagnostics.Hint,
|
||||||
-- warning = icons.diagnostics.Warning,
|
info = icons.diagnostics.Information,
|
||||||
-- error = icons.diagnostics.Error,
|
warning = icons.diagnostics.Warning,
|
||||||
-- },
|
error = icons.diagnostics.Error,
|
||||||
-- },
|
},
|
||||||
-- update_focused_file = {
|
},
|
||||||
-- enable = true,
|
update_focused_file = {
|
||||||
-- update_cwd = true,
|
enable = true,
|
||||||
-- ignore_list = {},
|
update_cwd = true,
|
||||||
-- },
|
ignore_list = {},
|
||||||
-- git = {
|
},
|
||||||
-- enable = true,
|
git = {
|
||||||
-- ignore = true,
|
enable = true,
|
||||||
-- timeout = 500,
|
ignore = true,
|
||||||
-- },
|
timeout = 500,
|
||||||
-- view = {
|
},
|
||||||
-- width = 30,
|
view = {
|
||||||
-- hide_root_folder = false,
|
width = 30,
|
||||||
-- side = "left",
|
hide_root_folder = false,
|
||||||
-- number = false,
|
side = "left",
|
||||||
-- relativenumber = false,
|
number = false,
|
||||||
-- mappings = {
|
relativenumber = false,
|
||||||
-- custom_only = false,
|
mappings = {
|
||||||
-- list = {
|
custom_only = false,
|
||||||
-- { key = "l", action = "edit", action_cb = edit_or_open },
|
list = {
|
||||||
-- { key = "h", action = "close_node" },
|
{ key = "l", action = "edit", action_cb = edit_or_open },
|
||||||
-- },
|
{ key = "h", action = "close_node" },
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- actions = {
|
},
|
||||||
-- open_file = {
|
actions = {
|
||||||
-- quit_on_open = true,
|
open_file = {
|
||||||
-- },
|
quit_on_open = true,
|
||||||
-- },
|
},
|
||||||
-- })
|
},
|
||||||
-- end,
|
})
|
||||||
-- },
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
return {
|
return {
|
||||||
-- {
|
{
|
||||||
-- "ahmedkhalf/project.nvim",
|
"ahmedkhalf/project.nvim",
|
||||||
-- lazy = false,
|
enabled = false,
|
||||||
-- opts = {
|
lazy = false,
|
||||||
-- manual_mode = true,
|
opts = {
|
||||||
-- },
|
manual_mode = true,
|
||||||
-- config = function(opts)
|
},
|
||||||
-- require("project_nvim").setup(opts)
|
config = function(opts)
|
||||||
-- end,
|
require("project_nvim").setup(opts)
|
||||||
-- },
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
return {
|
return {
|
||||||
-- {
|
{
|
||||||
-- "windwp/nvim-spectre",
|
"windwp/nvim-spectre",
|
||||||
-- -- stylua: ignore
|
enabled = false,
|
||||||
-- keys = {
|
-- stylua: ignore
|
||||||
-- { "<leader>rr", function() require("spectre").open() end, desc = "Replace in files" },
|
keys = {
|
||||||
-- { "<leader>rw", function() require("spectre").open_visual({ select_word = true }) end, desc = "Relpace Word" },
|
{ "<leader>rr", function() require("spectre").open() end, desc = "Replace in files" },
|
||||||
-- { "<leader>rb", function() require("spectre").open_file_search() end, desc = "Relpace in Buffer" },
|
{ "<leader>rw", function() require("spectre").open_visual({ select_word = true }) end, desc = "Relpace Word" },
|
||||||
-- },
|
{ "<leader>rb", function() require("spectre").open_file_search() end, desc = "Relpace in Buffer" },
|
||||||
-- },
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,6 @@ return {
|
|||||||
{ "<leader>ht", "<cmd>Telescope builtin<cr>", desc = "Telescope" },
|
{ "<leader>ht", "<cmd>Telescope builtin<cr>", desc = "Telescope" },
|
||||||
{ "<leader>sb", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Telescope Buffer" },
|
{ "<leader>sb", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "Telescope Buffer" },
|
||||||
{ "<leader>sc", "<cmd>Telescope command_history<cr>", desc = "Telescope Command History" },
|
{ "<leader>sc", "<cmd>Telescope command_history<cr>", desc = "Telescope Command History" },
|
||||||
{ "<leader>sG", util.telescope("live_grep"), desc = "Telescope Grep (root dir)" },
|
|
||||||
{ "<leader>sg", util.telescope("live_grep", { cwd = false }), desc = "Telescope Grep (cwd)" },
|
{ "<leader>sg", util.telescope("live_grep", { cwd = false }), desc = "Telescope Grep (cwd)" },
|
||||||
{ "<leader>sm", "<cmd>Telescope marks<cr>", desc = "Telescope Jump to Mark" },
|
{ "<leader>sm", "<cmd>Telescope marks<cr>", desc = "Telescope Jump to Mark" },
|
||||||
{ "<leader>so", "<cmd>Telescope resume<cr>", desc = "Telescope Resume last search" },
|
{ "<leader>so", "<cmd>Telescope resume<cr>", desc = "Telescope Resume last search" },
|
||||||
@ -80,5 +79,8 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
config = function()
|
||||||
|
require "lazyvim.utils.telescope.multigrep".setup()
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,14 @@ return {
|
|||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
|
enable = true,
|
||||||
|
disable = function(lang, buf)
|
||||||
|
local max_filesize = 100 * 1024 -- 100 KB
|
||||||
|
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||||
|
if ok and stats and stats.size > max_filesize then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"treesitter-context",
|
"treesitter-context",
|
||||||
},
|
},
|
||||||
|
|||||||
@ -19,35 +19,36 @@ return {
|
|||||||
{
|
{
|
||||||
"nvim-lua/popup.nvim",
|
"nvim-lua/popup.nvim",
|
||||||
},
|
},
|
||||||
-- {
|
{
|
||||||
-- "rcarriga/nvim-notify",
|
"rcarriga/nvim-notify",
|
||||||
-- opts = {
|
enabled = false,
|
||||||
-- -- Animation style (see below for details)
|
opts = {
|
||||||
-- stages = "static",
|
-- Animation style (see below for details)
|
||||||
--
|
stages = "static",
|
||||||
-- -- Render function for notifications. See notify-render()
|
|
||||||
-- render = "default",
|
-- Render function for notifications. See notify-render()
|
||||||
--
|
render = "default",
|
||||||
-- -- Default timeout for notifications
|
|
||||||
-- timeout = 2000,
|
-- Default timeout for notifications
|
||||||
--
|
timeout = 2000,
|
||||||
-- -- For stages that change opacity this is treated as the highlight behind the window
|
|
||||||
-- -- Set this to either a highlight group or an RGB hex value e.g. "#000000"
|
-- For stages that change opacity this is treated as the highlight behind the window
|
||||||
-- background_colour = "Normal",
|
-- Set this to either a highlight group or an RGB hex value e.g. "#000000"
|
||||||
--
|
background_colour = "Normal",
|
||||||
-- -- Minimum width for notification windows
|
|
||||||
-- minimum_width = 10,
|
-- Minimum width for notification windows
|
||||||
--
|
minimum_width = 10,
|
||||||
-- -- Icons for the different levels
|
|
||||||
-- icons = {
|
-- Icons for the different levels
|
||||||
-- ERROR = icons.diagnostics.Error,
|
icons = {
|
||||||
-- WARN = icons.diagnostics.Warning,
|
ERROR = icons.diagnostics.Error,
|
||||||
-- INFO = icons.diagnostics.Information,
|
WARN = icons.diagnostics.Warning,
|
||||||
-- DEBUG = icons.ui.Bug,
|
INFO = icons.diagnostics.Information,
|
||||||
-- TRACE = icons.ui.Pencil,
|
DEBUG = icons.ui.Bug,
|
||||||
-- },
|
TRACE = icons.ui.Pencil,
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"echasnovski/mini.bufremove",
|
"echasnovski/mini.bufremove",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
@ -57,38 +58,39 @@ return {
|
|||||||
{ "<leader>bD", function() require("mini.bufremove").delete(0, true) end, desc = "Delete Buffer (Force)" },
|
{ "<leader>bD", function() require("mini.bufremove").delete(0, true) end, desc = "Delete Buffer (Force)" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- {
|
{
|
||||||
-- "ghillb/cybu.nvim",
|
"ghillb/cybu.nvim",
|
||||||
-- event = "VeryLazy",
|
enabled = false,
|
||||||
-- keys = {
|
event = "VeryLazy",
|
||||||
-- { "<leader>bl", "<cmd>CybuNext<cr>", desc = "Next Buffer" },
|
keys = {
|
||||||
-- { "<leader>bh", "<cmd>CybuPrev<cr>", desc = "Prev Buffer" },
|
{ "<leader>bl", "<cmd>CybuNext<cr>", desc = "Next Buffer" },
|
||||||
-- },
|
{ "<leader>bh", "<cmd>CybuPrev<cr>", desc = "Prev Buffer" },
|
||||||
-- opts = {
|
},
|
||||||
-- position = {
|
opts = {
|
||||||
-- relative_to = "win", -- win, editor, cursor
|
position = {
|
||||||
-- anchor = "topright", -- topleft, topcenter, topright,
|
relative_to = "win", -- win, editor, cursor
|
||||||
-- -- centerleft, center, centerright,
|
anchor = "topright", -- topleft, topcenter, topright,
|
||||||
-- -- bottomleft, bottomcenter, bottomright
|
-- centerleft, center, centerright,
|
||||||
-- -- vertical_offset = 10, -- vertical offset from anchor in lines
|
-- bottomleft, bottomcenter, bottomright
|
||||||
-- -- horizontal_offset = 0, -- vertical offset from anchor in columns
|
-- vertical_offset = 10, -- vertical offset from anchor in lines
|
||||||
-- -- max_win_height = 5, -- height of cybu window in lines
|
-- horizontal_offset = 0, -- vertical offset from anchor in columns
|
||||||
-- -- max_win_width = 0.5, -- integer for absolute in columns
|
-- max_win_height = 5, -- height of cybu window in lines
|
||||||
-- -- float for relative to win/editor width
|
-- max_win_width = 0.5, -- integer for absolute in columns
|
||||||
-- },
|
-- float for relative to win/editor width
|
||||||
-- display_time = 1750, -- time the cybu window is displayed
|
},
|
||||||
-- style = {
|
display_time = 1750, -- time the cybu window is displayed
|
||||||
-- separator = " ", -- string used as separator
|
style = {
|
||||||
-- prefix = "…", -- string used as prefix for truncated paths
|
separator = " ", -- string used as separator
|
||||||
-- padding = 1, -- left & right padding in number of spaces
|
prefix = "…", -- string used as prefix for truncated paths
|
||||||
-- hide_buffer_id = true,
|
padding = 1, -- left & right padding in number of spaces
|
||||||
-- devicons = {
|
hide_buffer_id = true,
|
||||||
-- enabled = true, -- enable or disable web dev icons
|
devicons = {
|
||||||
-- colored = true, -- enable color for web dev icons
|
enabled = true, -- enable or disable web dev icons
|
||||||
-- },
|
colored = true, -- enable color for web dev icons
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
-- },
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"mbbill/undotree",
|
"mbbill/undotree",
|
||||||
cmd = { "UndotreeToggle" },
|
cmd = { "UndotreeToggle" },
|
||||||
@ -103,17 +105,18 @@ return {
|
|||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
-- {
|
{
|
||||||
-- "windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
-- event = "VeryLazy",
|
enabled = false,
|
||||||
-- opts = {
|
event = "VeryLazy",
|
||||||
-- disable_filetype = { "TelescopePrompt", "spectre_panel" },
|
opts = {
|
||||||
-- ignored_next_char = "[%w%.*]", -- don't place autopairs when cursor sits infront of any character.
|
disable_filetype = { "TelescopePrompt", "spectre_panel" },
|
||||||
-- },
|
ignored_next_char = "[%w%.*]", -- don't place autopairs when cursor sits infront of any character.
|
||||||
-- config = function(_, opts)
|
},
|
||||||
-- require("nvim-autopairs").setup(opts)
|
config = function(_, opts)
|
||||||
-- end,
|
require("nvim-autopairs").setup(opts)
|
||||||
-- },
|
end,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"preservim/vim-markdown",
|
"preservim/vim-markdown",
|
||||||
},
|
},
|
||||||
|
|||||||
@ -140,7 +140,7 @@ return {
|
|||||||
{ "<leader>l", group = "lsp" },
|
{ "<leader>l", group = "lsp" },
|
||||||
{ "<leader>ll", "<cmd>lopen<cr>", desc = "Open Location List" },
|
{ "<leader>ll", "<cmd>lopen<cr>", desc = "Open Location List" },
|
||||||
{ "<leader>lq", "<cmd>copen<cr>", desc = "Open Quickfix List" },
|
{ "<leader>lq", "<cmd>copen<cr>", desc = "Open Quickfix List" },
|
||||||
{ "<leader>lx", "<cmd>cclose<cr>", desc = "Close Quickfix List" },
|
{ "<leader>lx", function() vim.diagnostic.setqflist() end, desc = "Open Quickfix List" },
|
||||||
})
|
})
|
||||||
|
|
||||||
-- C = {
|
-- C = {
|
||||||
|
|||||||
@ -2,6 +2,10 @@ local M = {}
|
|||||||
|
|
||||||
M.root_patterns = { ".git", "/lua" }
|
M.root_patterns = { ".git", "/lua" }
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
require "lazyvim.utils.term"
|
||||||
|
end
|
||||||
|
|
||||||
---@param on_attach fun(client, buffer)
|
---@param on_attach fun(client, buffer)
|
||||||
function M.on_attach(on_attach)
|
function M.on_attach(on_attach)
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user