Add shortcuts to navigate issues and buffer tabs
This commit is contained in:
parent
ed05721db1
commit
b8772ae9b4
2 changed files with 49 additions and 45 deletions
|
@ -57,6 +57,8 @@ return {
|
||||||
"goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
vim.keymap.set("n", "<A-left>", ":BufferPrevious<CR>", { desc = "Previous Buffer" }),
|
vim.keymap.set("n", "<A-left>", ":BufferPrevious<CR>", { desc = "Previous Buffer" }),
|
||||||
vim.keymap.set("n", "<A-right>", ":BufferNext<CR>", { desc = "Next Buffer" }),
|
vim.keymap.set("n", "<A-right>", ":BufferNext<CR>", { desc = "Next Buffer" }),
|
||||||
|
vim.keymap.set("n", "<A-h>", ":BufferPrevious<CR>", { desc = "Previous Buffer" }),
|
||||||
|
vim.keymap.set("n", "<A-l>", ":BufferNext<CR>", { desc = "Next Buffer" }),
|
||||||
vim.keymap.set("n", "<leader>bq", ":BufferClose<CR>", { desc = "Close Buffer" }),
|
vim.keymap.set("n", "<leader>bq", ":BufferClose<CR>", { desc = "Close Buffer" }),
|
||||||
vim.keymap.set("n", "<A-q>", ":BufferClose<CR>", { desc = "Close Buffer" }),
|
vim.keymap.set("n", "<A-q>", ":BufferClose<CR>", { desc = "Close Buffer" }),
|
||||||
vim.keymap.set("n", "<leader>bp", ":BufferPrevious<CR>", { desc = "Previous Buffer" }),
|
vim.keymap.set("n", "<leader>bp", ":BufferPrevious<CR>", { desc = "Previous Buffer" }),
|
||||||
|
|
|
@ -64,51 +64,53 @@ return {
|
||||||
"mason-org/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
"mason-org/mason-lspconfig.nvim",
|
"mason-org/mason-lspconfig.nvim",
|
||||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
lspconfig.ts_ls.setup({
|
lspconfig.ts_ls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
lspconfig.lua_ls.setup({ capabilities = capabilities })
|
lspconfig.lua_ls.setup({ capabilities = capabilities })
|
||||||
lspconfig.bashls.setup({
|
lspconfig.bashls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
cmd = { "bash-language-server", "start" },
|
cmd = { "bash-language-server", "start" },
|
||||||
filetypes = { "sh", "bash" },
|
filetypes = { "sh", "bash" },
|
||||||
})
|
})
|
||||||
lspconfig.gh_actions_ls.setup({ capabilities = capabilities })
|
lspconfig.gh_actions_ls.setup({ capabilities = capabilities })
|
||||||
-- lspconfig.helm_ls.setup({ capabilities = capabilities })
|
-- lspconfig.helm_ls.setup({ capabilities = capabilities })
|
||||||
lspconfig.jsonls.setup({ capabilities = capabilities })
|
lspconfig.jsonls.setup({ capabilities = capabilities })
|
||||||
lspconfig.basedpyright.setup({
|
lspconfig.basedpyright.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
settings = {
|
settings = {
|
||||||
basedpyright = {
|
basedpyright = {
|
||||||
analysis = {
|
analysis = {
|
||||||
typeCheckingMode = "off",
|
typeCheckingMode = "off",
|
||||||
diagnosticSeverityOverrides = {
|
diagnosticSeverityOverrides = {
|
||||||
reportUnusedImport = false,
|
reportUnusedImport = false,
|
||||||
reportUnusedVariable = false,
|
reportUnusedVariable = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
lspconfig.nginx_language_server.setup({ capabilities = capabilities })
|
lspconfig.nginx_language_server.setup({ capabilities = capabilities })
|
||||||
lspconfig.ruff.setup({
|
lspconfig.ruff.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
init_options = {
|
init_options = {
|
||||||
settings = {
|
settings = {
|
||||||
lineLength = 79,
|
lineLength = 79,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
lspconfig.yamlls.setup({ capabilities = capabilities })
|
lspconfig.yamlls.setup({ capabilities = capabilities })
|
||||||
vim.keymap.set("n", "<leader>vd", vim.lsp.buf.hover, { desc = "View Docstring" })
|
vim.keymap.set("n", "<leader>vd", vim.lsp.buf.hover, { desc = "View Docstring" })
|
||||||
vim.keymap.set("n", "<leader>gt", vim.lsp.buf.definition, { desc = "Go To Definition" })
|
vim.keymap.set("n", "<leader>gt", vim.lsp.buf.definition, { desc = "Go To Definition" })
|
||||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "Show Code Actions" })
|
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "Show Code Actions" })
|
||||||
vim.keymap.set("n", "<leader>cr", vim.lsp.buf.rename, { desc = "Refactor Name" })
|
vim.keymap.set("n", "<leader>cr", vim.lsp.buf.rename, { desc = "Refactor Name" })
|
||||||
vim.keymap.set("n", "<leader>vr", vim.lsp.buf.references, { desc = "View References" })
|
vim.keymap.set("n", "<leader>vr", vim.lsp.buf.references, { desc = "View References" })
|
||||||
end,
|
vim.keymap.set("n", "<leader>pp", vim.diagnostic.goto_prev, { desc = "Previous Issue" })
|
||||||
},
|
vim.keymap.set("n", "<leader>pn", vim.diagnostic.goto_next, { desc = "Next Issue" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue