all repos

init.lua @ 24780b5c61552067b2780c644d8035f21bdde3f1

my nvim config
5 files changed, 2 insertions(+), 48 deletions(-)
lsp: remove custom lsp commands, and unused options
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2025-09-08 16:20:04 +0300
Parent: 6ad9f0d
M lsp/gopls.lua

@@ -2,10 +2,7 @@ ---@return vim.lsp.Config

return { cmd = { "gopls" }, filetypes = { "go", "gomod", "gowork", "gotmpl" }, - root_markers = { - "go.mod", - "go.work", - }, + root_markers = { "go.mod", "go.work" }, settings = { gopls = { linksInHover = false,
M lsp/lua_ls.lua

@@ -10,7 +10,6 @@ ".stylua.toml",

"stylua.toml", "selene.toml", "selene.yml", - ".git", }, settings = { Lua = {
M lsp/markdown_oxide.lua

@@ -12,11 +12,4 @@ dynamicRegistration = true,

}, }, }, - on_attach = function(_, bufnr) - u.command(bufnr, "LspToday", { command = "jump", arguments = { "today" } }) - u.command(bufnr, "LspLastSunday", { - command = "jump", - arguments = { "last sunday" }, - }) - end, }
M lsp/ts_ls.lua

@@ -2,6 +2,7 @@ ---@return vim.lsp.Config

return { cmd = { "typescript-language-server", "--stdio" }, init_options = { hostInfo = "neovim" }, + root_markers = { "tsconfig.json", "jsconfig.json", "package.json" }, filetypes = { "javascript", "javascriptreact",

@@ -9,12 +10,6 @@ "javascript.jsx",

"typescript", "typescriptreact", "typescript.tsx", - }, - root_markers = { - "node_modules", - "tsconfig.json", - "jsconfig.json", - "package.json", }, handlers = { -- handle rename request for certain code actions like extracting functions / types

@@ -31,25 +26,4 @@ vim.lsp.buf.rename()

return vim.NIL end, }, - - on_attach = function(client) - -- ts_ls provides `source.*` code actions that apply to the whole file. These only appear in - -- `vim.lsp.buf.code_action()` if specified in `context.only`. - vim.api.nvim_buf_create_user_command( - 0, - "LspTypescriptSourceAction", - function() - local source_actions = vim.tbl_filter(function(action) - return vim.startswith(action, "source.") - end, client.server_capabilities.codeActionProvider.codeActionKinds) - - vim.lsp.buf.code_action { - context = { - only = source_actions, - }, - } - end, - {} - ) - end, }
M lua/core/utils.lua

@@ -25,15 +25,6 @@ capabilities = function(extend)

return require("blink.cmp").get_lsp_capabilities(extend or {}) end, - ---@param bufnr integer - ---@param name string - ---@param command lsp.ExecuteCommandParams - command = function(bufnr, name, command) - vim.api.nvim_buf_create_user_command(bufnr, name, function() - vim.lsp.buf.execute_command(command) - end, {}) - end, - ---get list of lsp servers connected to current buffer ---@return string[] get_clients = function()