From af776e3b74dd739a9d1ee61b96860c791ebb6119 Mon Sep 17 00:00:00 2001 From: Marc Pervaz Boocha Date: Sun, 27 Apr 2025 20:01:09 +0530 Subject: Readded lspconfig --- .config/nvim/lsp/clangd.lua | 10 ----- .config/nvim/lsp/cssls.lua | 11 ------ .config/nvim/lsp/gopls.lua | 6 --- .config/nvim/lsp/html.lua | 11 ------ .config/nvim/lsp/jsonls.lua | 10 ----- .config/nvim/lsp/lua_ls.lua | 11 ------ .config/nvim/lsp/mesonlsp.lua | 9 ----- .config/nvim/lsp/ruff.lua | 10 ----- .config/nvim/lsp/ts_ls.lua | 44 +++++++--------------- .gitmodules | 3 ++ .local/bin/http-static | 5 +-- .local/share/nvim/site/pack/plugins/start/conform | 2 +- .../nvim/site/pack/plugins/start/nvim-lspconfig | 1 + .../nvim/site/pack/plugins/start/nvim-treesitter | 2 +- .zfunc/zsh-completions | 2 +- .zshrc | 2 - 16 files changed, 21 insertions(+), 118 deletions(-) delete mode 100644 .config/nvim/lsp/cssls.lua delete mode 100644 .config/nvim/lsp/html.lua delete mode 100644 .config/nvim/lsp/jsonls.lua delete mode 100644 .config/nvim/lsp/mesonlsp.lua delete mode 100644 .config/nvim/lsp/ruff.lua create mode 160000 .local/share/nvim/site/pack/plugins/start/nvim-lspconfig diff --git a/.config/nvim/lsp/clangd.lua b/.config/nvim/lsp/clangd.lua index 4f0b351..ce827a8 100644 --- a/.config/nvim/lsp/clangd.lua +++ b/.config/nvim/lsp/clangd.lua @@ -1,14 +1,4 @@ return { - cmd = { 'clangd' }, - filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda', 'proto' }, - root_markers = { - '.clangd', - '.clang-tidy', - '.clang-format', - 'compile_commands.json', - 'compile_flags.txt', - 'meson.build', - }, settings = { clangd = { InlayHints = { diff --git a/.config/nvim/lsp/cssls.lua b/.config/nvim/lsp/cssls.lua deleted file mode 100644 index 10b60ec..0000000 --- a/.config/nvim/lsp/cssls.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - cmd = { 'vscode-css-language-server', '--stdio' }, - filetypes = { 'css', 'scss', 'less' }, - init_options = { provideFormatter = true }, - root_markers = { 'package.json' }, - settings = { - css = { validate = true }, - scss = { validate = true }, - less = { validate = true }, - }, -} diff --git a/.config/nvim/lsp/gopls.lua b/.config/nvim/lsp/gopls.lua index e3d00bc..765a0d5 100644 --- a/.config/nvim/lsp/gopls.lua +++ b/.config/nvim/lsp/gopls.lua @@ -1,10 +1,4 @@ return { - cmd = { 'gopls' }, - filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' }, - root_markers = { - 'go.work', - 'go.mod', - }, settings = { gopls = { hints = { diff --git a/.config/nvim/lsp/html.lua b/.config/nvim/lsp/html.lua deleted file mode 100644 index cc769d5..0000000 --- a/.config/nvim/lsp/html.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - cmd = { 'vscode-html-language-server', '--stdio' }, - filetypes = { 'html', 'templ' }, - root_markers = { 'package.json' }, - settings = {}, - init_options = { - provideFormatter = true, - embeddedLanguages = { css = true, javascript = true }, - configurationSection = { 'html', 'css', 'javascript' }, - }, -} diff --git a/.config/nvim/lsp/jsonls.lua b/.config/nvim/lsp/jsonls.lua deleted file mode 100644 index 234cc94..0000000 --- a/.config/nvim/lsp/jsonls.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - cmd = { 'vscode-json-language-server', '--stdio' }, - filetypes = { 'json', 'jsonc' }, - init_options = { - provideFormatter = true, - }, - root_marker = {}, - single_file_support = true, -} - diff --git a/.config/nvim/lsp/lua_ls.lua b/.config/nvim/lsp/lua_ls.lua index 92e92fc..b4fd5c8 100644 --- a/.config/nvim/lsp/lua_ls.lua +++ b/.config/nvim/lsp/lua_ls.lua @@ -1,15 +1,4 @@ return { - cmd = { 'lua-language-server' }, - filetypes = { 'lua' }, - root_markers = { - '.luarc.json', - '.luarc.jsonc', - '.luacheckrc', - '.stylua.toml', - 'stylua.toml', - 'selene.toml', - 'selene.yml', - }, settings = { Lua = { runtime = { diff --git a/.config/nvim/lsp/mesonlsp.lua b/.config/nvim/lsp/mesonlsp.lua deleted file mode 100644 index 6e7dd5d..0000000 --- a/.config/nvim/lsp/mesonlsp.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - cmd = { 'mesonlsp', '--lsp' }, - filetypes = { 'meson' }, - root_markers = { - 'meson.build', - 'meson_options.txt', - 'meson.options' - }, -} diff --git a/.config/nvim/lsp/ruff.lua b/.config/nvim/lsp/ruff.lua deleted file mode 100644 index 0d174b3..0000000 --- a/.config/nvim/lsp/ruff.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - cmd = { 'ruff', 'server' }, - filetypes = { 'python' }, - root_marker = { - 'pyproject.toml', - 'ruff.toml', - '.ruff.toml' - }, - single_file_support = true, -} diff --git a/.config/nvim/lsp/ts_ls.lua b/.config/nvim/lsp/ts_ls.lua index 860951b..95a179d 100644 --- a/.config/nvim/lsp/ts_ls.lua +++ b/.config/nvim/lsp/ts_ls.lua @@ -1,39 +1,21 @@ +local inlayHints = { + includeInlayParameterNameHints = "all", + includeInlayParameterNameHintsWhenArgumentMatchesName = false, + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHints = true, + includeInlayVariableTypeHintsWhenTypeMatchesName = false, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, +} + return { - init_options = { hostInfo = 'neovim' }, - cmd = { 'typescript-language-server', '--stdio' }, - filetypes = { - 'javascript', - 'javascriptreact', - 'javascript.jsx', - 'typescript', - 'typescriptreact', - 'typescript.tsx', - }, - root_markers = { 'tsconfig.json', 'jsconfig.json', 'package.json'}, settings = { typescript = { - inlayHints = { - includeInlayParameterNameHints = "all", - includeInlayParameterNameHintsWhenArgumentMatchesName = false, - includeInlayFunctionParameterTypeHints = true, - includeInlayVariableTypeHints = true, - includeInlayVariableTypeHintsWhenTypeMatchesName = false, - includeInlayPropertyDeclarationTypeHints = true, - includeInlayFunctionLikeReturnTypeHints = true, - includeInlayEnumMemberValueHints = true, - }, + inlayHints = inlayHints, }, javascript = { - inlayHints = { - includeInlayParameterNameHints = "all", - includeInlayParameterNameHintsWhenArgumentMatchesName = false, - includeInlayFunctionParameterTypeHints = true, - includeInlayVariableTypeHints = true, - includeInlayVariableTypeHintsWhenTypeMatchesName = false, - includeInlayPropertyDeclarationTypeHints = true, - includeInlayFunctionLikeReturnTypeHints = true, - includeInlayEnumMemberValueHints = true, - }, + inlayHints = inlayHints, }, } } diff --git a/.gitmodules b/.gitmodules index a77df98..d4277e3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,6 @@ [submodule "zsh-completions"] path = .zfunc/zsh-completions url = https://github.com/zsh-users/zsh-completions.git +[submodule "nvim-lspconfig"] + path = .local/share/nvim/site/pack/plugins/start/nvim-lspconfig + url = https://github.com/neovim/nvim-lspconfig diff --git a/.local/bin/http-static b/.local/bin/http-static index 1d49eb7..9b189cc 100755 --- a/.local/bin/http-static +++ b/.local/bin/http-static @@ -37,10 +37,7 @@ def main(argv: Optional[Sequence[str]] = None) -> None: ) args = parser.parse_args(argv) - try: - serve(**vars(args)) - except KeyboardInterrupt: - pass + serve(**vars(args)) if __name__ == "__main__": diff --git a/.local/share/nvim/site/pack/plugins/start/conform b/.local/share/nvim/site/pack/plugins/start/conform index f9ef25a..372fc52 160000 --- a/.local/share/nvim/site/pack/plugins/start/conform +++ b/.local/share/nvim/site/pack/plugins/start/conform @@ -1 +1 @@ -Subproject commit f9ef25a7ef00267b7d13bfc00b0dea22d78702d5 +Subproject commit 372fc521f8421b7830ea6db4d6ea3bae1c77548c diff --git a/.local/share/nvim/site/pack/plugins/start/nvim-lspconfig b/.local/share/nvim/site/pack/plugins/start/nvim-lspconfig new file mode 160000 index 0000000..641e567 --- /dev/null +++ b/.local/share/nvim/site/pack/plugins/start/nvim-lspconfig @@ -0,0 +1 @@ +Subproject commit 641e567f975feab3815b47c7d29e6148e07afa77 diff --git a/.local/share/nvim/site/pack/plugins/start/nvim-treesitter b/.local/share/nvim/site/pack/plugins/start/nvim-treesitter index da5825b..3b30886 160000 --- a/.local/share/nvim/site/pack/plugins/start/nvim-treesitter +++ b/.local/share/nvim/site/pack/plugins/start/nvim-treesitter @@ -1 +1 @@ -Subproject commit da5825bf70cc2ea7eacd1e60c32c07baf19adeba +Subproject commit 3b308861a8d7d7bfbe9be51d52e54dcfd9fe3d38 diff --git a/.zfunc/zsh-completions b/.zfunc/zsh-completions index e61c9c1..e5507e0 160000 --- a/.zfunc/zsh-completions +++ b/.zfunc/zsh-completions @@ -1 +1 @@ -Subproject commit e61c9c14d6978191762e9586a0c882114e49221d +Subproject commit e5507e0d0c8879f960f4b8e7c6ddb813608d95ab diff --git a/.zshrc b/.zshrc index e568f25..c618c09 100644 --- a/.zshrc +++ b/.zshrc @@ -36,8 +36,6 @@ zstyle ':completion:*' rehash true zstyle ':completion:*:*:-command-:*:*' group-order alias builtins functions commands compinit -compdef dotfiles=git - bindkey -M menuselect 'h' vi-backward-char bindkey -M menuselect 'k' vi-up-line-or-history bindkey -M menuselect 'l' vi-forward-char -- cgit v1.2.3-70-g09d2