Merge branch 'nixos' into nixos-work

This commit is contained in:
Moritz Böhme 2023-02-28 09:38:40 +01:00
commit 3e5922dd84
5 changed files with 49 additions and 16 deletions

View file

@ -52,6 +52,7 @@ in
gitsigns-nvim
lsp_lines-nvim
lspkind-nvim
lspsaga-nvim-original
lualine-lsp-progress
lualine-nvim
luasnip

View file

@ -259,18 +259,25 @@ vim.diagnostic.config({
-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers..
local capabilities = require("cmp_nvim_lsp").default_capabilities()
require("lspsaga").setup({
symbol_in_winbar = {
enable = false,
},
})
local lspconfig = require("lspconfig")
local on_attach_def = function(_, bufnr)
wk.register({
K = { vim.lsp.buf.hover, "show info" },
K = { "<cmd>Lspsaga hover_doc ++quiet<cr>", "show info" },
["<leader>"] = {
l = {
name = "lsp",
d = { vim.diagnostic.open_float, "open diagnostic window" },
n = { vim.diagnostic.goto_next, "next error" },
p = { vim.diagnostic.goto_prev, "prev error" },
c = { vim.lsp.buf.code_action, "code action" },
r = { vim.lsp.buf.rename, "rename" },
d = { "<cmd>Lspsaga show_cursor_diagnostics<cr>", "open diagnostic window" },
n = { "<cmd>Lspsaga diagnostic_jump_next<CR>", "next error" },
p = { "<cmd>Lspsaga diagnostic_jump_prev<CR>", "prev error" },
c = { "<cmd>Lspsaga code_action<cr>", "code action" },
r = { "<cmd>Lspsaga rename<cr>", "rename" },
i = { "<cmd>Lspsaga hover_doc ++keep<cr>", "show info (sticky)" },
f = {
function()
vim.lsp.buf.format({ async = true })
@ -297,11 +304,9 @@ local on_attach_def = function(_, bufnr)
},
g = {
name = "goto",
r = { vim.lsp.buf.references, "references" },
d = { vim.lsp.buf.definition, "definition" },
D = { vim.lsp.buf.declaration, "declaration" },
i = { vim.lsp.buf.implementation, "implementation" },
t = { vim.lsp.buf.type_definition, "type defininition" },
d = { "<cmd>Lspsaga peek_definition<cr>", "definition" },
t = { "<cmd>Lspsaga peek_type_definition<cr>", "type defininition" },
h = { "<cmd>Lspsaga lsp_finder<CR>", "lsp finder" },
},
}, { buffer = bufnr, silent = true })
end