diff options
| author | JP Appel <jeanpierre.appel01@gmail.com> | 2025-09-29 00:33:17 -0400 |
|---|---|---|
| committer | JP Appel <jeanpierre.appel01@gmail.com> | 2025-09-29 00:33:17 -0400 |
| commit | fbee61c6fd16ab16b66c4b194941e2450c0c51db (patch) | |
| tree | c6253b7087a1560f47842f7765654d348deb99e8 /nvim/lua/plugins | |
| parent | 659299db5ba43bfdc8d8106e6ed012a40ab73eb8 (diff) | |
Diffstat (limited to 'nvim/lua/plugins')
| -rw-r--r-- | nvim/lua/plugins/filetypes.lua | 6 | ||||
| -rw-r--r-- | nvim/lua/plugins/lsp.lua | 32 |
2 files changed, 18 insertions, 20 deletions
diff --git a/nvim/lua/plugins/filetypes.lua b/nvim/lua/plugins/filetypes.lua index b6b5cd5..3759f71 100644 --- a/nvim/lua/plugins/filetypes.lua +++ b/nvim/lua/plugins/filetypes.lua @@ -3,9 +3,9 @@ return { 'vim-pandoc/vim-pandoc', enabled = false, ft = { "markdown", "pandoc" }, - keys = { - { 'gO', vim.cmd.TOC, desc = "Table of contents" } - } + -- keys = { + -- { 'gO', vim.cmd.TOC, desc = "Table of contents" } + -- } }, { 'vim-pandoc/vim-pandoc-syntax', diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua index f71ebda..d1f7e0e 100644 --- a/nvim/lua/plugins/lsp.lua +++ b/nvim/lua/plugins/lsp.lua @@ -42,8 +42,7 @@ local lspconfig = { desc = "Go to definition" }, { - -- TODO: consider changing binding to grf - '<leader>f', + 'grf', function() vim.lsp.buf.format() end, @@ -51,7 +50,7 @@ local lspconfig = { desc = "Format entire buffer" }, { - '<leader>f', + 'grf', function() local opts = {} local clients = vim.lsp.get_clients({ bufnr = 0 }) @@ -67,7 +66,17 @@ local lspconfig = { end, mode = { 'v' }, desc = "Format visual selection" - } + }, + { + 'K', + function() + vim.lsp.buf.hover({ + border = "single" + }) + end, + mode = {'n', 'v'}, + desc = "Open lsp hover" + }, } } @@ -77,6 +86,7 @@ local mason = { build = ":MasonUpdate" } +-- PERF: very slow to load local mason_lspconfig = { 'williamboman/mason-lspconfig.nvim', dependencies = { @@ -85,29 +95,17 @@ local mason_lspconfig = { opts = { ensure_installed = { "basedpyright", - "clangd", "cssls", - "gopls", "html", "ruff", "ts_ls" }, handlers = { + -- TODO: change config to vim.lsp.config function(server_name) require('lspconfig')[server_name].setup({}) end, - ["lua_ls"] = function() - require('lspconfig').lua_ls.setup({ - settings = { - Lua = { - diagnostics = { - globals = { "vim" } - } - } - } - }) - end, ["basedpyright"] = function() require('lspconfig').basedpyright.setup({ settings = { |
