diff --git a/config.lua b/config.lua index 003403d..e6a02e0 100644 --- a/config.lua +++ b/config.lua @@ -81,13 +81,14 @@ end ---@class lsp.config local lspconfig = {} ----# bash-language-server +-- NOTE: as of 15/05/2025, the LSP-server-specific naming conventions used here are described in https://github.com/neovim/nvim-lspconfig/blob/ac1dfbe3b60e5e23a2cff90e3bd6a3bc88031a57/CONTRIBUTING.md#walkthrough:~:text=When%20choosing%20a,(jsonnet_ls). + +---# Bash - bash_ls --- __Status__: Works --- __Site__: https://github.com/bash-lsp/bash-language-server ---- __Installation__: `npm i -g bash-language-server` ---- __Note__: also install `shellcheck` for linting -lspconfig.bashls = add_lsp { - name = "bash-language-server", +--- __Installation__: https://github.com/bash-lsp/bash-language-server?tab=readme-ov-file#installation +lspconfig.bash_ls = add_lsp { + name = "bash_ls", language = "shellscript", file_patterns = { "%.sh$" }, command = { "bash-language-server", "start" }, @@ -95,10 +96,10 @@ lspconfig.bashls = add_lsp { verbose = false } ----# ccls +---# C/C++ - ccls --- __Status__: Works --- __Site__: https://github.com/MaskRay/ccls/ ---- __Installation__: https://github.com/MaskRay/ccls/wiki +--- __Installation__: https://github.com/MaskRay/ccls/wiki/Install lspconfig.ccls = add_lsp { name = "ccls", language = { @@ -116,7 +117,7 @@ lspconfig.ccls = add_lsp { verbose = false } ----# clangd +---# C/C++ - clangd --- __Status__: Works --- __Site__: https://clangd.llvm.org/ --- __Installation__: install the clang software package on your system @@ -138,22 +139,22 @@ lspconfig.clangd = add_lsp { verbose = false } ----# Clojure ---- __Status__: Untested +---# Clojure - clojure_lsp +--- __Status__: Works --- __Site__: https://clojure-lsp.github.io/ --- __Installation__: https://clojure-lsp.github.io/clojure-lsp/installation/ lspconfig.clojure_lsp = add_lsp { - name = "clojure-lsp", + name = "clojure_lsp", language = "clojure", file_patterns = { "%.clj$", "%.cljs$", "%.clc$", "%.edn$" }, command = { "clojure-lsp" }, verbose = false } ----# Crystal +---# Crystal - crystalline --- __Status__: Works --- __Site__: https://github.com/elbywan/crystalline ---- __Installation__: 'paru -S crystalline-bin' +--- __Installation__: https://github.com/elbywan/crystalline?tab=readme-ov-file#installation lspconfig.crystalline = add_lsp { name = "crystalline", language = "crystal", @@ -162,13 +163,12 @@ lspconfig.crystalline = add_lsp { verbose = false } ----# vscode-css-languageserver +---# CSS - vscode_css_ls --- __Status__: Works --- __Site__: https://github.com/vscode-langservers/vscode-css-languageserver-bin ---- __Installation__: `npm install -g vscode-css-languageserver-bin` ---- or `pacman -S vscode-css-languageserver` -lspconfig.cssls = add_lsp { - name = "css-languageserver", +--- __Installation__: https://github.com/vscode-langservers/vscode-css-languageserver-bin?tab=readme-ov-file#installing +lspconfig.vscode_css_ls = add_lsp { + name = "vscode_css_ls", language = "css", file_patterns = { "%.css$", "%.less$", "%.sass$" }, command = { @@ -183,7 +183,19 @@ lspconfig.cssls = add_lsp { verbose = false } ----# D +---# C# - omnisharp +--- __Status__: Works, but freezes on large projects (https://github.com/ppy/osu.git) +--- __Site__: https://github.com/OmniSharp/omnisharp-roslyn +--- __Installation__: https://github.com/OmniSharp/omnisharp-roslyn?tab=readme-ov-file#downloading-omnisharp +lspconfig.omnisharp = add_lsp { + name = "omnisharp", + language = "csharp", + file_patterns = { "%.cs$" }, + command = { "omnisharp", "-lsp" }, + verbose = false +} + +---# D - serve_d --- __Status__: Works --- __Site__: https://github.com/Pure-D/serve-d --- __Installation__: https://github.com/Pure-D/serve-d?tab=readme-ov-file#installation @@ -195,24 +207,24 @@ lspconfig.serve_d = add_lsp { verbose = false } ----# dartls ---- __Status__: Untested +---# Dart - dartls +--- __Status__: Works --- __Site__: https://github.com/dart-lang/sdk ---- __Installation__: Provided in dart sdk +--- __Installation__: Provided by dart sdk lspconfig.dartls = add_lsp { - name = "dart", + name = "dartls", language = "dart", file_patterns = { "%.dart$" }, command = { "dart", "language-server", "--protocol=lsp" }, verbose = false } ----# Deno +---# Deno - deno_ls --- __Status__: Works --- __Site__: https://deno.land/manual/advanced/language_server --- __Installation__: Provided in Deno runtime -lspconfig.deno = add_lsp { - name = "deno", +lspconfig.deno_ls = add_lsp { + name = "deno_ls", language = { { id = "javascript", pattern = "%.js$" }, { id = "javascriptreact", pattern = "%.jsx$" }, @@ -220,7 +232,7 @@ lspconfig.deno = add_lsp { { id = "typescriptreact", pattern = "%.tsx$" }, }, file_patterns = { "%.[tj]s$", "%.[tj]sx$" }, - command = { 'deno', 'lsp' }, + command = { "deno", "lsp" }, verbose = false, settings = { deno = { @@ -253,96 +265,84 @@ lspconfig.deno = add_lsp { } } ----# Dockerfile +---# Dockerfile - dockerfile_ls_nodejs --- __Status__: Untested --- __Site__: https://github.com/rcjsuen/dockerfile-language-server-nodejs ---- __Installation__: `npm install -g dockerfile-language-server-nodejs` -lspconfig.dockerls = add_lsp { - name = "docker-langserver", +--- __Installation__: https://github.com/rcjsuen/dockerfile-language-server?tab=readme-ov-file#installation-instructions +lspconfig.dockerfile_ls_nodejs = add_lsp { + name = "dockerfile_ls_nodejs", language = "dockerfile", file_patterns = { "Dockerfile$" }, command = { "docker-langserver", "--stdio" }, verbose = false } ----# Elixir +---# Elixir - elixir_ls --- __Status__: Works --- __Site__: https://github.com/elixir-lsp/elixir-ls ---- __Installation__: 'paru -S elixir-ls' -lspconfig.elixirls = add_lsp { - name = "elixirls", +--- __Installation__: https://github.com/elixir-lsp/elixir-ls?tab=readme-ov-file#detailed-installation-instructions +lspconfig.elixir_ls = add_lsp { + name = "elixir_ls", language = "elixir", file_patterns = { "%.ex$", "%.exs$" }, command = { "elixir-ls" }, verbose = false } ----# Elm ---- __Status__: Untested +---# Elm - elm_ls +--- __Status__: Works --- __Site__: https://github.com/elm-tooling/elm-language-server ---- __Installation__: `paru -S elm-language-server` -lspconfig.elmls = add_lsp { - name = "elmls", +--- __Installation__: https://github.com/elm-tooling/elm-language-server?tab=readme-ov-file#installation +lspconfig.elm_ls = add_lsp { + name = "elm_ls", language = "elm", file_patterns = { "%.elm$" }, command = { "elm-language-server" }, verbose = false } ----# Erlang ---- __Status__: Untested +---# Erlang - erlang_ls +--- __Status__: Works --- __Site__: https://github.com/erlang-ls/erlang_ls ---- __Installation__: ? -lspconfig.erlangls = add_lsp { - name = "erlangls", +--- __Installation__: https://github.com/erlang-ls/erlang_ls?tab=readme-ov-file#quickstart +lspconfig.erlang_ls = add_lsp { + name = "erlang_ls", language = "erlang", file_patterns = { "%.erl$", "%.hrl$" }, - command = { 'Erlang', 'LS', '-t', 'stdio' }, + command = { "Erlang", "LS", "-t", "stdio" }, verbose = false } ----# Fennel - fennel-ls +---# Fennel - fennel_ls --- __Status__: Works --- __Site__: https://git.sr.ht/~xerool/fennel-ls --- __Installation__: https://git.sr.ht/~xerool/fennel-ls/tree/main/docs/manual.md#installation -lspconfig.fennells = add_lsp { - name = "fennel-ls", +lspconfig.fennel_ls = add_lsp { + name = "fennel_ls", language = "fennel", file_patterns = { "%.fnl$" }, command = { "fennel-ls" }, verbose = false } ----# Flow - JavaScript ---- __Status__: Untested ---- __Site__: https://flow.org/ ---- __Installation__: `npm install -g flow-bin` -lspconfig.flow = add_lsp { - name = "flow", - language = "javascript", - file_patterns = { "%.js$", "%.jsx$" }, - command = { "flow", "lsp" }, - verbose = false -} - ----# Fortran - fortls +---# Fortran - fort_ls --- __Status__: Works --- __Site__: https://fortls.fortran-lang.org/index.html ---- __Installation__: `paru -S fortls` -lspconfig.fortls = add_lsp { - name = "fortls", +--- __Installation__: https://fortls.fortran-lang.org/quickstart.html +lspconfig.fort_ls = add_lsp { + name = "fort_ls", language = "fortran", file_patterns = { "%.f$", "%.f90$", "%.f95$", "%.F$" }, command = { "fortls", "--notify_init" }, verbose = false } ----# Gleam +---# Gleam - gleam_ls --- __Status__: Works (the gleam lsp itself acts kinda weird) --- __Site__: https://gleam.run/ --- __Installation__: Included with the gleam compiler binary -lspconfig.gleam = add_lsp { - name = "gleam", +lspconfig.gleam_ls = add_lsp { + name = "gleam_ls", language = "gleam", file_patterns = { "%.gleam$" }, command = { "gleam", "lsp" }, @@ -361,10 +361,10 @@ lspconfig.glsl_analyzer = add_lsp { verbose = false } ----# gopls +---# Go - gopls --- __Status__: Works --- __Site__: https://pkg.go.dev/golang.org/x/tools/gopls ---- __Installation__: `go get -u golang.org/x/tools/gopls` +--- __Installation__: https://pkg.go.dev/golang.org/x/tools/gopls#readme-installation lspconfig.gopls = add_lsp { name = "gopls", language = "go", @@ -373,19 +373,13 @@ lspconfig.gopls = add_lsp { verbose = false } ----# groovy-language-server +---# Groovy - groovy_ls --- __Status__: Untested --- __Site__: https://github.com/prominic/groovy-language-server ---- __Installation__: ---- ```sh ---- mkdir ~/lsp ---- cd ~/lsp ---- git clone https://github.com/prominic/groovy-language-server.git ---- cd ~/lsp/groovy-language-server ---- ./gradlew build ---- ``` -lspconfig.groovyls = add_lsp { - name = "groovy-language-server", +--- __Installation__: either install from your OS's package manager or build from source +--- __Note__: how to build from source: https://github.com/GroovyLanguageServer/groovy-language-server?tab=readme-ov-file#build +lspconfig.groovy_ls = add_lsp { + name = "groovy_ls", language = "groovy", file_patterns = { "%.groovy$", "%.gvy$", "%.gy$", "%.gsh$" }, -- command = { "java", "-jar", "/path/to/groovy-language-server-all.jar" }, @@ -393,26 +387,24 @@ lspconfig.groovyls = add_lsp { verbose = false } ----# haskell-language-server +---# Haskell - haskell_ls --- __Status__: Untested --- __Site__: https://github.com/haskell/haskell-language-server ---- __Installation__: `ghcup install hls` ---- or https://github.com/haskell/haskell-language-server#installation -lspconfig.hls = add_lsp { - name = "haskell-language-server", +--- __Installation__: https://haskell-language-server.readthedocs.io/en/latest/installation.html +lspconfig.haskell_ls = add_lsp { + name = "haskell_ls", language = "haskell", file_patterns = { "%.hs$", "%.lhs$" }, - command = { 'haskell-language-server-wrapper', '--lsp' }, + command = { "haskell-language-server-wrapper", "--lsp" }, verbose = false } ----# vscode-html-languageserver +---# HTML - vscode_html_ls --- __Status__: Works --- __Site__: https://github.com/vscode-langservers/vscode-html-languageserver-bin ---- __Installation__: `npm install --global vscode-html-languageserver-bin` ---- or `pacman -S vscode-html-languageserver` -lspconfig.html = add_lsp { - name = "html-languageserver", +--- __Installation__: https://github.com/vscode-langservers/vscode-html-languageserver-bin?tab=readme-ov-file#installing +lspconfig.vscode_html_ls = add_lsp { + name = "vscode_html_ls", language = "html", file_patterns = { "%.html$" }, command = { @@ -426,25 +418,10 @@ lspconfig.html = add_lsp { verbose = false } ----# intelephense ---- __Status__: Works ---- __Site__: https://github.com/bmewburn/intelephense-docs ---- __Installation__: `npm -g install intelephense` ---- __Note__: Set your license and storage by passing the init_options as follows: ---- ```lua ---- init_options = { licenceKey = "...", storagePath = "/some/path"} ---- ``` -lspconfig.intelephense = add_lsp { - name = "intelephense", - language = "php", - file_patterns = { "%.php$" }, - command = { "intelephense", "--stdio" }, - verbose = false -} - ----# java +---# Java - jdtls --- __Status__: Works --- __Site__: https://github.com/eclipse/eclipse.jdt.ls +--- __Installation__: https://github.com/eclipse-jdtls/eclipse.jdt.ls?tab=readme-ov-file#installation lspconfig.jdtls = add_lsp { name = "jdtls", language = "java", @@ -453,25 +430,43 @@ lspconfig.jdtls = add_lsp { verbose = false } ----# Scala +---# Javascript - flow +--- __Status__: Untested +--- __Site__: https://flow.org/ +--- __Installation__: https://flow.org/en/docs/install/ +lspconfig.flow = add_lsp { + name = "flow", + language = "javascript", + file_patterns = { "%.js$", "%.jsx$" }, + command = { "flow", "lsp" }, + verbose = false +} + +---# Javascript - quick_lint_js --- __Status__: Works ---- __Site__: https://scalameta.org/metals/ ---- __Installation__: `paru -S metals` -lspconfig.metals = add_lsp { - name = "metals", - language = "scala", - file_patterns = { "%.scala$" }, - command = { "metals" }, +--- __Site__: https://github.com/quick-lint/quick-lint-js +--- __Installation__: https://github.com/quick-lint/quick-lint-js?tab=readme-ov-file#installing +lspconfig.quick_lint_js = add_lsp { + name = "quick_lint_js", + language = { + { id = "javascriptreact", pattern = "%.jsx$" }, + { id = "javascript", pattern = "%.js$" }, + { id = "typescriptdefinition", pattern = "%.d%.ts$" }, + { id = "typescriptsource", pattern = "%.ts$" }, + { id = "typescriptreact", pattern = "%.tsx$" }, + { id = "typescript", pattern = ".*" }, + }, + file_patterns = { "%.[mc]?jsx?$", "%.tsx?$" }, + command = { "quick-lint-js", "--lsp-server" }, verbose = false } ----# vscode-json-languageserver +---# JSON - vscode_json_ls --- __Status__: Works --- __Site__: https://www.npmjs.com/package/vscode-json-languageserver ---- __Installation__: `npm install -g vscode-json-languageserver` ---- or `pacman -S vscode-json-languageserver` -lspconfig.jsonls = add_lsp { - name = "json-languageserver", +--- __Installation__: https://www.npmjs.com/package/vscode-json-languageserver#integrate +lspconfig.vscode_json_ls = add_lsp { + name = "vscode_json_ls", language = "json", file_patterns = { "%.json$", "%.jsonc$" }, command = { @@ -485,47 +480,116 @@ lspconfig.jsonls = add_lsp { verbose = false } ----# kotlin-language-server ---- __Status__: Untested +---# Kotlin - kotlin_ls +--- __Status__: Works --- __Site__: https://github.com/fwcd/kotlin-language-server ---- __Installation__: https://github.com/fwcd/kotlin-language-server/releases -lspconfig.kotlin_language_server = add_lsp { - name = "kotlin-language-server", +--- __Installation__: https://github.com/fwcd/kotlin-language-server?tab=readme-ov-file#getting-started +lspconfig.kotlin_ls = add_lsp { + name = "kotlin_ls", language = "kotlin", file_patterns = { "%.kt$", "%.kts$", "%.ktm$" }, - command = { 'kotlin-language-server' }, + command = { "kotlin-language-server" }, verbose = false } ----# XML +---# LaTeX - texlab --- __Status__: Works ---- __Site__: https://github.com/eclipse/lemminx ---- __Installation__: 'paru -S lemminx' -lspconfig.lemminx = add_lsp { - name = "lemminx", - language = "xml", - file_patterns = { "%.xml$" }, - command = { "lemminx" }, +--- __Site__: https://github.com/latex-lsp/texlab +--- __Installation__: https://github.com/latex-lsp/texlab?tab=readme-ov-file#requirements +lspconfig.texlab = add_lsp { + name = "texlab", + language = "latex", + file_patterns = { "%.tex$", "%.bib$" , "%.dtx$", "%.sty$", "%.ins$", "%.cls$" }, + command = { "texlab" } +} + +---# Lua - lua_ls +--- __Status__: Works +--- __Site__: https://github.com/sumneko/lua-language-server +--- __Installation__: https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone) +lspconfig.lua_ls = add_lsp { + name = "lua_ls", + language = "lua", + file_patterns = { "%.lua$" }, + command = { "lua-language-server" }, + verbose = false, + settings = { + Lua = { + completion = { + enable = true, + callSnippet = snippets and "Replace" or "Disable", + keywordSnippet = snippets and "Replace" or "Disable" + }, + develop = { + enable = false, + debuggerPort = 11412, + debuggerWait = false + }, + diagnostics = { + enable = true, + }, + hover = { + enable = true, + viewNumber = true, + viewString = true, + viewStringMax = 1000 + }, + runtime = { + version = 'Lua 5.4', + path = { + "?.lua", + "?/init.lua", + "?/?.lua", + "/usr/share/5.4/?.lua", + "/usr/share/lua/5.4/?/init.lua" + } + }, + signatureHelp = { + enable = true + }, + workspace = { + library = { + DATADIR, + USERDIR + }, + maxPreload = 2000, + preloadFileSize = 1000 + }, + telemetry = { + enable = false + } + } + } +} + +---# Markdown - marksman +--- __Status__: Works +--- __Site__: https://github.com/artempyanykh/marksman +--- __Installation__: https://github.com/artempyanykh/marksman/blob/main/docs/install.md +lspconfig.marksman = add_lsp { + name = "marksman", + language = "Markdown", + file_patterns = { "%.md$" }, + command = { "marksman" }, verbose = false } ----# nil ---- __Status__: Works ---- __Site__: https://github.com/oxalica/nil ---- __Installation__: cargo install --git https://github.com/oxalica/nil nil ---- __Note__: nix >= 2.4 needs to be installed -lspconfig.nillsp = add_lsp { - name = "nil", +---# Nix - nil_ls +--- __Status__: Works +--- __Site__: https://github.com/oxalica/nil +--- __Installation__: https://github.com/oxalica/nil?tab=readme-ov-file#installation +lspconfig.nil_ls = add_lsp { + name = "nil_ls", language = "nix", file_patterns = { "%.nix$" }, command = { "nil" }, verbose = false } ----# nimlsp +---# Nim - nimlsp --- __Status__: Works --- __Site__: https://github.com/PMunch/nimlsp ---- __Installation__: `nimble install nimlsp` +--- __Installation__: https://github.com/PMunch/nimlsp?tab=readme-ov-file#installing-nimlsp lspconfig.nimlsp = add_lsp { name = "nimlsp", language = "nim", @@ -536,46 +600,34 @@ lspconfig.nimlsp = add_lsp { verbose = false } ----# ocaml-lsp +---# Ocaml - ocaml_lsp --- __Status__: Reported working on https://github.com/jgmdev/lite-xl-lsp/issues/17 --- __Site__: https://github.com/ocaml/ocaml-lsp --- __Installation__: https://github.com/ocaml/ocaml-lsp#installation lspconfig.ocaml_lsp = add_lsp { - name = "ocaml-lsp", + name = "ocaml_lsp", language = "ocaml", file_patterns = { "%.ml$", "%.mli$" }, command = { "ocamllsp" }, verbose = false } ----# Odin +---# Odin - ols --- __Status__: Works --- __Site__: https://github.com/DanielGavin/ols ---- __Installation__: `paru -S odinls` -lspconfig.odinls = add_lsp { - name = "odinls", +--- __Installation__: https://github.com/DanielGavin/ols?tab=readme-ov-file#installation +lspconfig.ols = add_lsp { + name = "ols", language = "odin", file_patterns = { "%.odin$" }, command = { "ols" }, verbose = false } ----# omnisharp ---- __Status__: Works but, freeze on large projects (https://github.com/ppy/osu.git) ---- __Site__: https://github.com/OmniSharp/omnisharp-roslyn ---- __Installation__: See official website for instructions -lspconfig.omnisharp = add_lsp { - name = "omnisharp", - language = "csharp", - file_patterns = { "%.cs$" }, - command = { "omnisharp", "-lsp" }, - verbose = false -} - ----# PerlNavigator - Perl +---# Perl - perlnavigator --- __Status__: Works --- __Site__: https://github.com/bscan/PerlNavigator ---- __Installation__: `paru -S perlnavigator` +--- __Installation__: https://github.com/bscan/PerlNavigator?tab=readme-ov-file#installation-for-other-editors lspconfig.perlnavigator = add_lsp { name = "perlnavigator", language = "perl", @@ -589,59 +641,67 @@ lspconfig.perlnavigator = add_lsp { } } ----# python-language-server +---# PHP - intelephense +--- __Status__: Works +--- __Site__: https://github.com/bmewburn/intelephense-docs +--- __Installation__: https://github.com/bmewburn/intelephense-docs/blob/master/installation.md +lspconfig.intelephense = add_lsp { + name = "intelephense", + language = "php", + file_patterns = { "%.php$" }, + command = { "intelephense", "--stdio" }, + verbose = false +} + +---# Python - python_ls_palantir --- __Status__: Works (deprecated in favor of python-lsp-server) --- __Site__: https://github.com/palantir/python-language-server ---- __Installation__: `pip install python-language-server` ---- __Note__: Also don't forget to install any additional optional dependencies ---- for additional features (see official site for details). -lspconfig.pyls = add_lsp { - name = "pyls", +--- __Installation__: https://github.com/palantir/python-language-server?tab=readme-ov-file#installation +lspconfig.python_ls_palantir = add_lsp { + name = "python_ls_palantir", language = "python", file_patterns = { "%.py$" }, - command = { 'pyls' }, + command = { "pyls" }, verbose = false } ----# python-lsp-server +---# Python - python_ls --- __Status__: Works --- __Site__: https://github.com/python-lsp/python-lsp-server ---- __Installation__: `pip install python-lsp-server` ---- __Note__: Also don't forget to install any additional optional dependencies ---- for additional features (see official site for details). -lspconfig.pylsp = add_lsp { - name = "pylsp", +--- __Installation__: https://github.com/python-lsp/python-lsp-server?tab=readme-ov-file#installation +lspconfig.python_ls = add_lsp { + name = "python_ls", language = "python", file_patterns = { "%.py$" }, - command = { 'pylsp' }, + command = { "pylsp" }, verbose = false } ---# pyright +--# Python - basedpyright --- __Status__: Works ---- __Site__: https://github.com/microsoft/pyright ---- __Installation__: `pip install pyright` or `npm install -g pyright` -lspconfig.pyright = add_lsp { - name = "pyright", +--- __Site__: https://github.com/DetachHead/basedpyright +--- __Installation__: `pip install basedpyright` or `npm install -g basedpyright` +lspconfig.basedpyright = add_lsp { + name = "basedpyright", language = "python", file_patterns = { "%.py$" }, - command = { "pyright-langserver", "--stdio" }, + command = { "basedpyright-langserver", "--stdio" }, verbose = false } ---# basedpyright +--# Python - pyright --- __Status__: Works ---- __Site__: https://github.com/DetachHead/basedpyright ---- __Installation__: `pip install basedpyright` or `npm install -g basedpyright` -lspconfig.basedpyright = add_lsp { - name = "basedpyright", +--- __Site__: https://github.com/microsoft/pyright +--- __Installation__: https://microsoft.github.io/pyright/#/installation +lspconfig.pyright = add_lsp { + name = "pyright", language = "python", file_patterns = { "%.py$" }, - command = { "basedpyright-langserver", "--stdio" }, + command = { "pyright-langserver", "--stdio" }, verbose = false } ---# ruff +--# Python- ruff --- __Status__: Works --- __Site__: https://github.com/astral-sh/ruff --- __Installation__: `pip install ruff` or `uv tool install ruff` @@ -653,46 +713,15 @@ lspconfig.ruff = add_lsp { verbose = false } ----# quick-lint-js ---- __Status__: Works ---- __Site__: https://github.com/quick-lint/quick-lint-js ---- __Installation__: Arch Linux: `yay -Syu quick-lint-js` -lspconfig.quicklintjs = add_lsp { - name = "quick-lint-js", - language = { - { id = "javascriptreact", pattern = "%.jsx$" }, - { id = "javascript", pattern = "%.js$" }, - { id = "typescriptdefinition", pattern = "%.d%.ts$" }, - { id = "typescriptsource", pattern = "%.ts$" }, - { id = "typescriptreact", pattern = "%.tsx$" }, - { id = "typescript", pattern = ".*" }, - }, - file_patterns = { "%.[mc]?jsx?$", "%.tsx?$" }, - command = { "quick-lint-js", "--lsp-server" }, - verbose = false -} - ----# R +---# R - r_ls -- __Status__: Works --- __Site__:https://github.com/REditorSupport/languageserver#installation --- __Installation__: `paru -S r-languageserver` -lspconfig.rlanguageserver = add_lsp { - name = "rlanguageserver", +-- __Site__: https://github.com/REditorSupport/languageserver +-- __Installation__: https://github.com/REditorSupport/languageserver#installation +lspconfig.r_ls = add_lsp { + name = "r_ls", language = "r", file_patterns = { "%.r$", "%.R$" }, - command = {'R', '--slave', '-e', 'languageserver::run()'}, - verbose = false -} - ----# Rust Language Server ---- __Status__: Works ---- __Site__: https://github.com/rust-lang/rls ---- __Installation__: Install rust on your system -lspconfig.rls = add_lsp { - name = "rust-language-server", - language = "rust", - file_patterns = { "%.rs$" }, - command = { 'rls' }, + command = {"R", "--slave", "-e", "languageserver::run()"}, verbose = false } @@ -732,168 +761,96 @@ lspconfig.ruby_lsp = add_lsp { verbose = false } ----# Rust Analyzer ---- __Status__: Works ---- __Site__: https://rust-analyzer.github.io/ ---- __Installation__: See official website for instructions -lspconfig.rust_analyzer = add_lsp { - name = "rust-analyzer", - language = "rust", - file_patterns = { "%.rs$" }, - command = { 'rust-analyzer' }, - verbose = false -} - ----# Solargraph +---# Ruby - solargraph --- __Status__: Untested --- __Site__: https://github.com/castwide/solargraph ---- __Installation__: `gem install solargraph` +--- __Installation__: https://github.com/castwide/solargraph?tab=readme-ov-file#installation lspconfig.solargraph = add_lsp { name = "solargraph", language = "ruby", file_patterns = { "%.rb$" }, - command = { 'solargraph', 'stdio' }, + command = { "solargraph", "stdio" }, verbose = false } ----# sql-language-server +---# Rust - rust_ls --- __Status__: Works ---- __Site__: https://github.com/joe-re/sql-language-server ---- __Installation__: `npm i -g sql-language-server` -lspconfig.sqlls = add_lsp { - name = "sql-language-server", - language = "sql", - file_patterns = { "%.sql$" }, - command = { 'sql-language-server', 'up', '--method', 'stdio' }, +--- __Site__: https://github.com/rust-lang/rls +--- __Installation__: https://github.com/rust-lang/rls?tab=readme-ov-file#setup +lspconfig.rust_ls = add_lsp { + name = "rust_ls", + language = "rust", + file_patterns = { "%.rs$" }, + command = { "rls" }, verbose = false } ----# lua-language-server +---# Rust - rust_analyzer --- __Status__: Works ---- __Site__: https://github.com/sumneko/lua-language-server ---- __Installation__: https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone) -lspconfig.sumneko_lua = add_lsp { - name = "lua-language-server", - language = "lua", - file_patterns = { "%.lua$" }, - command = { 'lua-language-server' }, - verbose = false, - settings = { - Lua = { - completion = { - enable = true, - callSnippet = snippets and "Replace" or "Disable", - keywordSnippet = snippets and "Replace" or "Disable" - }, - develop = { - enable = false, - debuggerPort = 11412, - debuggerWait = false - }, - diagnostics = { - enable = true, - }, - hover = { - enable = true, - viewNumber = true, - viewString = true, - viewStringMax = 1000 - }, - runtime = { - version = 'Lua 5.4', - path = { - "?.lua", - "?/init.lua", - "?/?.lua", - "/usr/share/5.4/?.lua", - "/usr/share/lua/5.4/?/init.lua" - } - }, - signatureHelp = { - enable = true - }, - workspace = { - library = { - DATADIR, - USERDIR - }, - maxPreload = 2000, - preloadFileSize = 1000 - }, - telemetry = { - enable = false - } - } - } +--- __Site__: https://rust-analyzer.github.io/ +--- __Installation__: https://rust-analyzer.github.io/manual.html#installation +lspconfig.rust_analyzer = add_lsp { + name = "rust_analyzer", + language = "rust", + file_patterns = { "%.rs$" }, + command = { "rust-analyzer" }, + verbose = false } ----# Markdown - marksman +---# Scala - metals --- __Status__: Works ---- __Site__: https://github.com/artempyanykh/marksman ---- __Installation__: https://github.com/artempyanykh/marksman/blob/main/docs/install.md -lspconfig.marksman = add_lsp { - name = "marksman", - language = "Markdown", - file_patterns = { "%.md$" }, - command = { "marksman" }, +--- __Site__: https://scalameta.org/metals/ +--- __Installation__: https://scalameta.org/metals/docs#installation +lspconfig.metals = add_lsp { + name = "metals", + language = "scala", + file_patterns = { "%.scala$" }, + command = { "metals" }, verbose = false } ----# svelte-language-server +---# SQL - sql_ls +--- __Status__: Works +--- __Site__: https://github.com/joe-re/sql-language-server +--- __Installation__: https://github.com/joe-re/sql-language-server?tab=readme-ov-file#installation--how-to-setup +lspconfig.sql_ls = add_lsp { + name = "sql_ls", + language = "sql", + file_patterns = { "%.sql$" }, + command = { "sql-language-server", "up", "--method", "stdio" }, + verbose = false +} + +---# Svelte - svelte_ls --- __Status__: Works --- __Site__: https://github.com/sveltejs/language-tools/tree/master/packages/language-server --- __Installation__: `npm install -g svelte-language-server` ---- __Note__: Also don't forget to install any additional optional dependencies ---- for additional features (see official site for details). -lspconfig.sveltels = add_lsp { - name = "sveltels", +--- __Note__: https://github.com/sveltejs/language-tools/tree/master/packages/language-server#how-can-i-use-it +lspconfig.svelte_ls = add_lsp { + name = "svelte_ls", language = "svelte", file_patterns = { "%.svelte$" }, - command = { 'svelteserver', '--stdio' }, + command = { "svelteserver", "--stdio" }, verbose = false } ----# Tailwind CSS +---# Tailwind CSS - tailwind_css_ls --- __Status__: Broken (freezes when writing class names inside html doc, requires new implementation of json.lua) --- __Site__: https://github.com/tailwindlabs/tailwindcss-intellisense ---- __Installation__: Arch Linux: `sudo pacman -S tailwindcss-language-server` -lspconfig.tailwindcss = add_lsp { - name = "tailwindcss", +--- __Installation__: https://github.com/tailwindlabs/tailwindcss-intellisense?tab=readme-ov-file#installation +lspconfig.tailwind_css_ls = add_lsp { + name = "tailwind_css_ls", language = "html", file_patterns = { "%.html$"}, - command = {'tailwindcss-language-server', '--stdio'}, + command = {"tailwindcss-language-server", "--stdio"}, fake_snippets = true, verbose = false } ----# Typst - tinymist ---- __Status: Works ---- __Site__: https://github.com/Myriad-Dreamin/tinymist ---- __Instalation__: https://github.com/Myriad-Dreamin/tinymist?tab=readme-ov-file#installation -lspconfig.tinymist = add_lsp { - name = "tinymist", - language = "typst", - file_patterns = { "%.typ$" }, - command = { "tinymist" }, - verbose = false -} - ----# LaTeX Texlab language server ---- __Status__: Works ---- __Site__: https://github.com/latex-lsp/texlab ---- __Installation__: git clone https://github.com/latex-lsp/texlab.git , then inside the texlab folder, run: cargo build --release ---- __Note__: Rust has to be installed -lspconfig.texlab = add_lsp { - name = "texlab", - language = "latex", - file_patterns = { "%.tex$", "%.bib$" , "%.dtx$", "%.sty$", "%.ins$", "%.cls$" }, - command = { 'texlab' } -} - ----# TOML - Taplo +---# TOML - taplo --- __Status__: Works --- __Site__: https://github.com/tamasfe/taplo ---- __Installation__: 'sudo pacman -S taplo-cli' +--- __Installation__: https://taplo.tamasfe.dev/cli/installation/binary.html lspconfig.taplo = add_lsp { name = "taplo", language = "toml", @@ -902,12 +859,12 @@ lspconfig.taplo = add_lsp { verbose = false } ----# typescript-language-server +---# Typescript - typescript_ls --- __Status__: Works --- __Site__: https://github.com/typescript-language-server/typescript-language-server ---- __Installation__: `npm install -g typescript-language-server typescript` -lspconfig.tsserver = add_lsp { - name = "typescript-language-server", +--- __Installation__: https://github.com/typescript-language-server/typescript-language-server?tab=readme-ov-file#installing +lspconfig.typescript_ls = add_lsp { + name = "typescript_ls", language = { { id = "javascript", pattern = "%.[cm]?js$" }, { id = "javascriptreact", pattern = "%.jsx$" }, @@ -915,19 +872,19 @@ lspconfig.tsserver = add_lsp { { id = "typescriptreact", pattern = "%.tsx$" }, }, file_patterns = { "%.jsx?$", "%.[cm]js$", "%.tsx?$" }, - command = { 'typescript-language-server', '--stdio' }, + command = { "typescript-language-server", "--stdio" }, verbose = false } ----# typst-lsp +---# Typst - typst_lsp --- __Status: Works --- __Site__: https://github.com/nvarner/typst-lsp ---- __Instalation__: `yay typst-lsp-bin` +--- __Installation__: https://github.com/nvarner/typst-lsp?tab=readme-ov-file#installation-guide lspconfig.typst_lsp = add_lsp { - name = "typst-lsp", + name = "typst_lsp", language = "typst", file_patterns = { "%.typ$" }, - command = { 'typst-lsp' }, + command = { "typst-lsp" }, verbose = false, settings = { exportPdf = "never", -- Choose onType, onSave or never. @@ -935,19 +892,7 @@ lspconfig.typst_lsp = add_lsp { } } ----# vim-language-server ---- __Status__: Untested ---- __Site__: https://github.com/iamcco/vim-language-server ---- __Installation__: `npm install -g vim-language-server` -lspconfig.vimls = add_lsp { - name = "vim-language-server", - language = "vim", - file_patterns = { "%.vim$" }, - command = { 'vim-language-server', '--stdio' }, - verbose = false -} - ----# V +---# V - v_analyzer --- __Status__: Works --- __Site__: https://github.com/vlang/v-analyzer --- __Installation__: https://github.com/vlang/v-analyzer?tab=readme-ov-file#installation @@ -959,10 +904,22 @@ lspconfig.v_analyzer = add_lsp { verbose = false } ----# Vala - vala-language-server +---# V - v_ls +--- __Status__: doesn't respond to completion requests (no longer officially maintained in favor of v-analyzer) +--- __Site__: https://github.com/vlang/vls +--- __Installation__: https://github.com/vlang/vls?tab=readme-ov-file#installation +lspconfig.v_ls = add_lsp { + name = "v_ls", + language = "v", + file_patterns = { "%.vv?$", "%.vsh$" }, + command = { "vlang-vls" }, + verbose = false +} + +---# Vala - vala_ls --- __Status__: Works --- __Site__: https://github.com/vala-lang/vala-language-server ---- __Installation__: `paru -S vala-language-server` +--- __Installation__: https://github.com/vala-lang/vala-language-server?tab=readme-ov-file#installation lspconfig.vala_ls = add_lsp { name = "vala_ls", language = "vala", @@ -971,39 +928,51 @@ lspconfig.vala_ls = add_lsp { verbose = false } ----# vlang-vls ---- __Status__: doesn't respond to completion requests (no longer officially maintained in favor of v-analyzer) ---- __Site__: https://github.com/vlang/vls ---- __Installation__: https://github.com/vlang/vls?tab=readme-ov-file#installation -lspconfig.vls = add_lsp { - name = "vlang-vls", - language = "v", - file_patterns = { "%.vv?$", "%.vsh$" }, - command = { 'vlang-vls' }, +---# Vim - vim_ls +--- __Status__: Untested +--- __Site__: https://github.com/iamcco/vim-language-server +--- __Installation__: https://github.com/iamcco/vim-language-server?tab=readme-ov-file#install +lspconfig.vim_ls = add_lsp { + name = "vim_ls", + language = "vim", + file_patterns = { "%.vim$" }, + command = { "vim-language-server", "--stdio" }, + verbose = false +} + +---# XML - lemminx +--- __Status__: Works +--- __Site__: https://github.com/eclipse/lemminx +--- __Installation__: https://github.com/eclipse-lemminx/lemminx?tab=readme-ov-file#generating-a-native-binary +lspconfig.lemminx = add_lsp { + name = "lemminx", + language = "xml", + file_patterns = { "%.xml$" }, + command = { "lemminx" }, verbose = false } ----# yaml-language-server +---# YAML - yaml_ls --- __Status__: Untested --- __Site__: https://github.com/redhat-developer/yaml-language-server ---- __Installation__: See official website for instructions -lspconfig.yamlls = add_lsp { - name = "yaml-language-server", +--- __Installation__: https://github.com/redhat-developer/yaml-language-server?tab=readme-ov-file#getting-started +lspconfig.yaml_ls = add_lsp { + name = "yaml_ls", language = "yaml", file_patterns = { "%.yml$", "%.yaml$" }, - command = { 'yaml-language-server', '--stdio' }, + command = { "yaml-language-server", "--stdio" }, verbose = false } ----# Zig Language Server +---# Zig - zls --- __Status__: Untested --- __Site__: https://github.com/zigtools/zls ---- __Installation__: See official website for instructions +--- __Installation__: https://zigtools.org/zls/install/ lspconfig.zls = add_lsp { name = "zls", language = "zig", file_patterns = { "%.zig$" }, - command = { 'zls' }, + command = { "zls" }, verbose = false }