my neovim config, who would've thought

lsp: remove custom lsp commands, and unused options

olexsmir.xyz 24780b5c 6ad9f0da

verified
+1 -4
lsp/gopls.lua
··· 2 2 return { 3 3 cmd = { "gopls" }, 4 4 filetypes = { "go", "gomod", "gowork", "gotmpl" }, 5 - root_markers = { 6 - "go.mod", 7 - "go.work", 8 - }, 5 + root_markers = { "go.mod", "go.work" }, 9 6 settings = { 10 7 gopls = { 11 8 linksInHover = false,
-1
lsp/lua_ls.lua
··· 10 10 "stylua.toml", 11 11 "selene.toml", 12 12 "selene.yml", 13 - ".git", 14 13 }, 15 14 settings = { 16 15 Lua = {
-7
lsp/markdown_oxide.lua
··· 12 12 }, 13 13 }, 14 14 }, 15 - on_attach = function(_, bufnr) 16 - u.command(bufnr, "LspToday", { command = "jump", arguments = { "today" } }) 17 - u.command(bufnr, "LspLastSunday", { 18 - command = "jump", 19 - arguments = { "last sunday" }, 20 - }) 21 - end, 22 15 }
+1 -27
lsp/ts_ls.lua
··· 2 2 return { 3 3 cmd = { "typescript-language-server", "--stdio" }, 4 4 init_options = { hostInfo = "neovim" }, 5 + root_markers = { "tsconfig.json", "jsconfig.json", "package.json" }, 5 6 filetypes = { 6 7 "javascript", 7 8 "javascriptreact", ··· 9 10 "typescript", 10 11 "typescriptreact", 11 12 "typescript.tsx", 12 - }, 13 - root_markers = { 14 - "node_modules", 15 - "tsconfig.json", 16 - "jsconfig.json", 17 - "package.json", 18 13 }, 19 14 handlers = { 20 15 -- handle rename request for certain code actions like extracting functions / types ··· 31 26 return vim.NIL 32 27 end, 33 28 }, 34 - 35 - on_attach = function(client) 36 - -- ts_ls provides `source.*` code actions that apply to the whole file. These only appear in 37 - -- `vim.lsp.buf.code_action()` if specified in `context.only`. 38 - vim.api.nvim_buf_create_user_command( 39 - 0, 40 - "LspTypescriptSourceAction", 41 - function() 42 - local source_actions = vim.tbl_filter(function(action) 43 - return vim.startswith(action, "source.") 44 - end, client.server_capabilities.codeActionProvider.codeActionKinds) 45 - 46 - vim.lsp.buf.code_action { 47 - context = { 48 - only = source_actions, 49 - }, 50 - } 51 - end, 52 - {} 53 - ) 54 - end, 55 29 }
-9
lua/core/utils.lua
··· 25 25 return require("blink.cmp").get_lsp_capabilities(extend or {}) 26 26 end, 27 27 28 - ---@param bufnr integer 29 - ---@param name string 30 - ---@param command lsp.ExecuteCommandParams 31 - command = function(bufnr, name, command) 32 - vim.api.nvim_buf_create_user_command(bufnr, name, function() 33 - vim.lsp.buf.execute_command(command) 34 - end, {}) 35 - end, 36 - 37 28 ---get list of lsp servers connected to current buffer 38 29 ---@return string[] 39 30 get_clients = function()