# LSP configs LSP configurations provided by nvim-lspconfig are listed below. This documentation is autogenerated from the Lua files. You can view this file in Nvim by running `:help lspconfig-all`. - [ada_ls](#ada_ls) - [agda_ls](#agda_ls) - [aiken](#aiken) - [air](#air) - [alloy_ls](#alloy_ls) - [anakin_language_server](#anakin_language_server) - [angularls](#angularls) - [ansiblels](#ansiblels) - [antlersls](#antlersls) - [apex_ls](#apex_ls) - [arduino_language_server](#arduino_language_server) - [asm_lsp](#asm_lsp) - [ast_grep](#ast_grep) - [astro](#astro) - [atlas](#atlas) - [atopile](#atopile) - [autohotkey_lsp](#autohotkey_lsp) - [autotools_ls](#autotools_ls) - [awk_ls](#awk_ls) - [azure_pipelines_ls](#azure_pipelines_ls) - [bacon_ls](#bacon_ls) - [ballerina](#ballerina) - [basedpyright](#basedpyright) - [bashls](#bashls) - [basics_ls](#basics_ls) - [bazelrc_lsp](#bazelrc_lsp) - [beancount](#beancount) - [bicep](#bicep) - [biome](#biome) - [bitbake_language_server](#bitbake_language_server) - [blueprint_ls](#blueprint_ls) - [bqls](#bqls) - [bright_script](#bright_script) - [brioche](#brioche) - [bsl_ls](#bsl_ls) - [buck2](#buck2) - [buddy_ls](#buddy_ls) - [buf_ls](#buf_ls) - [bzl](#bzl) - [c3_lsp](#c3_lsp) - [cairo_ls](#cairo_ls) - [ccls](#ccls) - [cds_lsp](#cds_lsp) - [cir_lsp_server](#cir_lsp_server) - [circom-lsp](#circom-lsp) - [clangd](#clangd) - [clarinet](#clarinet) - [clojure_lsp](#clojure_lsp) - [cmake](#cmake) - [cobol_ls](#cobol_ls) - [codebook](#codebook) - [coffeesense](#coffeesense) - [contextive](#contextive) - [copilot](#copilot) - [coq_lsp](#coq_lsp) - [crystalline](#crystalline) - [csharp_ls](#csharp_ls) - [cspell_ls](#cspell_ls) - [css_variables](#css_variables) - [cssls](#cssls) - [cssmodules_ls](#cssmodules_ls) - [cucumber_language_server](#cucumber_language_server) - [cue](#cue) - [custom_elements_ls](#custom_elements_ls) - [cypher_ls](#cypher_ls) - [daedalus_ls](#daedalus_ls) - [dafny](#dafny) - [dagger](#dagger) - [dartls](#dartls) - [dcmls](#dcmls) - [debputy](#debputy) - [denols](#denols) - [dhall_lsp_server](#dhall_lsp_server) - [diagnosticls](#diagnosticls) - [digestif](#digestif) - [djls](#djls) - [djlsp](#djlsp) - [docker_compose_language_service](#docker_compose_language_service) - [docker_language_server](#docker_language_server) - [dockerls](#dockerls) - [dolmenls](#dolmenls) - [dotls](#dotls) - [dprint](#dprint) - [ds_pinyin_lsp](#ds_pinyin_lsp) - [dts_lsp](#dts_lsp) - [earthlyls](#earthlyls) - [ecsact](#ecsact) - [efm](#efm) - [elixirls](#elixirls) - [elmls](#elmls) - [elp](#elp) - [ember](#ember) - [emmet_language_server](#emmet_language_server) - [emmet_ls](#emmet_ls) - [emmylua_ls](#emmylua_ls) - [erg_language_server](#erg_language_server) - [esbonio](#esbonio) - [eslint](#eslint) - [expert](#expert) - [facility_language_server](#facility_language_server) - [fennel_language_server](#fennel_language_server) - [fennel_ls](#fennel_ls) - [fish_lsp](#fish_lsp) - [flow](#flow) - [flux_lsp](#flux_lsp) - [foam_ls](#foam_ls) - [fortitude](#fortitude) - [fortls](#fortls) - [fsautocomplete](#fsautocomplete) - [fsharp_language_server](#fsharp_language_server) - [fstar](#fstar) - [futhark_lsp](#futhark_lsp) - [gdscript](#gdscript) - [gdshader_lsp](#gdshader_lsp) - [gh_actions_ls](#gh_actions_ls) - [ghcide](#ghcide) - [ghdl_ls](#ghdl_ls) - [ginko_ls](#ginko_ls) - [gitlab_ci_ls](#gitlab_ci_ls) - [gitlab_duo](#gitlab_duo) - [glasgow](#glasgow) - [gleam](#gleam) - [glint](#glint) - [glsl_analyzer](#glsl_analyzer) - [glslls](#glslls) - [gn_language_server](#gn_language_server) - [gnls](#gnls) - [golangci_lint_ls](#golangci_lint_ls) - [gopls](#gopls) - [gradle_ls](#gradle_ls) - [grammarly](#grammarly) - [graphql](#graphql) - [groovyls](#groovyls) - [guile_ls](#guile_ls) - [harper_ls](#harper_ls) - [hdl_checker](#hdl_checker) - [helm_ls](#helm_ls) - [herb_ls](#herb_ls) - [hhvm](#hhvm) - [hie](#hie) - [hlasm](#hlasm) - [hls](#hls) - [home_assistant](#home_assistant) - [hoon_ls](#hoon_ls) - [html](#html) - [htmx](#htmx) - [hydra_lsp](#hydra_lsp) - [hylo_ls](#hylo_ls) - [hyprls](#hyprls) - [idris2_lsp](#idris2_lsp) - [intelephense](#intelephense) - [janet_lsp](#janet_lsp) - [java_language_server](#java_language_server) - [jdtls](#jdtls) - [jedi_language_server](#jedi_language_server) - [jinja_lsp](#jinja_lsp) - [jqls](#jqls) - [jsonls](#jsonls) - [jsonnet_ls](#jsonnet_ls) - [julials](#julials) - [just](#just) - [kakehashi](#kakehashi) - [kcl](#kcl) - [koka](#koka) - [kotlin_language_server](#kotlin_language_server) - [kotlin_lsp](#kotlin_lsp) - [kulala_ls](#kulala_ls) - [laravel_ls](#laravel_ls) - [lean3ls](#lean3ls) - [lelwel_ls](#lelwel_ls) - [lemminx](#lemminx) - [lexical](#lexical) - [lsp_ai](#lsp_ai) - [ltex](#ltex) - [ltex_plus](#ltex_plus) - [lua_ls](#lua_ls) - [luau_lsp](#luau_lsp) - [lwc_ls](#lwc_ls) - [m68k](#m68k) - [markdown_oxide](#markdown_oxide) - [marko-js](#marko-js) - [marksman](#marksman) - [matlab_ls](#matlab_ls) - [mdx_analyzer](#mdx_analyzer) - [mesonlsp](#mesonlsp) - [metals](#metals) - [millet](#millet) - [mint](#mint) - [mlir_lsp_server](#mlir_lsp_server) - [mlir_pdll_lsp_server](#mlir_pdll_lsp_server) - [mm0_ls](#mm0_ls) - [mojo](#mojo) - [motoko_lsp](#motoko_lsp) - [move_analyzer](#move_analyzer) - [mpls](#mpls) - [msbuild_project_tools_server](#msbuild_project_tools_server) - [muon](#muon) - [mutt_ls](#mutt_ls) - [nelua_lsp](#nelua_lsp) - [neocmake](#neocmake) - [nextflow_ls](#nextflow_ls) - [nextls](#nextls) - [nginx_language_server](#nginx_language_server) - [nickel_ls](#nickel_ls) - [nil_ls](#nil_ls) - [nim_langserver](#nim_langserver) - [nimls](#nimls) - [nixd](#nixd) - [nomad_lsp](#nomad_lsp) - [ntt](#ntt) - [nushell](#nushell) - [nxls](#nxls) - [ocamllsp](#ocamllsp) - [ols](#ols) - [omnisharp](#omnisharp) - [opencl_ls](#opencl_ls) - [openscad_ls](#openscad_ls) - [openscad_lsp](#openscad_lsp) - [oso](#oso) - [oxfmt](#oxfmt) - [oxlint](#oxlint) - [pact_ls](#pact_ls) - [pasls](#pasls) - [pbls](#pbls) - [perlls](#perlls) - [perlnavigator](#perlnavigator) - [perlpls](#perlpls) - [pest_ls](#pest_ls) - [phan](#phan) - [phpactor](#phpactor) - [phptools](#phptools) - [pico8_ls](#pico8_ls) - [please](#please) - [pli](#pli) - [pony_language_server](#pony_language_server) - [pony_lsp](#pony_lsp) - [poryscript_pls](#poryscript_pls) - [postgres_lsp](#postgres_lsp) - [powershell_es](#powershell_es) - [prismals](#prismals) - [prolog_ls](#prolog_ls) - [prosemd_lsp](#prosemd_lsp) - [protols](#protols) - [psalm](#psalm) - [pug](#pug) - [puppet](#puppet) - [purescriptls](#purescriptls) - [pylsp](#pylsp) - [pylyzer](#pylyzer) - [pyre](#pyre) - [pyrefly](#pyrefly) - [pyright](#pyright) - [qmlls](#qmlls) - [quick_lint_js](#quick_lint_js) - [r_language_server](#r_language_server) - [racket_langserver](#racket_langserver) - [raku_navigator](#raku_navigator) - [reason_ls](#reason_ls) - [regal](#regal) - [regols](#regols) - [remark_ls](#remark_ls) - [rescriptls](#rescriptls) - [rls](#rls) - [rnix](#rnix) - [robotcode](#robotcode) - [robotframework_ls](#robotframework_ls) - [roc_ls](#roc_ls) - [rome](#rome) - [roslyn_ls](#roslyn_ls) - [rpmspec](#rpmspec) - [rubocop](#rubocop) - [ruby_lsp](#ruby_lsp) - [ruff](#ruff) - [ruff_lsp](#ruff_lsp) - [rumdl](#rumdl) - [rune_languageserver](#rune_languageserver) - [rust_analyzer](#rust_analyzer) - [salt_ls](#salt_ls) - [scheme_langserver](#scheme_langserver) - [scry](#scry) - [selene3p_ls](#selene3p_ls) - [serve_d](#serve_d) - [shopify_theme_ls](#shopify_theme_ls) - [sixtyfps](#sixtyfps) - [slangd](#slangd) - [slint_lsp](#slint_lsp) - [smarty_ls](#smarty_ls) - [smithy_ls](#smithy_ls) - [snakeskin_ls](#snakeskin_ls) - [snyk_ls](#snyk_ls) - [solang](#solang) - [solargraph](#solargraph) - [solc](#solc) - [solidity](#solidity) - [solidity_ls](#solidity_ls) - [solidity_ls_nomicfoundation](#solidity_ls_nomicfoundation) - [somesass_ls](#somesass_ls) - [sorbet](#sorbet) - [sourcekit](#sourcekit) - [spectral](#spectral) - [spyglassmc_language_server](#spyglassmc_language_server) - [sqlls](#sqlls) - [sqls](#sqls) - [sqruff](#sqruff) - [stan_ls](#stan_ls) - [standardrb](#standardrb) - [starlark_rust](#starlark_rust) - [starpls](#starpls) - [statix](#statix) - [steep](#steep) - [stimulus_ls](#stimulus_ls) - [stylelint_lsp](#stylelint_lsp) - [stylua](#stylua) - [stylua3p_ls](#stylua3p_ls) - [superhtml](#superhtml) - [svelte](#svelte) - [svlangserver](#svlangserver) - [svls](#svls) - [swift_mesonls](#swift_mesonls) - [syntax_tree](#syntax_tree) - [systemd_ls](#systemd_ls) - [systemd_lsp](#systemd_lsp) - [tabby_ml](#tabby_ml) - [tailwindcss](#tailwindcss) - [taplo](#taplo) - [tblgen_lsp_server](#tblgen_lsp_server) - [tclsp](#tclsp) - [teal_ls](#teal_ls) - [templ](#templ) - [termux_language_server](#termux_language_server) - [terraform_lsp](#terraform_lsp) - [terraformls](#terraformls) - [texlab](#texlab) - [textlsp](#textlsp) - [tflint](#tflint) - [theme_check](#theme_check) - [thriftls](#thriftls) - [tilt_ls](#tilt_ls) - [tinymist](#tinymist) - [tofu_ls](#tofu_ls) - [tombi](#tombi) - [ts_ls](#ts_ls) - [ts_query_ls](#ts_query_ls) - [tsgo](#tsgo) - [tsp_server](#tsp_server) - [ttags](#ttags) - [turbo_ls](#turbo_ls) - [turtle_ls](#turtle_ls) - [tvm_ffi_navigator](#tvm_ffi_navigator) - [twiggy_language_server](#twiggy_language_server) - [ty](#ty) - [typeprof](#typeprof) - [typos_lsp](#typos_lsp) - [typst_lsp](#typst_lsp) - [uiua](#uiua) - [ungrammar_languageserver](#ungrammar_languageserver) - [unison](#unison) - [unocss](#unocss) - [uvls](#uvls) - [v_analyzer](#v_analyzer) - [vacuum](#vacuum) - [vala_ls](#vala_ls) - [vale_ls](#vale_ls) - [vectorcode_server](#vectorcode_server) - [verible](#verible) - [veridian](#veridian) - [veryl_ls](#veryl_ls) - [vespa_ls](#vespa_ls) - [vhdl_ls](#vhdl_ls) - [vimdoc_ls](#vimdoc_ls) - [vimls](#vimls) - [visualforce_ls](#visualforce_ls) - [vls](#vls) - [volar](#volar) - [vscoqtop](#vscoqtop) - [vsrocq](#vsrocq) - [vtsls](#vtsls) - [vue_ls](#vue_ls) - [wasm_language_tools](#wasm_language_tools) - [wc_language_server](#wc_language_server) - [wgsl_analyzer](#wgsl_analyzer) - [yamlls](#yamlls) - [yang_lsp](#yang_lsp) - [yls](#yls) - [ziggy](#ziggy) - [ziggy_schema](#ziggy_schema) - [zk](#zk) - [zls](#zls) - [zuban](#zuban) ## ada_ls https://github.com/AdaCore/ada_language_server Installation instructions can be found [here](https://github.com/AdaCore/ada_language_server#Install). Workspace-specific [settings](https://github.com/AdaCore/ada_language_server/blob/master/doc/settings.md) such as `projectFile` can be provided in a `.als.json` file at the root of the workspace. Alternatively, configuration may be passed as a "settings" object to `vim.lsp.config('ada_ls', {})`: ```lua vim.lsp.config('ada_ls', { settings = { ada = { projectFile = "project.gpr"; scenarioVariables = { ... }; } } }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('ada_ls') ``` Default config: - `cmd` : ```lua { "ada_language_server" } ``` - `filetypes` : ```lua { "ada" } ``` - `root_dir`: [../lsp/ada_ls.lua:24](../lsp/ada_ls.lua#L24) --- ## agda_ls https://github.com/agda/agda-language-server Language Server for Agda. Snippet to enable the language server: ```lua vim.lsp.enable('agda_ls') ``` Default config: - `cmd` : ```lua { "als" } ``` - `filetypes` : ```lua { "agda" } ``` - `root_dir`: [../lsp/agda_ls.lua:10](../lsp/agda_ls.lua#L10) --- ## aiken https://github.com/aiken-lang/aiken A language server for Aiken Programming Language. [Installation](https://aiken-lang.org/installation-instructions) It can be i Snippet to enable the language server: ```lua vim.lsp.enable('aiken') ``` Default config: - `cmd` : ```lua { "aiken", "lsp" } ``` - `filetypes` : ```lua { "aiken" } ``` - `root_markers` : ```lua { "aiken.toml", ".git" } ``` --- ## air https://github.com/posit-dev/air Air is an R formatter and language server, written in Rust. Refer to the [documentation](https://posit-dev.github.io/air/editors.html) for more details. Snippet to enable the language server: ```lua vim.lsp.enable('air') ``` Default config: - `cmd` : ```lua { "air", "language-server" } ``` - `filetypes` : ```lua { "r" } ``` - `root_markers` : ```lua { "air.toml", ".air.toml", ".git" } ``` --- ## alloy_ls https://github.com/AlloyTools/org.alloytools.alloy Alloy is a formal specification language for describing structures and a tool for exploring them. You may also need to configure the filetype for Alloy (*.als) files: ``` autocmd BufNewFile,BufRead *.als set filetype=alloy ``` or ```lua vim.filetype.add({ pattern = { ['.*/*.als'] = 'alloy', }, }) ``` Alternatively, you may use a syntax plugin like https://github.com/runoshun/vim-alloy. Snippet to enable the language server: ```lua vim.lsp.enable('alloy_ls') ``` Default config: - `cmd` : ```lua { "alloy", "lsp" } ``` - `filetypes` : ```lua { "alloy" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## anakin_language_server https://pypi.org/project/anakin-language-server/ `anakin-language-server` is yet another Jedi Python language server. Available options: * Initialization: https://github.com/muffinmad/anakin-language-server#initialization-option * Configuration: https://github.com/muffinmad/anakin-language-server#configuration-options Snippet to enable the language server: ```lua vim.lsp.enable('anakin_language_server') ``` Default config: - `cmd` : ```lua { "anakinls" } ``` - `filetypes` : ```lua { "python" } ``` - `root_markers` : ```lua { "pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", "Pipfile", ".git" } ``` - `settings` : ```lua { anakinls = { pyflakes_errors = { "ImportStarNotPermitted", "UndefinedExport", "UndefinedLocal", "UndefinedName", "DuplicateArgument", "MultiValueRepeatedKeyLiteral", "MultiValueRepeatedKeyVariable", "FutureFeatureNotDefined", "LateFutureImport", "ReturnOutsideFunction", "YieldOutsideFunction", "ContinueOutsideLoop", "BreakOutsideLoop", "TwoStarredExpressions", "TooManyExpressionsInStarredAssignment", "ForwardAnnotationSyntaxError", "RaiseNotImplemented", "StringDotFormatExtraPositionalArguments", "StringDotFormatExtraNamedArguments", "StringDotFormatMissingArgument", "StringDotFormatMixingAutomatic", "StringDotFormatInvalidFormat", "PercentFormatInvalidFormat", "PercentFormatMixedPositionalAndNamed", "PercentFormatUnsupportedFormat", "PercentFormatPositionalCountMismatch", "PercentFormatExtraNamedArguments", "PercentFormatMissingArgument", "PercentFormatExpectedMapping", "PercentFormatExpectedSequence", "PercentFormatStarRequiresSequence" } } } ``` --- ## angularls https://github.com/angular/vscode-ng-language-service `angular-language-server` can be installed via npm `npm install -g @angular/language-server`. ```lua local project_library_path = "/path/to/project/lib" local cmd = {"ngserver", "--stdio", "--tsProbeLocations", project_library_path , "--ngProbeLocations", project_library_path} vim.lsp.config('angularls', { cmd = cmd, }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('angularls') ``` Default config: - `cmd`: [../lsp/angularls.lua:93](../lsp/angularls.lua#L93) - `filetypes` : ```lua { "typescript", "html", "typescriptreact", "htmlangular" } ``` - `root_markers` : ```lua { "angular.json", "nx.json" } ``` --- ## ansiblels https://github.com/ansible/vscode-ansible Language server for the ansible configuration management tool. `ansible-language-server` can be installed via `npm`: ```sh npm install -g @ansible/ansible-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('ansiblels') ``` Default config: - `cmd` : ```lua { "ansible-language-server", "--stdio" } ``` - `filetypes` : ```lua { "yaml.ansible" } ``` - `root_markers` : ```lua { "ansible.cfg", ".ansible-lint" } ``` - `settings` : ```lua { ansible = { ansible = { path = "ansible" }, executionEnvironment = { enabled = false }, python = { interpreterPath = "python" }, validation = { enabled = true, lint = { enabled = true, path = "ansible-lint" } } } } ``` --- ## antlersls https://www.npmjs.com/package/antlers-language-server `antlersls` can be installed via `npm`: ```sh npm install -g antlers-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('antlersls') ``` Default config: - `cmd` : ```lua { "antlersls", "--stdio" } ``` - `filetypes` : ```lua { "html", "antlers" } ``` - `root_markers` : ```lua { "composer.json" } ``` --- ## apex_ls https://github.com/forcedotcom/salesforcedx-vscode Language server for Apex. For manual installation, download the JAR file from the [VSCode extension](https://github.com/forcedotcom/salesforcedx-vscode/tree/develop/packages/salesforcedx-vscode-apex) and adjust the `apex_jar_path` appropriately. ```lua vim.lsp.config('apex_ls', { apex_jar_path = '/path/to/apex-jorje-lsp.jar', apex_enable_semantic_errors = false, -- Whether to allow Apex Language Server to surface semantic errors apex_enable_completion_statistics = false, -- Whether to allow Apex Language Server to collect telemetry on code completion usage } ``` Example configuration using Mason: ```lua vim.lsp.config('apex_ls', { apex_jar_path = vim.fn.stdpath('data') .. '/mason/share/apex-language-server/apex-jorje-lsp.jar', } ``` For a complete experience, you may need to ensure the treesitter parsers for 'apex' are installed (:TSInstall apex) as well as configure the filetype for apex (*.cls) files: ```lua vim.filetype.add({ pattern = { ['.*/*.cls'] = 'apex', }, }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('apex_ls') ``` Default config: - `cmd`: [../lsp/apex_ls.lua:37](../lsp/apex_ls.lua#L37) - `filetypes` : ```lua { "apex", "apexcode" } ``` - `root_markers` : ```lua { "sfdx-project.json" } ``` --- ## arduino_language_server https://github.com/arduino/arduino-language-server Language server for Arduino The `arduino-language-server` can be installed by running: ``` go install github.com/arduino/arduino-language-server@latest ``` The `arduino-cli` tool must also be installed. Follow [these installation instructions](https://arduino.github.io/arduino-cli/latest/installation/) for your platform. After installing `arduino-cli`, follow [these instructions](https://arduino.github.io/arduino-cli/latest/getting-started/#create-a-configuration-file) for generating a configuration file if you haven't done so already, and make sure you [install any relevant platforms libraries](https://arduino.github.io/arduino-cli/latest/getting-started/#install-the-core-for-your-board). The language server also requires `clangd` to be installed. Follow [these installation instructions](https://clangd.llvm.org/installation) for your platform. If you don't have a sketch yet create one. ```sh $ arduino-cli sketch new test $ cd test ``` You will need a `sketch.yaml` file in order for the language server to understand your project. It will also save you passing options to `arduino-cli` each time you compile or upload a file. You can generate the file by using the following commands. First gather some information about your board. Make sure your board is connected and run the following: ```sh $ arduino-cli board list Port Protocol Type Board Name FQBN Core /dev/ttyACM0 serial Serial Port (USB) Arduino Uno arduino:avr:uno arduino:avr ``` Then generate the file: ```sh arduino-cli board attach -p /dev/ttyACM0 -b arduino:avr:uno test.ino ``` The resulting file should look like this: ```yaml default_fqbn: arduino:avr:uno default_port: /dev/ttyACM0 ``` Your folder structure should look like this: ``` . ├── test.ino └── sketch.yaml ``` For further instructions about configuration options, run `arduino-language-server --help`. Note that an upstream bug makes keywords in some cases become undefined by the language server. Ref: https://github.com/arduino/arduino-ide/issues/159 Snippet to enable the language server: ```lua vim.lsp.enable('arduino_language_server') ``` Default config: - `capabilities` : ```lua { textDocument = { semanticTokens = vim.NIL }, workspace = { semanticTokens = vim.NIL } } ``` - `cmd` : ```lua { "arduino-language-server" } ``` - `filetypes` : ```lua { "arduino" } ``` - `root_dir`: [../lsp/arduino_language_server.lua:74](../lsp/arduino_language_server.lua#L74) --- ## asm_lsp https://github.com/bergercookie/asm-lsp Language Server for NASM/GAS/GO Assembly `asm-lsp` can be installed via cargo: cargo install asm-lsp Snippet to enable the language server: ```lua vim.lsp.enable('asm_lsp') ``` Default config: - `cmd` : ```lua { "asm-lsp" } ``` - `filetypes` : ```lua { "asm", "vmasm" } ``` - `root_markers` : ```lua { ".asm-lsp.toml", ".git" } ``` --- ## ast_grep https://ast-grep.github.io/ ast-grep(sg) is a fast and polyglot tool for code structural search, lint, rewriting at large scale. ast-grep LSP only works in projects that have `sgconfig.y[a]ml` in their root directories. ```sh npm install [-g] @ast-grep/cli ``` Snippet to enable the language server: ```lua vim.lsp.enable('ast_grep') ``` Default config: - `cmd` : ```lua { "ast-grep", "lsp" } ``` - `filetypes` : ```lua { "bash", "c", "cpp", "cs", "css", "elixir", "go", "haskell", "html", "java", "javascript", "javascriptreact", "json", "kotlin", "lua", "nix", "php", "python", "ruby", "rust", "scala", "solidity", "swift", "typescript", "typescriptreact", "yaml" } ``` - `reuse_client`: [../lsp/ast_grep.lua:12](../lsp/ast_grep.lua#L12) - `root_markers` : ```lua { "sgconfig.yaml", "sgconfig.yml" } ``` - `workspace_required` : `true` --- ## astro https://github.com/withastro/language-tools/tree/main/packages/language-server `astro-ls` can be installed via `npm`: ```sh npm install -g @astrojs/language-server ``` If typescript is installed globally, you might get the `\`typescript.tsdk\` init option is required` error. You will need to manually pass the typescript SDK path. Here is an example of a Nix configuration where typescript is installed via Nix's Home-manager: ```nix { config, pkgs, ... }: { home.packages = with pkgs; [ typescript ]; programs.neovim = { plugins = with pkgs.vimPlugins; [ nvim-lspconfig ]; extraPackages = with pkgs; [ astro-language-server ]; initLua = '' vim.lsp.config['astro'] = { init_options = { typescript = { tsdk = ${pkgs.typescript}/lib/node_modules/typescript/lib, }, }, } vim.lsp.enable('astro') -- ... ''; }; } ``` The path can also be passed via a variable, like `vim.g.tsdk = "${pkgs.typescript}/lib/node_modules/typescript/lib"` and then used in the Lua Neovim config. Snippet to enable the language server: ```lua vim.lsp.enable('astro') ``` Default config: - `before_init`: [../lsp/astro.lua:49](../lsp/astro.lua#L49) - `cmd` : ```lua { "astro-ls", "--stdio" } ``` - `filetypes` : ```lua { "astro" } ``` - `init_options` : ```lua { typescript = {} } ``` - `root_markers` : ```lua { "package.json", "tsconfig.json", "jsconfig.json", ".git" } ``` --- ## atlas https://github.com/ariga/atlas Language server for Atlas config and schema files. You may also need to configure the filetype for *.hcl files: ```vim autocmd BufNewFile,BufRead atlas.hcl set filetype=atlas-config autocmd BufNewFile,BufRead *.my.hcl set filetype=atlas-schema-mysql autocmd BufNewFile,BufRead *.pg.hcl set filetype=atlas-schema-postgresql autocmd BufNewFile,BufRead *.lt.hcl set filetype=atlas-schema-sqlite autocmd BufNewFile,BufRead *.ch.hcl set filetype=atlas-schema-clickhouse autocmd BufNewFile,BufRead *.ms.hcl set filetype=atlas-schema-mssql autocmd BufNewFile,BufRead *.rs.hcl set filetype=atlas-schema-redshift autocmd BufNewFile,BufRead *.test.hcl set filetype=atlas-test autocmd BufNewFile,BufRead *.plan.hcl set filetype=atlas-plan autocmd BufNewFile,BufRead *.rule.hcl set filetype=atlas-rule ``` or ```lua vim.filetype.add({ filename = { ['atlas.hcl'] = 'atlas-config', }, pattern = { ['.*/*.my.hcl'] = 'atlas-schema-mysql', ['.*/*.pg.hcl'] = 'atlas-schema-postgresql', ['.*/*.lt.hcl'] = 'atlas-schema-sqlite', ['.*/*.ch.hcl'] = 'atlas-schema-clickhouse', ['.*/*.ms.hcl'] = 'atlas-schema-mssql', ['.*/*.rs.hcl'] = 'atlas-schema-redshift', ['.*/*.test.hcl'] = 'atlas-test', ['.*/*.plan.hcl'] = 'atlas-plan', ['.*/*.rule.hcl'] = 'atlas-rule', }, }) ``` Optionally, tell treesitter to treat Atlas filetypes as HCL for better syntax highlighting: ```lua vim.treesitter.language.register('hcl', 'atlas-config') vim.treesitter.language.register('hcl', 'atlas-schema-mysql') vim.treesitter.language.register('hcl', 'atlas-schema-postgresql') vim.treesitter.language.register('hcl', 'atlas-schema-sqlite') vim.treesitter.language.register('hcl', 'atlas-schema-clickhouse') vim.treesitter.language.register('hcl', 'atlas-schema-mssql') vim.treesitter.language.register('hcl', 'atlas-schema-redshift') vim.treesitter.language.register('hcl', 'atlas-test') vim.treesitter.language.register('hcl', 'atlas-plan') vim.treesitter.language.register('hcl', 'atlas-rule') ``` Snippet to enable the language server: ```lua vim.lsp.enable('atlas') ``` Default config: - `cmd` : ```lua { "atlas", "tool", "lsp", "--stdio" } ``` - `filetypes` : ```lua { "atlas-*" } ``` - `root_markers` : ```lua { "atlas.hcl" } ``` --- ## atopile https://atopile.io/ A language server for atopile Programming Language. It comes with the atopile compiler, for installation see: [Installing atopile](https://docs.atopile.io/atopile/guides/install) Snippet to enable the language server: ```lua vim.lsp.enable('atopile') ``` Default config: - `cmd` : ```lua { "ato", "lsp", "start" } ``` - `filetypes` : ```lua { "ato" } ``` - `root_markers` : ```lua { "ato.yaml", ".ato", ".git" } ``` --- ## autohotkey_lsp https://github.com/thqby/vscode-autohotkey2-lsp AutoHotkey v2.0 LSP implementation NOTE: AutoHotkey is Windows-only. Snippet to enable the language server: ```lua vim.lsp.enable('autohotkey_lsp') ``` Default config: - `cmd` : ```lua { "autohotkey_lsp", "--stdio" } ``` - `filetypes` : ```lua { "autohotkey" } ``` - `flags` : ```lua { debounce_text_changes = 500 } ``` - `init_options` : ```lua { ActionWhenV1IsDetected = "Continue", AutoLibInclude = "All", CommentTags = "^;;\\s*(?.+)", CompleteFunctionParens = false, Diagnostics = { ClassStaticMemberCheck = true, ParamsCheck = true }, FormatOptions = { array_style = "expand", brace_style = "One True Brace", break_chained_methods = false, ignore_comment = false, indent_string = "\t", max_preserve_newlines = 2, object_style = "none", preserve_newlines = true, space_after_double_colon = true, space_before_conditional = true, space_in_empty_paren = false, space_in_other = true, space_in_paren = false, wrap_line_length = 0 }, InterpreterPath = "", SymbolFoldinFromOpenBrace = false, locale = "en-us" } ``` - `root_markers` : ```lua { "package.json" } ``` --- ## autotools_ls https://github.com/Freed-Wu/autotools-language-server `autotools-language-server` can be installed via `pip`: ```sh pip install autotools-language-server ``` Language server for autoconf, automake and make using tree sitter in python. Snippet to enable the language server: ```lua vim.lsp.enable('autotools_ls') ``` Default config: - `cmd` : ```lua { "autotools-language-server" } ``` - `filetypes` : ```lua { "config", "automake", "make" } ``` - `root_dir`: [../lsp/autotools_ls.lua:17](../lsp/autotools_ls.lua#L17) --- ## awk_ls https://github.com/Beaglefoot/awk-language-server/ `awk-language-server` can be installed via `npm`: ```sh npm install -g awk-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('awk_ls') ``` Default config: - `cmd` : ```lua { "awk-language-server" } ``` - `filetypes` : ```lua { "awk" } ``` --- ## azure_pipelines_ls https://github.com/microsoft/azure-pipelines-language-server An Azure Pipelines language server `azure-pipelines-ls` can be installed via `npm`: ```sh npm install -g azure-pipelines-language-server ``` By default `azure-pipelines-ls` will only work in files named `azure-pipelines.yml`, this can be changed by providing additional settings like so: ```lua vim.lsp.config('azure_pipelines_ls', { ... -- other configuration settings = { yaml = { schemas = { ["https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json"] = { "/azure-pipeline*.y*l", "/*.azure*", "Azure-Pipelines/**/*.y*l", "Pipelines/*.y*l", }, }, }, }, }) ``` The Azure Pipelines LSP is a fork of `yaml-language-server` and as such the same settings can be passed to it as `yaml-language-server`. Snippet to enable the language server: ```lua vim.lsp.enable('azure_pipelines_ls') ``` Default config: - `cmd` : ```lua { "azure-pipelines-language-server", "--stdio" } ``` - `filetypes` : ```lua { "yaml" } ``` - `root_markers` : ```lua { "azure-pipelines.yml" } ``` - `settings` : ```lua {} ``` --- ## bacon_ls https://github.com/crisidev/bacon-ls A Language Server Protocol wrapper for [bacon](https://dystroy.org/bacon/). It offers textDocument/diagnostic and workspace/diagnostic capabilities for Rust workspaces using the Bacon export locations file. It requires `bacon` and `bacon-ls` to be installed on the system using [mason.nvim](https://github.com/williamboman/mason.nvim) or manually ```sh $ cargo install --locked bacon bacon-ls ``` Settings can be changed using the `init_options` dictionary:util ```lua init_options = { -- Bacon export filename (default: .bacon-locations). locationsFile = ".bacon-locations", -- Try to update diagnostics every time the file is saved (default: true). updateOnSave = true, -- How many milliseconds to wait before updating diagnostics after a save (default: 1000). updateOnSaveWaitMillis = 1000, -- Try to update diagnostics every time the file changes (default: true). updateOnChange = true, -- Try to validate that bacon preferences are setup correctly to work with bacon-ls (default: true). validateBaconPreferences = true, -- f no bacon preferences file is found, create a new preferences file with the bacon-ls job definition (default: true). createBaconPreferencesFile = true, -- Run bacon in background for the bacon-ls job (default: true) runBaconInBackground = true, -- Command line arguments to pass to bacon running in background (default "--headless -j bacon-ls") runBaconInBackgroundCommandArguments = "--headless -j bacon-ls", -- How many milliseconds to wait between background diagnostics check to synchronize all open files (default: 2000). synchronizeAllOpenFilesWaitMillis = 2000, } ``` Snippet to enable the language server: ```lua vim.lsp.enable('bacon_ls') ``` Default config: - `cmd` : ```lua { "bacon-ls" } ``` - `filetypes` : ```lua { "rust" } ``` - `init_options` : ```lua {} ``` - `root_markers` : ```lua { ".bacon-locations", "Cargo.toml" } ``` --- ## ballerina Ballerina language server The Ballerina language's CLI tool comes with its own language server implementation. The `bal` command line tool must be installed and available in your system's PATH. Snippet to enable the language server: ```lua vim.lsp.enable('ballerina') ``` Default config: - `cmd` : ```lua { "bal", "start-language-server" } ``` - `filetypes` : ```lua { "ballerina" } ``` - `root_markers` : ```lua { "Ballerina.toml" } ``` --- ## basedpyright https://detachhead.github.io/basedpyright `basedpyright`, a static type checker and language server for python Snippet to enable the language server: ```lua vim.lsp.enable('basedpyright') ``` Default config: - `cmd` : ```lua { "basedpyright-langserver", "--stdio" } ``` - `filetypes` : ```lua { "python" } ``` - `on_attach`: [../lsp/basedpyright.lua:25](../lsp/basedpyright.lua#L25) - `root_markers` : ```lua { "pyrightconfig.json", "pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", "Pipfile", ".git" } ``` - `settings` : ```lua { basedpyright = { analysis = { autoSearchPaths = true, diagnosticMode = "openFilesOnly" } } } ``` --- ## bashls https://github.com/bash-lsp/bash-language-server `bash-language-server` can be installed via `npm`: ```sh npm i -g bash-language-server ``` Language server for bash, written using tree sitter in typescript. Snippet to enable the language server: ```lua vim.lsp.enable('bashls') ``` Default config: - `cmd` : ```lua { "bash-language-server", "start" } ``` - `filetypes` : ```lua { "bash", "sh" } ``` - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua { bashIde = { globPattern = "*@(.sh|.inc|.bash|.command)" } } ``` --- ## basics_ls https://github.com/antonk52/basics-language-server/ Buffer, path, and snippet completion ```sh npm install -g basics-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('basics_ls') ``` Default config: - `cmd` : ```lua { "basics-language-server" } ``` - `settings` : ```lua { buffer = { enable = true, minCompletionLength = 4 }, path = { enable = true }, snippet = { enable = false, sources = {} } } ``` --- ## bazelrc_lsp https://github.com/salesforce-misc/bazelrc-lsp `bazelrc-lsp` is a LSP for `.bazelrc` configuration files. The `.bazelrc` file type is not detected automatically, you can register it manually (see below) or override the filetypes: ```lua vim.filetype.add { pattern = { ['.*.bazelrc'] = 'bazelrc', }, } ``` Snippet to enable the language server: ```lua vim.lsp.enable('bazelrc_lsp') ``` Default config: - `cmd` : ```lua { "bazelrc-lsp", "lsp" } ``` - `filetypes` : ```lua { "bazelrc" } ``` - `root_markers` : ```lua { "WORKSPACE", "WORKSPACE.bazel", "MODULE.bazel" } ``` --- ## beancount https://github.com/polarmutex/beancount-language-server#installation See https://github.com/polarmutex/beancount-language-server#configuration for configuration options Snippet to enable the language server: ```lua vim.lsp.enable('beancount') ``` Default config: - `cmd` : ```lua { "beancount-language-server", "--stdio" } ``` - `filetypes` : ```lua { "beancount", "bean" } ``` - `init_options` : ```lua {} ``` - `root_markers` : ```lua { ".git" } ``` --- ## bicep https://github.com/azure/bicep Bicep language server Bicep language server can be installed by downloading and extracting a release of bicep-langserver.zip from [Bicep GitHub releases](https://github.com/Azure/bicep/releases). Bicep language server requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. Neovim does not have built-in support for the bicep filetype which is required for lspconfig to automatically launch the language server. Filetype detection can be added via an autocmd: ```lua vim.cmd [[ autocmd BufNewFile,BufRead *.bicep set filetype=bicep ]] ``` **By default, bicep language server does not have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. ```lua local bicep_lsp_bin = "/path/to/bicep-langserver/Bicep.LangServer.dll" vim.lsp.config('bicep', { cmd = { "dotnet", bicep_lsp_bin }; ... }) ``` To download the latest release and place in /usr/local/bin/bicep-langserver: ```bash (cd $(mktemp -d) \ && curl -fLO https://github.com/Azure/bicep/releases/latest/download/bicep-langserver.zip \ && rm -rf /usr/local/bin/bicep-langserver \ && unzip -d /usr/local/bin/bicep-langserver bicep-langserver.zip) ``` Snippet to enable the language server: ```lua vim.lsp.enable('bicep') ``` Default config: - `filetypes` : ```lua { "bicep", "bicep-params" } ``` - `init_options` : ```lua {} ``` - `root_markers` : ```lua { ".git" } ``` --- ## biome https://biomejs.dev Toolchain of the web. [Successor of Rome](https://biomejs.dev/blog/annoucing-biome). ```sh npm install [-g] @biomejs/biome ``` ### Monorepo support `biome` supports monorepos by default. It will automatically find the `biome.json` corresponding to the package you are working on, as described in the [documentation](https://biomejs.dev/guides/big-projects/#monorepo). This works without the need of spawning multiple instances of `biome`, saving memory. Snippet to enable the language server: ```lua vim.lsp.enable('biome') ``` Default config: - `cmd`: [../lsp/biome.lua:17](../lsp/biome.lua#L17) - `filetypes` : ```lua { "astro", "css", "graphql", "html", "javascript", "javascriptreact", "json", "jsonc", "svelte", "typescript", "typescriptreact", "vue" } ``` - `root_dir`: [../lsp/biome.lua:17](../lsp/biome.lua#L17) - `workspace_required` : `true` --- ## bitbake_language_server https://github.com/Freed-Wu/bitbake-language-server `bitbake-language-server` can be installed via `pip`: ```sh pip install bitbake-language-server ``` Language server for bitbake. Snippet to enable the language server: ```lua vim.lsp.enable('bitbake_language_server') ``` Default config: - `cmd` : ```lua { "bitbake-language-server" } ``` - `filetypes` : ```lua { "bitbake" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## blueprint_ls https://gitlab.gnome.org/jwestman/blueprint-compiler `blueprint-compiler` can be installed via your system package manager. Language server for the blueprint markup language, written in python and part of the blueprint-compiler. Snippet to enable the language server: ```lua vim.lsp.enable('blueprint_ls') ``` Default config: - `cmd` : ```lua { "blueprint-compiler", "lsp" } ``` - `cmd_env` : ```lua { GLOB_PATTERN = "*@(.blp)" } ``` - `filetypes` : ```lua { "blueprint" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## bqls https://github.com/kitagry/bqls The `bqls` BigQuery language server can be installed by running: ```sh $ go install github.com/kitagry/bqls@latest ``` Snippet to enable the language server: ```lua vim.lsp.enable('bqls') ``` Default config: - `cmd` : ```lua { "bqls" } ``` - `filetypes` : ```lua { "sql" } ``` - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua {} ``` --- ## bright_script https://github.com/RokuCommunity/brighterscript `brightscript` can be installed via `npm`: ```sh npm install -g brighterscript ``` Snippet to enable the language server: ```lua vim.lsp.enable('bright_script') ``` Default config: - `cmd` : ```lua { "bsc", "--lsp", "--stdio" } ``` - `filetypes` : ```lua { "brs" } ``` - `root_markers` : ```lua { "makefile", "Makefile", ".git" } ``` --- ## brioche https://github.com/brioche-dev/brioche `Brioche Language Server`. Snippet to enable the language server: ```lua vim.lsp.enable('brioche') ``` Default config: - `cmd` : ```lua { "brioche", "lsp" } ``` - `filetypes` : ```lua { "brioche" } ``` - `root_markers` : ```lua { "project.bri" } ``` --- ## bsl_ls https://github.com/1c-syntax/bsl-language-server Language Server Protocol implementation for 1C (BSL) - 1C:Enterprise 8 and OneScript languages. Snippet to enable the language server: ```lua vim.lsp.enable('bsl_ls') ``` Default config: - `filetypes` : ```lua { "bsl", "os" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## buck2 https://github.com/facebook/buck2 Build system, successor to Buck To better detect Buck2 project files, the following can be added: ``` vim.cmd [[ autocmd BufRead,BufNewFile *.bxl,BUCK,TARGETS set filetype=bzl ]] ``` Snippet to enable the language server: ```lua vim.lsp.enable('buck2') ``` Default config: - `cmd` : ```lua { "buck2", "lsp" } ``` - `filetypes` : ```lua { "bzl" } ``` - `root_markers` : ```lua { ".buckconfig" } ``` --- ## buddy_ls https://github.com/buddy-compiler/buddy-mlir#buddy-lsp-server The Language Server for the buddy-mlir, a drop-in replacement for mlir-lsp-server, supporting new dialects defined in buddy-mlir. `buddy-lsp-server` can be installed at the buddy-mlir repository (buddy-compiler/buddy-mlir) Snippet to enable the language server: ```lua vim.lsp.enable('buddy_ls') ``` Default config: - `cmd` : ```lua { "buddy-lsp-server" } ``` - `filetypes` : ```lua { "mlir" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## buf_ls https://github.com/bufbuild/buf buf lsp included in the cli itself buf lsp is a Protobuf language server compatible with Buf modules and workspaces Snippet to enable the language server: ```lua vim.lsp.enable('buf_ls') ``` Default config: - `cmd` : ```lua { "buf", "lsp", "serve", "--log-format=text" } ``` - `filetypes` : ```lua { "proto" } ``` - `reuse_client`: [../lsp/buf_ls.lua:9](../lsp/buf_ls.lua#L9) - `root_markers` : ```lua { "buf.yaml", ".git" } ``` --- ## bzl https://bzl.io/ https://docs.stack.build/docs/cli/installation https://docs.stack.build/docs/vscode/starlark-language-server Snippet to enable the language server: ```lua vim.lsp.enable('bzl') ``` Default config: - `cmd` : ```lua { "bzl", "lsp", "serve" } ``` - `filetypes` : ```lua { "bzl" } ``` - `root_markers` : ```lua { "WORKSPACE", "WORKSPACE.bazel" } ``` --- ## c3_lsp https://github.com/pherrymason/c3-lsp Language Server for c3. Snippet to enable the language server: ```lua vim.lsp.enable('c3_lsp') ``` Default config: - `cmd` : ```lua { "c3lsp" } ``` - `filetypes` : ```lua { "c3", "c3i" } ``` - `root_markers` : ```lua { "project.json", "manifest.json", ".git" } ``` --- ## cairo_ls [Cairo Language Server](https://github.com/starkware-libs/cairo/tree/main/crates/cairo-lang-language-server) First, install Cairo following [this tutorial](https://book.cairo-lang.org/ch01-01-installation.html) Then enable Cairo Language Server in your Lua configuration. ```lua vim.lsp.enable('cairo_ls') ``` *cairo-language-server is still under active development, some features might not work yet !* Snippet to enable the language server: ```lua vim.lsp.enable('cairo_ls') ``` Default config: - `cmd` : ```lua { "scarb", "cairo-language-server", "/C", "--node-ipc" } ``` - `filetypes` : ```lua { "cairo" } ``` - `init_options` : ```lua { hostInfo = "neovim" } ``` - `root_markers` : ```lua { "Scarb.toml", "cairo_project.toml", ".git" } ``` --- ## ccls https://github.com/MaskRay/ccls/wiki ccls relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified as compile_commands.json or, for simpler projects, a .ccls. For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html). Alternatively, you can use [Bear](https://github.com/rizsotto/Bear). Customization options are passed to ccls at initialization time via init_options, a list of available options can be found [here](https://github.com/MaskRay/ccls/wiki/Customization#initialization-options). For example: ```lua vim.lsp.config("ccls", { init_options = { compilationDatabaseDirectory = "build"; index = { threads = 0; }; clang = { excludeArgs = { "-frounding-math"} ; }; } }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('ccls') ``` Default config: - `cmd` : ```lua { "ccls" } ``` - `filetypes` : ```lua { "c", "cpp", "objc", "objcpp", "cuda" } ``` - `offset_encoding` : ```lua "utf-32" ``` - `on_attach`: [../lsp/ccls.lua:41](../lsp/ccls.lua#L41) - `root_markers` : ```lua { "compile_commands.json", ".ccls", ".git" } ``` - `workspace_required` : `true` --- ## cds_lsp https://cap.cloud.sap/docs/ `cds-lsp` can be installed via `npm`: ```sh npm i -g @sap/cds-lsp ``` Snippet to enable the language server: ```lua vim.lsp.enable('cds_lsp') ``` Default config: - `cmd` : ```lua { "cds-lsp", "--stdio" } ``` - `filetypes` : ```lua { "cds" } ``` - `root_markers` : ```lua { "package.json", "db", "srv" } ``` - `settings` : ```lua { cds = { validate = true } } ``` --- ## cir_lsp_server https://llvm.github.io/clangir The Language Server for the LLVM ClangIR language `cir-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) Snippet to enable the language server: ```lua vim.lsp.enable('cir_lsp_server') ``` Default config: - `cmd` : ```lua { "cir-lsp-server" } ``` - `filetypes` : ```lua { "cir" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## circom-lsp [Circom Language Server](https://github.com/rubydusa/circom-lsp) `circom-lsp`, the language server for the Circom language. Snippet to enable the language server: ```lua vim.lsp.enable('circom-lsp') ``` Default config: - `cmd` : ```lua { "circom-lsp" } ``` - `filetypes` : ```lua { "circom" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## clangd https://clangd.llvm.org/installation.html - **NOTE:** Clang >= 11 is recommended! See [#23](https://github.com/neovim/nvim-lspconfig/issues/23). - If `compile_commands.json` lives in a build directory, you should symlink it to the root of your source tree. ``` ln -s /path/to/myproject/build/compile_commands.json /path/to/myproject/ ``` - clangd relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified as compile_commands.json, see https://clangd.llvm.org/installation#compile_commandsjson Snippet to enable the language server: ```lua vim.lsp.enable('clangd') ``` Default config: - `capabilities` : ```lua { offsetEncoding = { "utf-8", "utf-16" }, textDocument = { completion = { editsNearCursor = true } } } ``` - `cmd` : ```lua { "clangd" } ``` - `filetypes` : ```lua { "c", "cpp", "objc", "objcpp", "cuda" } ``` - `get_language_id`: [../lsp/clangd.lua:65](../lsp/clangd.lua#L65) - `on_attach`: [../lsp/clangd.lua:65](../lsp/clangd.lua#L65) - `on_init`: [../lsp/clangd.lua:65](../lsp/clangd.lua#L65) - `root_markers` : ```lua { ".clangd", ".clang-tidy", ".clang-format", "compile_commands.json", "compile_flags.txt", "configure.ac", ".git" } ``` --- ## clarinet https://github.com/hirosystems/clarinet Clarinet is the fastest way to build, test, and deploy smart contracts on the Stacks blockchain. Snippet to enable the language server: ```lua vim.lsp.enable('clarinet') ``` Default config: - `cmd` : ```lua { "clarinet", "lsp" } ``` - `filetypes` : ```lua { "clar", "clarity" } ``` - `root_markers` : ```lua { "Clarinet.toml" } ``` --- ## clojure_lsp https://github.com/clojure-lsp/clojure-lsp Clojure Language Server Snippet to enable the language server: ```lua vim.lsp.enable('clojure_lsp') ``` Default config: - `cmd` : ```lua { "clojure-lsp" } ``` - `filetypes` : ```lua { "clojure", "edn" } ``` - `root_markers` : ```lua { "project.clj", "deps.edn", "build.boot", "shadow-cljs.edn", ".git", "bb.edn" } ``` --- ## cmake https://github.com/regen100/cmake-language-server CMake LSP Implementation Snippet to enable the language server: ```lua vim.lsp.enable('cmake') ``` Default config: - `cmd` : ```lua { "cmake-language-server" } ``` - `filetypes` : ```lua { "cmake" } ``` - `init_options` : ```lua { buildDirectory = "build" } ``` - `root_markers` : ```lua { "CMakePresets.json", "CTestConfig.cmake", ".git", "build", "cmake" } ``` --- ## cobol_ls Cobol language support Snippet to enable the language server: ```lua vim.lsp.enable('cobol_ls') ``` Default config: - `cmd` : ```lua { "cobol-language-support" } ``` - `filetypes` : ```lua { "cobol" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## codebook https://github.com/blopker/codebook An unholy spell checker for code. `codebook-lsp` can be installed by following the instructions [here](https://github.com/blopker/codebook/blob/main/README.md#installation). The default `cmd` assumes that the `codebook-lsp` binary can be found in `$PATH`. Snippet to enable the language server: ```lua vim.lsp.enable('codebook') ``` Default config: - `cmd` : ```lua { "codebook-lsp", "serve" } ``` - `filetypes` : ```lua { "c", "css", "gitcommit", "go", "haskell", "html", "java", "javascript", "javascriptreact", "lua", "markdown", "php", "python", "ruby", "rust", "swift", "toml", "text", "typescript", "typescriptreact", "zig" } ``` - `root_markers` : ```lua { ".git", "codebook.toml", ".codebook.toml" } ``` --- ## coffeesense https://github.com/phil294/coffeesense CoffeeSense Language Server `coffeesense-language-server` can be installed via `npm`: ```sh npm install -g coffeesense-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('coffeesense') ``` Default config: - `cmd` : ```lua { "coffeesense-language-server", "--stdio" } ``` - `filetypes` : ```lua { "coffee" } ``` - `root_markers` : ```lua { "package.json" } ``` --- ## contextive https://github.com/dev-cycles/contextive Language Server for Contextive. Contextive allows you to define terms in a central file and provides auto-completion suggestions and hover panels for these terms wherever they're used. To install the language server, you need to download the appropriate [GitHub release asset](https://github.com/dev-cycles/contextive/releases/) for your operating system and architecture. After the download unzip the Contextive.LanguageServer binary and copy the file into a folder that is included in your system's PATH. Snippet to enable the language server: ```lua vim.lsp.enable('contextive') ``` Default config: - `cmd` : ```lua { "Contextive.LanguageServer" } ``` - `root_markers` : ```lua { ".contextive", ".git" } ``` --- ## copilot https://www.npmjs.com/package/@github/copilot-language-server The Copilot Language Server enables any editor or IDE to integrate with GitHub Copilot via [the language server protocol](https://microsoft.github.io/language-server-protocol/). **[GitHub Copilot](https://github.com/features/copilot)** is an AI pair programmer tool that helps you write code faster and smarter. **Sign up for [GitHub Copilot Free](https://github.com/settings/copilot)!** Please see [terms of use for GitHub Copilot](https://docs.github.com/en/site-policy/github-terms/github-terms-for-additional-products-and-features#github-copilot) You need to enable `:help lsp-inline-completion` to receive suggestions. For example, you can enable it in the LspAttach event: ```lua vim.api.nvim_create_autocmd('LspAttach', { callback = function(args) local bufnr = args.buf local client = assert(vim.lsp.get_client_by_id(args.data.client_id)) if client:supports_method(vim.lsp.protocol.Methods.textDocument_inlineCompletion, bufnr) then vim.lsp.inline_completion.enable(true, { bufnr = bufnr }) vim.keymap.set( 'i', '', vim.lsp.inline_completion.get, { desc = 'LSP: accept inline completion', buffer = bufnr } ) vim.keymap.set( 'i', '', vim.lsp.inline_completion.select, { desc = 'LSP: switch inline completion', buffer = bufnr } ) end end }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('copilot') ``` Default config: - `cmd` : ```lua { "copilot-language-server", "--stdio" } ``` - `init_options` : ```lua { editorInfo = { name = "Neovim", version = "0.13.0" }, editorPluginInfo = { name = "Neovim", version = "0.13.0" } } ``` - `on_attach`: [../lsp/copilot.lua:106](../lsp/copilot.lua#L106) - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua { telemetry = { telemetryLevel = "all" } } ``` --- ## coq_lsp https://github.com/ejgallego/coq-lsp/ Snippet to enable the language server: ```lua vim.lsp.enable('coq_lsp') ``` Default config: - `cmd` : ```lua { "coq-lsp" } ``` - `filetypes` : ```lua { "coq" } ``` - `root_markers` : ```lua { "_CoqProject", ".git" } ``` --- ## crystalline https://github.com/elbywan/crystalline Crystal language server. Snippet to enable the language server: ```lua vim.lsp.enable('crystalline') ``` Default config: - `cmd` : ```lua { "crystalline" } ``` - `filetypes` : ```lua { "crystal" } ``` - `root_markers` : ```lua { "shard.yml", ".git" } ``` --- ## csharp_ls https://github.com/razzmatazz/csharp-language-server Language Server for C#. csharp-ls requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. The preferred way to install csharp-ls is with `dotnet tool install --global csharp-ls`. Snippet to enable the language server: ```lua vim.lsp.enable('csharp_ls') ``` Default config: - `cmd`: [../lsp/csharp_ls.lua:14](../lsp/csharp_ls.lua#L14) - `filetypes` : ```lua { "cs" } ``` - `get_language_id`: [../lsp/csharp_ls.lua:14](../lsp/csharp_ls.lua#L14) - `init_options` : ```lua { AutomaticWorkspaceInit = true } ``` - `root_dir`: [../lsp/csharp_ls.lua:14](../lsp/csharp_ls.lua#L14) --- ## cspell_ls [cspell language server](https://github.com/vlabo/cspell-lsp) Snippet to enable the language server: ```lua vim.lsp.enable('cspell_ls') ``` Default config: - `cmd` : ```lua { "cspell-lsp", "--stdio" } ``` - `root_markers` : ```lua { ".git", "cspell.json", ".cspell.json", "cspell.json", ".cSpell.json", "cSpell.json", "cspell.config.js", "cspell.config.cjs", "cspell.config.json", "cspell.config.yaml", "cspell.config.yml", "cspell.yaml", "cspell.yml" } ``` --- ## css_variables https://github.com/vunguyentuan/vscode-css-variables/tree/master/packages/css-variables-language-server CSS variables autocompletion and go-to-definition `css-variables-language-server` can be installed via `npm`: ```sh npm i -g css-variables-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('css_variables') ``` Default config: - `cmd` : ```lua { "css-variables-language-server", "--stdio" } ``` - `filetypes` : ```lua { "css", "scss", "less" } ``` - `root_dir`: [../lsp/css_variables.lua:14](../lsp/css_variables.lua#L14) - `settings` : ```lua { cssVariables = { blacklistFolders = { "**/.cache", "**/.DS_Store", "**/.git", "**/.hg", "**/.next", "**/.svn", "**/bower_components", "**/CVS", "**/dist", "**/node_modules", "**/tests", "**/tmp" }, lookupFiles = { "**/*.less", "**/*.scss", "**/*.sass", "**/*.css" } } } ``` --- ## cssls https://github.com/hrsh7th/vscode-langservers-extracted `css-languageserver` can be installed via `npm`: ```sh npm i -g vscode-langservers-extracted ``` Neovim does not currently include built-in snippets. `vscode-css-language-server` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. ```lua --Enable (broadcasting) snippet capability for completion local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true vim.lsp.config('cssls', { capabilities = capabilities, }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('cssls') ``` Default config: - `cmd` : ```lua { "vscode-css-language-server", "--stdio" } ``` - `filetypes` : ```lua { "css", "scss", "less" } ``` - `init_options` : ```lua { provideFormatter = true } ``` - `root_markers` : ```lua { "package.json", ".git" } ``` - `settings` : ```lua { css = { validate = true }, less = { validate = true }, scss = { validate = true } } ``` --- ## cssmodules_ls https://github.com/antonk52/cssmodules-language-server Language server for autocompletion and go-to-definition functionality for CSS modules. You can install cssmodules-language-server via npm: ```sh npm install -g cssmodules-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('cssmodules_ls') ``` Default config: - `cmd` : ```lua { "cssmodules-language-server" } ``` - `filetypes` : ```lua { "javascript", "javascriptreact", "typescript", "typescriptreact" } ``` - `root_markers` : ```lua { "package.json" } ``` --- ## cucumber_language_server https://cucumber.io https://github.com/cucumber/common https://www.npmjs.com/package/@cucumber/language-server Language server for Cucumber. `cucumber-language-server` can be installed via `npm`: ```sh npm install -g @cucumber/language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('cucumber_language_server') ``` Default config: - `cmd` : ```lua { "cucumber-language-server", "--stdio" } ``` - `filetypes` : ```lua { "cucumber" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## cue https://github.com/cue-lang/cue CUE makes it easy to validate data, write schemas, and ensure configurations align with policies. Snippet to enable the language server: ```lua vim.lsp.enable('cue') ``` Default config: - `cmd` : ```lua { "cue", "lsp" } ``` - `filetypes` : ```lua { "cue" } ``` - `root_markers` : ```lua { "cue.mod", ".git" } ``` --- ## custom_elements_ls https://github.com/Matsuuu/custom-elements-language-server `custom-elements-languageserver` depends on `typescript`. Both packages can be installed via `npm`: ```sh npm install -g typescript custom-elements-languageserver ``` To configure typescript language server, add a [`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) or [`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to the root of your project. Here's an example that disables type checking in JavaScript files. ```json { "compilerOptions": { "module": "commonjs", "target": "es6", "checkJs": false }, "exclude": [ "node_modules" ] } ``` Snippet to enable the language server: ```lua vim.lsp.enable('custom_elements_ls') ``` Default config: - `cmd` : ```lua { "custom-elements-languageserver", "--stdio" } ``` - `init_options` : ```lua { hostInfo = "neovim" } ``` - `root_markers` : ```lua { "tsconfig.json", "package.json", "jsconfig.json", ".git" } ``` --- ## cypher_ls https://github.com/neo4j/cypher-language-support/tree/main/packages/language-server `cypher-language-server`, language server for Cypher query language. Part of the umbrella project cypher-language-support: https://github.com/neo4j/cypher-language-support `cypher-language-server` can be installed via `npm`: ```sh npm i -g @neo4j-cypher/language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('cypher_ls') ``` Default config: - `cmd` : ```lua { "cypher-language-server", "--stdio" } ``` - `filetypes` : ```lua { "cypher" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## daedalus_ls DaedalusLanguageServer Snippet to enable the language server: ```lua vim.lsp.enable('daedalus_ls') ``` Default config: - `cmd` : ```lua { "DaedalusLanguageServer" } ``` - `filetypes` : ```lua { "d" } ``` - `root_markers` : ```lua { "Gothic.src", "Camera.src", "Menu.src", "Music.src", "ParticleFX.src", "SFX.src", "VisualFX.src" } ``` - `settings` : ```lua { DaedalusLanguageServer = { fileEncoding = "Windows-1252", inlayHints = { constants = true }, loglevel = "debug", numParserThreads = 16, srcFileEncoding = "Windows-1252" } } ``` --- ## dafny Support for the Dafny language server. Snippet to enable the language server: ```lua vim.lsp.enable('dafny') ``` Default config: - `cmd` : ```lua { "dafny", "server" } ``` - `filetypes` : ```lua { "dfy", "dafny" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## dagger https://github.com/dagger/cuelsp Dagger's lsp server for cuelang. Snippet to enable the language server: ```lua vim.lsp.enable('dagger') ``` Default config: - `cmd` : ```lua { "cuelsp" } ``` - `filetypes` : ```lua { "cue" } ``` - `root_markers` : ```lua { "cue.mod", ".git" } ``` --- ## dartls https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server/tool/lsp_spec Language server for dart. Snippet to enable the language server: ```lua vim.lsp.enable('dartls') ``` Default config: - `cmd` : ```lua { "dart", "language-server", "--protocol=lsp" } ``` - `filetypes` : ```lua { "dart" } ``` - `init_options` : ```lua { closingLabels = true, flutterOutline = true, onlyAnalyzeProjectsWithOpenFiles = true, outline = true, suggestFromUnimportedLibraries = true } ``` - `root_markers` : ```lua { "pubspec.yaml" } ``` - `settings` : ```lua { dart = { completeFunctionCalls = true, showTodos = true } } ``` --- ## dcmls https://dcm.dev/ Language server for DCM analyzer. Snippet to enable the language server: ```lua vim.lsp.enable('dcmls') ``` Default config: - `cmd` : ```lua { "dcm", "start-server", "--client=neovim" } ``` - `filetypes` : ```lua { "dart" } ``` - `root_markers` : ```lua { "pubspec.yaml" } ``` --- ## debputy https://salsa.debian.org/debian/debputy Language Server for Debian packages. Snippet to enable the language server: ```lua vim.lsp.enable('debputy') ``` Default config: - `cmd` : ```lua { "debputy", "lsp", "server" } ``` - `filetypes` : ```lua { "debcontrol", "debcopyright", "debchangelog", "autopkgtest", "make", "yaml" } ``` - `root_markers` : ```lua { "debian" } ``` --- ## denols https://github.com/denoland/deno Deno's built-in language server To appropriately highlight codefences returned from denols, you will need to augment vim.g.markdown_fenced languages in your init.lua. Example: ```lua vim.g.markdown_fenced_languages = { "ts=typescript" } ``` Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that expects to run in Node or Web Browsers. This supports having a Deno module that is a part of a mostly-not-Deno monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json or deno.jsonc. Note that this means that without a deno.json, deno.jsonc, or deno.lock file, this LSP client will not attach. Example: ``` project-root +-- node_modules/... +-- package-lock.json +-- package.json +-- packages +-- deno-module | +-- deno.json | +-- package.json <-- It's normal for Deno projects to have package.json files! | +-- src | +-- index.ts <-- this is a Deno file +-- node-module +-- package.json +-- src +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgo) ``` From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT. From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT. From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we attach. If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we attach. Otherwise, we abort, because this is a non-Deno TS file. Snippet to enable the language server: ```lua vim.lsp.enable('denols') ``` Default config: - `cmd` : ```lua { "deno", "lsp" } ``` - `cmd_env` : ```lua { NO_COLOR = true } ``` - `filetypes` : ```lua { "javascript", "javascriptreact", "typescript", "typescriptreact" } ``` - `handlers` : ```lua { ["textDocument/definition"] = , ["textDocument/references"] = , ["textDocument/typeDefinition"] = } ``` - `on_attach`: [../lsp/denols.lua:98](../lsp/denols.lua#L98) - `root_dir`: [../lsp/denols.lua:98](../lsp/denols.lua#L98) - `settings` : ```lua { deno = { enable = true, suggest = { imports = { hosts = { ["https://deno.land"] = true } } } } } ``` --- ## dhall_lsp_server https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-lsp-server language server for dhall `dhall-lsp-server` can be installed via cabal: ```sh cabal install dhall-lsp-server ``` prebuilt binaries can be found [here](https://github.com/dhall-lang/dhall-haskell/releases). Snippet to enable the language server: ```lua vim.lsp.enable('dhall_lsp_server') ``` Default config: - `cmd` : ```lua { "dhall-lsp-server" } ``` - `filetypes` : ```lua { "dhall" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## diagnosticls https://github.com/iamcco/diagnostic-languageserver Diagnostic language server integrate with linters. Snippet to enable the language server: ```lua vim.lsp.enable('diagnosticls') ``` Default config: - `cmd` : ```lua { "diagnostic-languageserver", "--stdio" } ``` - `filetypes` : ```lua {} ``` - `root_markers` : ```lua { ".git" } ``` --- ## digestif https://github.com/astoff/digestif Digestif is a code analyzer, and a language server, for LaTeX, ConTeXt et caterva. It provides context-sensitive completion, documentation, code navigation, and related functionality to any text editor that speaks the LSP protocol. Snippet to enable the language server: ```lua vim.lsp.enable('digestif') ``` Default config: - `cmd` : ```lua { "digestif" } ``` - `filetypes` : ```lua { "tex", "plaintex", "context" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## djls https://github.com/joshuadavidthomas/django-language-server `djls`, a language server for the Django web framework. Snippet to enable the language server: ```lua vim.lsp.enable('djls') ``` Default config: - `cmd` : ```lua { "djls", "serve" } ``` - `filetypes` : ```lua { "htmldjango", "html", "python" } ``` - `root_markers` : ```lua { "manage.py", "pyproject.toml", ".git" } ``` --- ## djlsp https://github.com/fourdigits/django-template-lsp `djlsp`, a language server for Django templates. Snippet to enable the language server: ```lua vim.lsp.enable('djlsp') ``` Default config: - `cmd` : ```lua { "djlsp" } ``` - `filetypes` : ```lua { "html", "htmldjango" } ``` - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua {} ``` --- ## docker_compose_language_service https://github.com/microsoft/compose-language-service This project contains a language service for Docker Compose. `compose-language-service` can be installed via `npm`: ```sh npm install @microsoft/compose-language-service ``` Note: If the docker-compose-langserver doesn't startup when entering a `docker-compose.yaml` file, make sure that the filetype is `yaml.docker-compose`. You can set with: `:set filetype=yaml.docker-compose`. Snippet to enable the language server: ```lua vim.lsp.enable('docker_compose_language_service') ``` Default config: - `cmd` : ```lua { "docker-compose-langserver", "--stdio" } ``` - `filetypes` : ```lua { "yaml.docker-compose" } ``` - `root_markers` : ```lua { "docker-compose.yaml", "docker-compose.yml", "compose.yaml", "compose.yml" } ``` --- ## docker_language_server https://github.com/docker/docker-language-server `docker-langserver-server` can be installed via `go`: ```sh go install github.com/docker/docker-language-server/cmd/docker-language-server@latest ``` Snippet to enable the language server: ```lua vim.lsp.enable('docker_language_server') ``` Default config: - `cmd` : ```lua { "docker-language-server", "start", "--stdio" } ``` - `filetypes` : ```lua { "dockerfile", "yaml.docker-compose" } ``` - `get_language_id`: [../lsp/docker_language_server.lua:11](../lsp/docker_language_server.lua#L11) - `root_markers` : ```lua { "Dockerfile", "docker-compose.yaml", "docker-compose.yml", "compose.yaml", "compose.yml", "docker-bake.json", "docker-bake.hcl", "docker-bake.override.json", "docker-bake.override.hcl" } ``` --- ## dockerls https://github.com/rcjsuen/dockerfile-language-server-nodejs `docker-langserver` can be installed via `npm`: ```sh npm install -g dockerfile-language-server-nodejs ``` Additional configuration can be applied in the following way: ```lua vim.lsp.config('dockerls', { settings = { docker = { languageserver = { formatter = { ignoreMultilineInstructions = true, }, }, } } }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('dockerls') ``` Default config: - `cmd` : ```lua { "docker-langserver", "--stdio" } ``` - `filetypes` : ```lua { "dockerfile" } ``` - `root_markers` : ```lua { "Dockerfile" } ``` --- ## dolmenls https://github.com/Gbury/dolmen/blob/master/doc/lsp.md `dolmenls` can be installed via `opam` ```sh opam install dolmen_lsp ``` Snippet to enable the language server: ```lua vim.lsp.enable('dolmenls') ``` Default config: - `cmd` : ```lua { "dolmenls" } ``` - `filetypes` : ```lua { "smt2", "tptp", "p", "cnf", "icnf", "zf" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## dotls https://github.com/nikeee/dot-language-server `dot-language-server` can be installed via `npm`: ```sh npm install -g dot-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('dotls') ``` Default config: - `cmd` : ```lua { "dot-language-server", "--stdio" } ``` - `filetypes` : ```lua { "dot" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## dprint https://github.com/dprint/dprint Pluggable and configurable code formatting platform written in Rust. Snippet to enable the language server: ```lua vim.lsp.enable('dprint') ``` Default config: - `cmd` : ```lua { "dprint", "lsp" } ``` - `filetypes` : ```lua { "javascript", "javascriptreact", "typescript", "typescriptreact", "json", "jsonc", "markdown", "python", "toml", "rust", "roslyn", "graphql" } ``` - `root_markers` : ```lua { "dprint.json", ".dprint.json", "dprint.jsonc", ".dprint.jsonc" } ``` - `settings` : ```lua {} ``` --- ## ds_pinyin_lsp https://github.com/iamcco/ds-pinyin-lsp Dead simple Pinyin language server for input Chinese without IME(input method). To install, download the latest [release](https://github.com/iamcco/ds-pinyin-lsp/releases) and ensure `ds-pinyin-lsp` is on your path. And make ensure the database file `dict.db3` is also downloaded. And put the path to `dict.dbs` in the following code. ```lua vim.lsp.config('ds_pinyin_lsp', { init_options = { db_path = "your_path_to_database" } }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('ds_pinyin_lsp') ``` Default config: - `cmd` : ```lua { "ds-pinyin-lsp" } ``` - `filetypes` : ```lua { "markdown", "org" } ``` - `init_options` : ```lua { completion_on = true, match_as_same_as_input = true, match_long_input = true, max_suggest = 15, show_symbols = true, show_symbols_by_n_times = 0, show_symbols_only_follow_by_hanzi = false } ``` - `on_attach`: [../lsp/ds_pinyin_lsp.lua:48](../lsp/ds_pinyin_lsp.lua#L48) - `root_markers` : ```lua { ".git" } ``` --- ## dts_lsp `dts-lsp` is an LSP for Devicetree files built on top of tree-sitter-devicetree grammar. Language servers can be used in many editors, such as Visual Studio Code, Emacs or Vim Install `dts-lsp` from https://github.com/igor-prusov/dts-lsp and add it to path `dts-lsp` doesn't require any configuration. More about Devicetree: https://www.devicetree.org/ https://docs.zephyrproject.org/latest/build/dts/index.html Snippet to enable the language server: ```lua vim.lsp.enable('dts_lsp') ``` Default config: - `cmd` : ```lua { "dts-lsp" } ``` - `filetypes` : ```lua { "dts", "dtsi", "overlay" } ``` - `name` : ```lua "dts_lsp" ``` - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua {} ``` --- ## earthlyls https://github.com/glehmann/earthlyls A fast language server for earthly. Snippet to enable the language server: ```lua vim.lsp.enable('earthlyls') ``` Default config: - `cmd` : ```lua { "earthlyls" } ``` - `filetypes` : ```lua { "earthfile" } ``` - `root_markers` : ```lua { "Earthfile" } ``` --- ## ecsact https://github.com/ecsact-dev/ecsact_lsp_server Language server for Ecsact. The default cmd assumes `ecsact_lsp_server` is in your PATH. Typically from the Ecsact SDK: https://ecsact.dev/start Snippet to enable the language server: ```lua vim.lsp.enable('ecsact') ``` Default config: - `cmd` : ```lua { "ecsact_lsp_server", "--stdio" } ``` - `filetypes` : ```lua { "ecsact" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## efm https://github.com/mattn/efm-langserver General purpose Language Server that can use specified error message format generated from specified command. Requires at minimum EFM version [v0.0.38](https://github.com/mattn/efm-langserver/releases/tag/v0.0.38) to support launching the language server on single files. Note: In order for neovim's built-in language server client to send the appropriate `languageId` to EFM, **you must specify `filetypes` in your call to `vim.lsp.config`**. Otherwise the server will be launch on the `BufEnter` instead of the `FileType` autocommand, and the `filetype` variable used to populate the `languageId` will not yet be set. ```lua vim.lsp.config('efm', { filetypes = { 'python','cpp','lua' } settings = ..., -- You must populate this according to the EFM readme }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('efm') ``` Default config: - `cmd` : ```lua { "efm-langserver" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## elixirls https://github.com/elixir-lsp/elixir-ls `elixir-ls` can be installed by following the instructions [here](https://github.com/elixir-lsp/elixir-ls#building-and-running). 1. Download the zip from https://github.com/elixir-lsp/elixir-ls/releases/latest/ 2. Unzip it and make it executable. ```bash unzip elixir-ls.zip -d /path/to/elixir-ls # Unix chmod +x /path/to/elixir-ls/language_server.sh ``` **By default, elixir-ls doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of your unzipped elixir-ls. ```lua vim.lsp.config('elixirls', { -- Unix cmd = { "/path/to/elixir-ls/language_server.sh" }; -- Windows cmd = { "/path/to/elixir-ls/language_server.bat" }; ... }) ``` 'root_dir' is chosen like this: if two or more directories containing `mix.exs` were found when searching directories upward, the second one (higher up) is chosen, with the assumption that it is the root of an umbrella app. Otherwise the directory containing the single mix.exs that was found is chosen. Snippet to enable the language server: ```lua vim.lsp.enable('elixirls') ``` Default config: - `cmd` : ```lua { "elixir-ls" } ``` - `filetypes` : ```lua { "elixir", "eelixir", "heex", "surface" } ``` - `root_dir`: [../lsp/elixirls.lua:34](../lsp/elixirls.lua#L34) --- ## elmls https://github.com/elm-tooling/elm-language-server#installation If you don't want to use Nvim to install it, then you can use: ```sh npm install -g elm elm-test elm-format @elm-tooling/elm-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('elmls') ``` Default config: - `capabilities` : ```lua { offsetEncoding = { "utf-8", "utf-16" } } ``` - `cmd` : ```lua { "elm-language-server" } ``` - `filetypes` : ```lua { "elm" } ``` - `init_options` : ```lua { disableElmLSDiagnostics = false, elmReviewDiagnostics = "off", onlyUpdateDiagnosticsOnSave = false, skipInstallPackageConfirmation = false } ``` - `root_dir`: [../lsp/elmls.lua:13](../lsp/elmls.lua#L13) --- ## elp https://whatsapp.github.io/erlang-language-platform ELP integrates Erlang into modern IDEs via the language server protocol and was inspired by rust-analyzer. Snippet to enable the language server: ```lua vim.lsp.enable('elp') ``` Default config: - `cmd` : ```lua { "elp", "server" } ``` - `filetypes` : ```lua { "erlang" } ``` - `root_markers` : ```lua { "rebar.config", "erlang.mk", ".git" } ``` --- ## ember https://github.com/ember-tooling/ember-language-server `ember-language-server` can be installed via `npm`: ```sh npm install -g @ember-tooling/ember-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('ember') ``` Default config: - `cmd` : ```lua { "ember-language-server", "--stdio" } ``` - `filetypes` : ```lua { "handlebars", "typescript", "javascript", "typescript.glimmer", "javascript.glimmer" } ``` - `root_markers` : ```lua { "ember-cli-build.js", ".git" } ``` --- ## emmet_language_server https://github.com/olrtg/emmet-language-server Package can be installed via `npm`: ```sh npm install -g @olrtg/emmet-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('emmet_language_server') ``` Default config: - `cmd` : ```lua { "emmet-language-server", "--stdio" } ``` - `filetypes` : ```lua { "astro", "css", "eruby", "html", "htmlangular", "htmldjango", "javascriptreact", "less", "sass", "scss", "svelte", "typescriptreact", "vue" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## emmet_ls https://github.com/aca/emmet-ls Package can be installed via `npm`: ```sh npm install -g emmet-ls ``` Snippet to enable the language server: ```lua vim.lsp.enable('emmet_ls') ``` Default config: - `cmd` : ```lua { "emmet-ls", "--stdio" } ``` - `filetypes` : ```lua { "astro", "css", "eruby", "html", "htmlangular", "htmldjango", "javascriptreact", "less", "pug", "sass", "scss", "svelte", "templ", "typescriptreact", "vue" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## emmylua_ls https://github.com/EmmyLuaLs/emmylua-analyzer-rust Emmylua Analyzer Rust. Language Server for Lua. `emmylua_ls` can be installed using `cargo` by following the instructions[here] (https://github.com/EmmyLuaLs/emmylua-analyzer-rust?tab=readme-ov-file#install). The default `cmd` assumes that the `emmylua_ls` binary can be found in `$PATH`. It might require you to provide cargo binaries installation path in it. Snippet to enable the language server: ```lua vim.lsp.enable('emmylua_ls') ``` Default config: - `cmd` : ```lua { "emmylua_ls" } ``` - `filetypes` : ```lua { "lua" } ``` - `root_markers` : ```lua { ".luarc.json", ".emmyrc.json", ".luacheckrc", ".git" } ``` - `workspace_required` : `false` --- ## erg_language_server https://github.com/erg-lang/erg#flags ELS ELS (erg-language-server) is a language server for the Erg programming language. erg-language-server can be installed via `cargo` and used as follows: ```sh cargo install erg --features els erg --language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('erg_language_server') ``` Default config: - `cmd` : ```lua { "erg", "--language-server" } ``` - `filetypes` : ```lua { "erg" } ``` - `root_markers` : ```lua { "package.er", ".git" } ``` --- ## esbonio https://github.com/swyddfa/esbonio Esbonio is a language server for [Sphinx](https://www.sphinx-doc.org/en/master/) documentation projects. The language server can be installed via pip ``` pip install esbonio ``` Since Sphinx is highly extensible you will get best results if you install the language server in the same Python environment as the one used to build your documentation. To ensure that the correct Python environment is picked up, you can either launch `nvim` with the correct environment activated. ``` source env/bin/activate nvim ``` Or you can modify the default `cmd` to include the full path to the Python interpreter. ```lua vim.lsp.config('esbonio', { cmd = { '/path/to/virtualenv/bin/python', '-m', 'esbonio' } }) ``` Esbonio supports a number of config values passed as `init_options` on startup, for example. ```lua vim.lsp.config('esbonio', { init_options = { server = { logLevel = "debug" }, sphinx = { confDir = "/path/to/docs", srcDir = "${confDir}/../docs-src" } }) ``` A full list and explanation of the available options can be found [here](https://docs.esbon.io/en/esbonio-language-server-v0.16.4/lsp/getting-started.html?editor=neovim-lspconfig#configuration) Snippet to enable the language server: ```lua vim.lsp.enable('esbonio') ``` Default config: - `cmd` : ```lua { "python3", "-m", "esbonio" } ``` - `filetypes` : ```lua { "rst" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## eslint https://github.com/hrsh7th/vscode-langservers-extracted `vscode-eslint-language-server` is a linting engine for JavaScript / Typescript. It can be installed via `npm`: ```sh npm i -g vscode-langservers-extracted ``` The default `on_attach` config provides the `LspEslintFixAll` command that can be used to format a document on save: ```lua local base_on_attach = vim.lsp.config.eslint.on_attach vim.lsp.config("eslint", { on_attach = function(client, bufnr) if not base_on_attach then return end base_on_attach(client, bufnr) vim.api.nvim_create_autocmd("BufWritePre", { buffer = bufnr, command = "LspEslintFixAll", }) end, }) ``` See [vscode-eslint](https://github.com/microsoft/vscode-eslint/blob/55871979d7af184bf09af491b6ea35ebd56822cf/server/src/eslintServer.ts#L216-L229) for configuration options. Messages handled in lspconfig: `eslint/openDoc`, `eslint/confirmESLintExecution`, `eslint/probeFailed`, `eslint/noLibrary` Additional messages you can handle: `eslint/noConfig` ### Monorepo support `vscode-eslint-language-server` supports monorepos by default. It will automatically find the config file corresponding to the package you are working on. You can use different configs in different packages. This works without the need of spawning multiple instances of `vscode-eslint-language-server`. You can use a different version of ESLint in each package, but it is recommended to use the same version of ESLint in all packages. The location of the ESLint binary will be determined automatically. /!\ When using flat config files, you need to use them across all your packages in your monorepo, as it's a global setting for the server. ### Flat config in ESLint versions prior to 10.0 If you're using a ESLint version that supports both flat config and eslintrc (>= 8.21, < 10.0) and want to change the [default behavior](https://eslint.org/blog/2023/10/flat-config-rollout-plans/), you'll need to set `experimental.useFlatConfig` accordingly: ```lua vim.lsp.config("eslint", { settings = { experimental = { -- If you want to use flat config on >= 8.21, < 9.0 useFlatConfig = true, -- Or if you want to use eslintrc on 9.* -- useFlatConfig = false, } } }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('eslint') ``` Default config: - `before_init`: [../lsp/eslint.lua:79](../lsp/eslint.lua#L79) - `cmd` : ```lua { "vscode-eslint-language-server", "--stdio" } ``` - `filetypes` : ```lua { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "astro", "htmlangular" } ``` - `handlers` : ```lua { ["eslint/confirmESLintExecution"] = , ["eslint/noLibrary"] = , ["eslint/openDoc"] = , ["eslint/probeFailed"] = } ``` - `on_attach`: [../lsp/eslint.lua:79](../lsp/eslint.lua#L79) - `root_dir`: [../lsp/eslint.lua:79](../lsp/eslint.lua#L79) - `settings` : ```lua { codeAction = { disableRuleComment = { enable = true, location = "separateLine" }, showDocumentation = { enable = true } }, codeActionOnSave = { enable = false, mode = "all" }, experimental = {}, format = true, nodePath = "", onIgnoredFiles = "off", problems = { shortenToSingleLine = false }, quiet = false, rulesCustomizations = {}, run = "onType", useESLintClass = false, validate = "on", workingDirectory = { mode = "auto" } } ``` - `workspace_required` : `true` --- ## expert https://github.com/elixir-lang/expert Expert is the official language server implementation for the Elixir programming language. 'root_dir' is chosen like this: if two or more directories containing `mix.exs` were found when searching directories upward, the second one (higher up) is chosen, with the assumption that it is the root of an umbrella app. Otherwise the directory containing the single mix.exs that was found is chosen. Snippet to enable the language server: ```lua vim.lsp.enable('expert') ``` Default config: - `cmd` : ```lua { "expert", "--stdio" } ``` - `filetypes` : ```lua { "elixir", "eelixir", "heex", "surface" } ``` - `root_dir`: [../lsp/expert.lua:13](../lsp/expert.lua#L13) --- ## facility_language_server https://github.com/FacilityApi/FacilityLanguageServer Facility language server protocol (LSP) support. Snippet to enable the language server: ```lua vim.lsp.enable('facility_language_server') ``` Default config: - `cmd` : ```lua { "facility-language-server" } ``` - `filetypes` : ```lua { "fsd" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## fennel_language_server https://github.com/rydesun/fennel-language-server Fennel language server protocol (LSP) support. Snippet to enable the language server: ```lua vim.lsp.enable('fennel_language_server') ``` Default config: - `cmd` : ```lua { "fennel-language-server" } ``` - `filetypes` : ```lua { "fennel" } ``` - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua {} ``` --- ## fennel_ls https://sr.ht/~xerool/fennel-ls/ A language server for fennel. fennel-ls is configured using the closest file to your working directory named `flsproject.fnl`. All fennel-ls configuration options [can be found here](https://git.sr.ht/~xerool/fennel-ls/tree/HEAD/docs/manual.md#configuration). Snippet to enable the language server: ```lua vim.lsp.enable('fennel_ls') ``` Default config: - `capabilities` : ```lua { offsetEncoding = { "utf-8", "utf-16" } } ``` - `cmd` : ```lua { "fennel-ls" } ``` - `filetypes` : ```lua { "fennel" } ``` - `root_dir`: [../lsp/fennel_ls.lua:11](../lsp/fennel_ls.lua#L11) - `settings` : ```lua {} ``` --- ## fish_lsp https://github.com/ndonfris/fish-lsp A Language Server Protocol (LSP) tailored for the fish shell. This project aims to enhance the coding experience for fish, by introducing a suite of intelligent features like auto-completion, scope aware symbol analysis, per-token hover generation, and many others. [homepage](https://www.fish-lsp.dev/) Snippet to enable the language server: ```lua vim.lsp.enable('fish_lsp') ``` Default config: - `cmd` : ```lua { "fish-lsp", "start" } ``` - `filetypes` : ```lua { "fish" } ``` - `root_markers` : ```lua { "config.fish", ".git" } ``` --- ## flow https://flow.org/ https://github.com/facebook/flow See below for how to setup Flow itself. https://flow.org/en/docs/install/ See below for lsp command options. ```sh npx flow lsp --help ``` Snippet to enable the language server: ```lua vim.lsp.enable('flow') ``` Default config: - `cmd`: [../lsp/flow.lua:16](../lsp/flow.lua#L16) - `filetypes` : ```lua { "javascript", "javascriptreact" } ``` - `root_markers` : ```lua { ".flowconfig" } ``` --- ## flux_lsp https://github.com/influxdata/flux-lsp `flux-lsp` can be installed via `cargo`: ```sh cargo install --git https://github.com/influxdata/flux-lsp ``` Snippet to enable the language server: ```lua vim.lsp.enable('flux_lsp') ``` Default config: - `cmd` : ```lua { "flux-lsp" } ``` - `filetypes` : ```lua { "flux" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## foam_ls https://github.com/FoamScience/foam-language-server `foam-language-server` can be installed via `npm` ```sh npm install -g foam-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('foam_ls') ``` Default config: - `cmd` : ```lua { "foam-ls", "--stdio" } ``` - `filetypes` : ```lua { "foam", "OpenFOAM" } ``` - `root_dir`: [../lsp/foam_ls.lua:11](../lsp/foam_ls.lua#L11) --- ## fortitude https://fortitude.readthedocs.io/en/stable/ Fortitude is a Fortran linter built in Rust and inspired by (and build upon) Ruff ```sh # Install With uv: uv tool install fortitude-lint@latest # Install with pip: pip install fortitude-lint ``` **LSP is available in Fortitude `v0.8.0`.** Refer to the [documentation](https://fortitude.readthedocs.io/en/stable/editors/) for more details. Snippet to enable the language server: ```lua vim.lsp.enable('fortitude') ``` Default config: - `cmd` : ```lua { "fortitude", "server" } ``` - `filetypes` : ```lua { "fortran" } ``` - `root_markers` : ```lua { "fpm.toml", "fortitude.toml", ".fortitude.toml", ".git" } ``` - `settings` : ```lua {} ``` --- ## fortls https://fortls.fortran-lang.org/index.html fortls is a Fortran Language Server, the server can be installed via pip ```sh pip install fortls ``` Settings to the server can be passed either through the `cmd` option or through a local configuration file e.g. `.fortls`. For more information see the `fortls` [documentation](https://fortls.fortran-lang.org/options.html). Snippet to enable the language server: ```lua vim.lsp.enable('fortls') ``` Default config: - `cmd` : ```lua { "fortls", "--notify_init", "--hover_signature", "--hover_language=fortran", "--use_signature_help" } ``` - `filetypes` : ```lua { "fortran" } ``` - `root_markers` : ```lua { ".fortls", ".fortlsrc", ".fortls.json", ".git" } ``` - `settings` : ```lua {} ``` --- ## fsautocomplete https://github.com/fsharp/FsAutoComplete Language Server for F# provided by FsAutoComplete (FSAC). FsAutoComplete requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. The preferred way to install FsAutoComplete is with `dotnet tool install --global fsautocomplete`. Instructions to compile from source are found on the main [repository](https://github.com/fsharp/FsAutoComplete). You may also need to configure the filetype as Vim defaults to Forth for `*.fs` files: `autocmd BufNewFile,BufRead *.fs,*.fsx,*.fsi set filetype=fsharp` This is automatically done by plugins such as [PhilT/vim-fsharp](https://github.com/PhilT/vim-fsharp), [fsharp/vim-fsharp](https://github.com/fsharp/vim-fsharp), and [adelarsq/neofsharp.vim](https://github.com/adelarsq/neofsharp.vim). Snippet to enable the language server: ```lua vim.lsp.enable('fsautocomplete') ``` Default config: - `cmd` : ```lua { "fsautocomplete", "--adaptive-lsp-server-enabled" } ``` - `filetypes` : ```lua { "fsharp" } ``` - `init_options` : ```lua { AutomaticWorkspaceInit = true } ``` - `root_dir`: [../lsp/fsautocomplete.lua:23](../lsp/fsautocomplete.lua#L23) - `settings` : ```lua { FSharp = { EnableReferenceCodeLens = true, ExternalAutocomplete = false, InterfaceStubGeneration = true, InterfaceStubGenerationMethodBody = 'failwith "Not Implemented"', InterfaceStubGenerationObjectIdentifier = "this", Linter = true, RecordStubGeneration = true, RecordStubGenerationBody = 'failwith "Not Implemented"', ResolveNamespaces = true, SimplifyNameAnalyzer = true, UnionCaseStubGeneration = true, UnionCaseStubGenerationBody = 'failwith "Not Implemented"', UnusedDeclarationsAnalyzer = true, UnusedOpensAnalyzer = true, UseSdkScripts = true, keywordsAutocomplete = true } } ``` --- ## fsharp_language_server F# Language Server https://github.com/faldor20/fsharp-language-server An implementation of the language server protocol using the F# Compiler Service. Build the project from source and override the command path to location of DLL. If filetype determination is not already performed by an available plugin ([PhilT/vim-fsharp](https://github.com/PhilT/vim-fsharp), [fsharp/vim-fsharp](https://github.com/fsharp/vim-fsharp), and [adelarsq/neofsharp.vim](https://github.com/adelarsq/neofsharp.vim). ), then the following must be added to initialization configuration: `autocmd BufNewFile,BufRead *.fs,*.fsx,*.fsi set filetype=fsharp` Snippet to enable the language server: ```lua vim.lsp.enable('fsharp_language_server') ``` Default config: - `cmd` : ```lua { "dotnet", "FSharpLanguageServer.dll" } ``` - `filetypes` : ```lua { "fsharp" } ``` - `init_options` : ```lua { AutomaticWorkspaceInit = true } ``` - `root_dir`: [../lsp/fsharp_language_server.lua:19](../lsp/fsharp_language_server.lua#L19) - `settings` : ```lua {} ``` --- ## fstar https://github.com/FStarLang/FStar LSP support is included in FStar. Make sure `fstar.exe` is in your PATH. Snippet to enable the language server: ```lua vim.lsp.enable('fstar') ``` Default config: - `cmd` : ```lua { "fstar.exe", "--lsp" } ``` - `filetypes` : ```lua { "fstar" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## futhark_lsp https://github.com/diku-dk/futhark Futhark Language Server This language server comes with the futhark compiler and is run with the command ``` futhark lsp ``` Snippet to enable the language server: ```lua vim.lsp.enable('futhark_lsp') ``` Default config: - `cmd` : ```lua { "futhark", "lsp" } ``` - `filetypes` : ```lua { "futhark", "fut" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## gdscript https://github.com/godotengine/godot Language server for GDScript, used by Godot Engine. Snippet to enable the language server: ```lua vim.lsp.enable('gdscript') ``` Default config: - `cmd`: [../lsp/gdscript.lua:11](../lsp/gdscript.lua#L11) - `filetypes` : ```lua { "gd", "gdscript", "gdscript3" } ``` - `root_markers` : ```lua { "project.godot", ".git" } ``` --- ## gdshader_lsp https://github.com/godofavacyn/gdshader-lsp A language server for the Godot Shading language. Snippet to enable the language server: ```lua vim.lsp.enable('gdshader_lsp') ``` Default config: - `cmd` : ```lua { "gdshader-lsp", "--stdio" } ``` - `filetypes` : ```lua { "gdshader", "gdshaderinc" } ``` - `root_markers` : ```lua { "project.godot" } ``` --- ## gh_actions_ls https://github.com/lttb/gh-actions-language-server Language server for GitHub Actions. The projects [forgejo](https://forgejo.org/) and [gitea](https://about.gitea.com/) design their actions to be as compatible to github as possible with only [a few differences](https://docs.gitea.com/usage/actions/comparison#unsupported-workflows-syntax) between the systems. The `gh_actions_ls` is therefore enabled for those `yaml` files as well. The `gh-actions-language-server` can be installed via `npm`: ```sh npm install -g gh-actions-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('gh_actions_ls') ``` Default config: - `capabilities` : ```lua { workspace = { didChangeWorkspaceFolders = { dynamicRegistration = true } } } ``` - `cmd` : ```lua { "gh-actions-language-server", "--stdio" } ``` - `filetypes` : ```lua { "yaml" } ``` - `handlers` : ```lua { ["actions/readFile"] = } ``` - `init_options` : ```lua {} ``` - `root_dir`: [../lsp/gh_actions_ls.lua:18](../lsp/gh_actions_ls.lua#L18) --- ## ghcide https://github.com/digital-asset/ghcide A library for building Haskell IDE tooling. "ghcide" isn't for end users now. Use "haskell-language-server" instead of "ghcide". Snippet to enable the language server: ```lua vim.lsp.enable('ghcide') ``` Default config: - `cmd` : ```lua { "ghcide", "--lsp" } ``` - `filetypes` : ```lua { "haskell", "lhaskell" } ``` - `root_markers` : ```lua { "stack.yaml", "hie-bios", "BUILD.bazel", "cabal.config", "package.yaml" } ``` --- ## ghdl_ls https://github.com/ghdl/ghdl-language-server A language server for VHDL, using ghdl as its backend. `ghdl-ls` is part of pyghdl, for installation instructions see [the upstream README](https://github.com/ghdl/ghdl/tree/master/pyGHDL/lsp). Snippet to enable the language server: ```lua vim.lsp.enable('ghdl_ls') ``` Default config: - `cmd` : ```lua { "ghdl-ls" } ``` - `filetypes` : ```lua { "vhdl" } ``` - `root_markers` : ```lua { "hdl-prj.json", ".git" } ``` --- ## ginko_ls `ginko_ls` is meant to be a feature-complete language server for device-trees. Language servers can be used in many editors, such as Visual Studio Code, Emacs or Vim Install `ginko_ls` from https://github.com/Schottkyc137/ginko and add it to path `ginko_ls` doesn't require any configuration. Snippet to enable the language server: ```lua vim.lsp.enable('ginko_ls') ``` Default config: - `cmd` : ```lua { "ginko_ls" } ``` - `filetypes` : ```lua { "dts" } ``` - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua {} ``` --- ## gitlab_ci_ls https://github.com/alesbrelih/gitlab-ci-ls Language Server for Gitlab CI `gitlab-ci-ls` can be installed via cargo: cargo install gitlab-ci-ls Snippet to enable the language server: ```lua vim.lsp.enable('gitlab_ci_ls') ``` Default config: - `cmd` : ```lua { "gitlab-ci-ls" } ``` - `filetypes` : ```lua { "yaml.gitlab" } ``` - `init_options` : ```lua { cache_path = "/home/runner/.cache/gitlab-ci-ls/", log_path = "/home/runner/.cache/gitlab-ci-ls//log/gitlab-ci-ls.log" } ``` - `root_dir`: [../lsp/gitlab_ci_ls.lua:15](../lsp/gitlab_ci_ls.lua#L15) --- ## gitlab_duo GitLab Duo Language Server Configuration for Neovim https://gitlab.com/gitlab-org/editor-extensions/gitlab-lsp The GitLab LSP enables any editor or IDE to integrate with GitLab Duo for AI-powered code suggestions via the Language Server Protocol. Prerequisites: - Node.js and npm installed - GitLab account with Duo Pro license - Internet connection for OAuth device flow Setup: 1. Run :LspGitLabDuoSignIn to start OAuth authentication 2. Follow the browser prompts to authorize 3. Enable inline completion in LspAttach event (see example below) Inline Completion Example: ```lua vim.api.nvim_create_autocmd('LspAttach', { callback = function(args) local bufnr = args.buf local client = assert(vim.lsp.get_client_by_id(args.data.client_id)) if vim.lsp.inline_completion and client:supports_method(vim.lsp.protocol.Methods.textDocument_inlineCompletion, bufnr) then vim.lsp.inline_completion.enable(true, { bufnr = bufnr }) -- Tab to accept suggestion vim.keymap.set('i', '', function() if vim.lsp.inline_completion.is_visible() then return vim.lsp.inline_completion.accept() else return '' end end, { expr = true, buffer = bufnr, desc = 'GitLab Duo: Accept suggestion' }) -- Alt/Option+[ for previous suggestion vim.keymap.set('i', '', vim.lsp.inline_completion.select_prev, { buffer = bufnr, desc = 'GitLab Duo: Previous suggestion' }) -- Alt/Option+] for next suggestion vim.keymap.set('i', '', vim.lsp.inline_completion.select_next, { buffer = bufnr, desc = 'GitLab Duo: Next suggestion' }) end end }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('gitlab_duo') ``` Default config: - `cmd` : ```lua { "npx", "--registry=https://gitlab.com/api/v4/packages/npm/", "@gitlab-org/gitlab-lsp", "--stdio" } ``` - `filetypes` : ```lua { "ruby", "go", "javascript", "typescript", "typescriptreact", "javascriptreact", "rust", "lua", "python", "java", "cpp", "c", "php", "cs", "kotlin", "swift", "scala", "vue", "svelte", "html", "css", "scss", "json", "yaml" } ``` - `init_options` : ```lua { editorInfo = { name = "Neovim", version = "0.13.0" }, editorPluginInfo = { name = "Neovim LSP", version = "0.13.0" }, extension = { name = "Neovim LSP Client", version = "0.13.0" }, ide = { name = "Neovim", vendor = "Neovim", version = "0.13.0" } } ``` - `on_attach`: [../lsp/gitlab_duo.lua:317](../lsp/gitlab_duo.lua#L317) - `on_init`: [../lsp/gitlab_duo.lua:317](../lsp/gitlab_duo.lua#L317) - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua { baseUrl = "https://gitlab.com", codeCompletion = { enableSecretRedaction = true }, featureFlags = { streamCodeGenerations = false }, logLevel = "info", telemetry = { enabled = false } } ``` --- ## glasgow https://github.com/nolanderc/glasgow Provides language features for WGSL (WebGPU Shading Language): - Completions: - Local functions/variables/types. - Fields and swizzles. - Builtin types and functions (`dot`, `reflect`, `textureSample`, `vec3`, `mat4x2`, etc.) - Hover Documentation: - Function signatures. - Variable types. - Includes builtin types and functions. Text is taken from the WGSL specification. - Goto Definition - Find all References - Rename - Formatter `glasgow` can be installed via `cargo`: ```sh cargo install glasgow ``` Snippet to enable the language server: ```lua vim.lsp.enable('glasgow') ``` Default config: - `cmd` : ```lua { "glasgow" } ``` - `filetypes` : ```lua { "wgsl" } ``` - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua {} ``` --- ## gleam https://github.com/gleam-lang/gleam A language server for Gleam Programming Language. It comes with the Gleam compiler, for installation see: [Installing Gleam](https://gleam.run/getting-started/installing/) Snippet to enable the language server: ```lua vim.lsp.enable('gleam') ``` Default config: - `cmd` : ```lua { "gleam", "lsp" } ``` - `filetypes` : ```lua { "gleam" } ``` - `root_markers` : ```lua { "gleam.toml", ".git" } ``` --- ## glint https://github.com/typed-ember/glint https://typed-ember.gitbook.io/glint/ `glint-language-server` is installed when adding `@glint/core` to your project's devDependencies: ```sh npm install @glint/core --save-dev yarn add -D @glint/core This configuration uses the local installation of `glint-language-server` (found in the `node_modules` directory of your project). To use a global installation of `glint-language-server`, set the `init_options.glint.useGlobal` to `true`. vim.lsp.config('glint', { init_options = { glint = { useGlobal = true, }, }, }) Snippet to enable the language server: ```lua vim.lsp.enable('glint') ``` Default config: - `cmd`: [../lsp/glint.lua:26](../lsp/glint.lua#L26) - `filetypes` : ```lua { "html.handlebars", "handlebars", "typescript", "typescript.glimmer", "javascript", "javascript.glimmer" } ``` - `init_options` : ```lua { glint = { useGlobal = false } } ``` - `root_markers` : ```lua { ".glintrc.yml", ".glintrc", ".glintrc.json", ".glintrc.js", "glint.config.js", "package.json" } ``` - `workspace_required` : `true` --- ## glsl_analyzer https://github.com/nolanderc/glsl_analyzer Language server for GLSL Snippet to enable the language server: ```lua vim.lsp.enable('glsl_analyzer') ``` Default config: - `capabilities` : ```lua {} ``` - `cmd` : ```lua { "glsl_analyzer" } ``` - `filetypes` : ```lua { "glsl", "vert", "tesc", "tese", "frag", "geom", "comp" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## glslls https://github.com/svenstaro/glsl-language-server Language server implementation for GLSL `glslls` can be compiled and installed manually, or, if your distribution has access to the AUR, via the `glsl-language-server` AUR package Snippet to enable the language server: ```lua vim.lsp.enable('glslls') ``` Default config: - `capabilities` : ```lua { offsetEncoding = { "utf-8", "utf-16" }, textDocument = { completion = { editsNearCursor = true } } } ``` - `cmd` : ```lua { "glslls", "--stdin" } ``` - `filetypes` : ```lua { "glsl", "vert", "tesc", "tese", "frag", "geom", "comp" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## gn_language_server https://github.com/google/gn-language-server A language server for GN, the build configuration language used in Chromium, Fuchsia, and other projects. Snippet to enable the language server: ```lua vim.lsp.enable('gn_language_server') ``` Default config: - `cmd` : ```lua { "gn-language-server", "--stdio" } ``` - `filetypes` : ```lua { "gn" } ``` - `root_markers` : ```lua { ".gn", ".git" } ``` --- ## gnls https://github.com/microsoft/gnls Microsoft's language server for GN build files. Assuming there is a `gnls` script somewhere in your `$PATH`, containing for example: ```shell GNLS_SRC_DIR= exec node ${GNLS_SRC_DIR}/build/server.js $@ ``` Snippet to enable the language server: ```lua vim.lsp.enable('gnls') ``` Default config: - `cmd` : ```lua { "gnls", "--stdio" } ``` - `filetypes` : ```lua { "gn" } ``` - `root_markers` : ```lua { ".gn", ".git" } ``` --- ## golangci_lint_ls Combination of both lint server and client https://github.com/nametake/golangci-lint-langserver https://github.com/golangci/golangci-lint Installation of binaries needed is done via ``` go install github.com/nametake/golangci-lint-langserver@latest go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest ``` Snippet to enable the language server: ```lua vim.lsp.enable('golangci_lint_ls') ``` Default config: - `before_init`: [../lsp/golangci_lint_ls.lua:17](../lsp/golangci_lint_ls.lua#L17) - `cmd` : ```lua { "golangci-lint-langserver" } ``` - `filetypes` : ```lua { "go", "gomod" } ``` - `init_options` : ```lua { command = { "golangci-lint", "run", "--output.text.path=", "--output.tab.path=", "--output.html.path=", "--output.checkstyle.path=", "--output.junit-xml.path=", "--output.teamcity.path=", "--output.sarif.path=", "--show-stats=false", "--output.json.path=stdout" } } ``` - `root_markers` : ```lua { ".golangci.yml", ".golangci.yaml", ".golangci.toml", ".golangci.json", "go.work", "go.mod", ".git" } ``` --- ## gopls https://github.com/golang/tools/tree/master/gopls Google's lsp server for golang. Snippet to enable the language server: ```lua vim.lsp.enable('gopls') ``` Default config: - `cmd` : ```lua { "gopls" } ``` - `filetypes` : ```lua { "go", "gomod", "gowork", "gotmpl" } ``` - `root_dir`: [../lsp/gopls.lua:89](../lsp/gopls.lua#L89) --- ## gradle_ls https://github.com/microsoft/vscode-gradle Microsoft's lsp server for gradle files If you're setting this up manually, build vscode-gradle using `./gradlew installDist` and point `cmd` to the `gradle-language-server` generated in the build directory Snippet to enable the language server: ```lua vim.lsp.enable('gradle_ls') ``` Default config: - `cmd` : ```lua { "gradle-language-server" } ``` - `filetypes` : ```lua { "groovy" } ``` - `init_options` : ```lua { settings = { gradleWrapperEnabled = true } } ``` - `root_markers` : ```lua { "settings.gradle", "build.gradle" } ``` --- ## grammarly https://github.com/znck/grammarly `grammarly-languageserver` can be installed via `npm`: ```sh npm i -g grammarly-languageserver ``` WARNING: Since this language server uses Grammarly's API, any document you open with it running is shared with them. Please evaluate their [privacy policy](https://www.grammarly.com/privacy-policy) before using this. Snippet to enable the language server: ```lua vim.lsp.enable('grammarly') ``` Default config: - `cmd` : ```lua { "grammarly-languageserver", "--stdio" } ``` - `filetypes` : ```lua { "markdown" } ``` - `handlers` : ```lua { ["$/updateDocumentState"] = } ``` - `init_options` : ```lua { clientId = "client_BaDkMgx4X19X9UxxYRCXZo" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## graphql https://github.com/graphql/graphiql/tree/main/packages/graphql-language-service-cli `graphql-lsp` can be installed via `npm`: ```sh npm install -g graphql-language-service-cli ``` Note that you must also have [the graphql package](https://github.com/graphql/graphql-js) installed within your project and create a [GraphQL config file](https://the-guild.dev/graphql/config/docs). Snippet to enable the language server: ```lua vim.lsp.enable('graphql') ``` Default config: - `cmd` : ```lua { "graphql-lsp", "server", "-m", "stream" } ``` - `filetypes` : ```lua { "graphql", "typescriptreact", "javascriptreact" } ``` - `root_dir`: [../lsp/graphql.lua:16](../lsp/graphql.lua#L16) --- ## groovyls https://github.com/prominic/groovy-language-server.git Requirements: - Linux/macOS (for now) - Java 11+ `groovyls` can be installed by following the instructions [here](https://github.com/prominic/groovy-language-server.git#build). If you have installed groovy language server, you can set the `cmd` custom path as follow: ```lua vim.lsp.config('groovyls', { -- Unix cmd = { "java", "-jar", "path/to/groovyls/groovy-language-server-all.jar" }, ... }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('groovyls') ``` Default config: - `cmd` : ```lua { "java", "-jar", "groovy-language-server-all.jar" } ``` - `filetypes` : ```lua { "groovy" } ``` - `root_markers` : ```lua { "Jenkinsfile", ".git" } ``` --- ## guile_ls https://codeberg.org/rgherdt/scheme-lsp-server The recommended way is to install guile-lsp-server is using Guix. Unfortunately it is still not available at the official Guix channels, but you can use the provided channel guix.scm in the repo: ```sh guix package -f guix.scm ``` Checkout the repo for more info. Note: This LSP will start on `scheme.guile` filetype. You can set this file type using `:help modeline` or adding https://gitlab.com/HiPhish/guile.vim to your plugins to automatically set it. Snippet to enable the language server: ```lua vim.lsp.enable('guile_ls') ``` Default config: - `cmd` : ```lua { "guile-lsp-server" } ``` - `filetypes` : ```lua { "scheme.guile" } ``` - `root_markers` : ```lua { "guix.scm", ".git" } ``` --- ## harper_ls https://github.com/automattic/harper The language server for Harper, the slim, clean language checker for developers. See our [documentation](https://writewithharper.com/docs/integrations/neovim) for more information on settings. In short, they should look something like this: ```lua vim.lsp.config('harper_ls', { settings = { ["harper-ls"] = { userDictPath = "~/dict.txt" } }, }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('harper_ls') ``` Default config: - `cmd` : ```lua { "harper-ls", "--stdio" } ``` - `filetypes` : ```lua { "asciidoc", "c", "cpp", "cs", "gitcommit", "go", "html", "java", "javascript", "lua", "markdown", "nix", "python", "ruby", "rust", "swift", "toml", "typescript", "typescriptreact", "haskell", "cmake", "typst", "php", "dart", "clojure", "sh" } ``` - `root_markers` : ```lua { ".harper-dictionary.txt", ".git" } ``` --- ## hdl_checker https://github.com/suoto/hdl_checker Language server for hdl-checker. Install using: `pip install hdl-checker --upgrade` Snippet to enable the language server: ```lua vim.lsp.enable('hdl_checker') ``` Default config: - `cmd` : ```lua { "hdl_checker", "--lsp" } ``` - `filetypes` : ```lua { "vhdl", "verilog", "systemverilog" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## helm_ls https://github.com/mrjosh/helm-ls Helm Language server. (This LSP is in early development) `helm Language server` can be installed by following the instructions [here](https://github.com/mrjosh/helm-ls). The default `cmd` assumes that the `helm_ls` binary can be found in `$PATH`. If need Helm file highlight use [vim-helm](https://github.com/towolf/vim-helm) plugin. Snippet to enable the language server: ```lua vim.lsp.enable('helm_ls') ``` Default config: - `capabilities` : ```lua { workspace = { didChangeWatchedFiles = { dynamicRegistration = true } } } ``` - `cmd` : ```lua { "helm_ls", "serve" } ``` - `filetypes` : ```lua { "helm", "yaml.helm-values" } ``` - `root_markers` : ```lua { "Chart.yaml" } ``` --- ## herb_ls https://www.npmjs.com/package/@herb-tools/language-server https://github.com/marcoroth/herb HTML+ERB (HTML + Embedded Ruby) Powerful and seamless HTML-aware ERB parsing and tooling. Herb is designed from the ground up to deeply understand `.html.erb` files, preserving both HTML and embedded Ruby structure without losing any details. `herb-language-server` can be installed via `npm`: ```sh npm install -g @herb-tools/language-server ``` or via `yarn`: ```sh yarn global add @herb-tools/language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('herb_ls') ``` Default config: - `cmd` : ```lua { "herb-language-server", "--stdio" } ``` - `filetypes` : ```lua { "html", "eruby" } ``` - `root_markers` : ```lua { "Gemfile", ".git" } ``` --- ## hhvm Language server for programs written in Hack https://hhvm.com/ https://github.com/facebook/hhvm See below for how to setup HHVM & typechecker: https://docs.hhvm.com/hhvm/getting-started/getting-started Snippet to enable the language server: ```lua vim.lsp.enable('hhvm') ``` Default config: - `cmd` : ```lua { "hh_client", "lsp" } ``` - `filetypes` : ```lua { "php", "hack" } ``` - `root_markers` : ```lua { ".hhconfig" } ``` --- ## hie https://github.com/haskell/haskell-ide-engine the following init_options are supported (see https://github.com/haskell/haskell-ide-engine#configuration): ```lua init_options = { languageServerHaskell = { hlintOn = bool; maxNumberOfProblems = number; diagnosticsDebounceDuration = number; liquidOn = bool (default false); completionSnippetsOn = bool (default true); formatOnImportOn = bool (default true); formattingProvider = string (default "brittany", alternate "floskell"); } } ``` Snippet to enable the language server: ```lua vim.lsp.enable('hie') ``` Default config: - `cmd` : ```lua { "hie-wrapper", "--lsp" } ``` - `filetypes` : ```lua { "haskell" } ``` - `root_markers` : ```lua { "stack.yaml", "package.yaml", ".git" } ``` --- ## hlasm `hlasm_language_server` is a language server for the High Level Assembler language used on IBM SystemZ mainframes. To learn how to configure the HLASM language server, see the [HLASM Language Support documentation](https://github.com/eclipse-che4z/che-che4z-lsp-for-hlasm). Snippet to enable the language server: ```lua vim.lsp.enable('hlasm') ``` Default config: - `cmd` : ```lua { "hlasm_language_server" } ``` - `filetypes` : ```lua { "hlasm" } ``` - `root_markers` : ```lua { ".hlasmplugin" } ``` --- ## hls https://github.com/haskell/haskell-language-server Haskell Language Server If you are using HLS 1.9.0.0, enable the language server to launch on Cabal files as well: ```lua vim.lsp.config('hls', { filetypes = { 'haskell', 'lhaskell', 'cabal' }, }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('hls') ``` Default config: - `cmd` : ```lua { "haskell-language-server-wrapper", "--lsp" } ``` - `filetypes` : ```lua { "haskell", "lhaskell" } ``` - `root_dir`: [../lsp/hls.lua:18](../lsp/hls.lua#L18) - `settings` : ```lua { haskell = { cabalFormattingProvider = "cabal-fmt", formattingProvider = "ormolu" } } ``` --- ## home_assistant https://github.com/keesschollaart81/vscode-home-assistant `vscode-home-assistant` can be installed via from source or by downloading and extracting the VSCode "Home Assistant Config Helper" extension `vscode-home-assistant` is a language server for Home Assistant ported from the VSCode "Home Assistant Config Helper" extension. Snippet to enable the language server: ```lua vim.lsp.enable('home_assistant') ``` Default config: - `cmd` : ```lua { "vscode-home-assistant", "--stdio" } ``` - `filetypes` : ```lua { "yaml" } ``` - `root_markers` : ```lua { "configuration.yaml", "configuration.yml" } ``` --- ## hoon_ls https://github.com/urbit/hoon-language-server A language server for Hoon. The language server can be installed via `npm install -g @hoon-language-server` Start a fake ~zod with `urbit -F zod`. Start the language server at the Urbit Dojo prompt with: `|start %language-server` Snippet to enable the language server: ```lua vim.lsp.enable('hoon_ls') ``` Default config: - `cmd` : ```lua { "hoon-language-server" } ``` - `filetypes` : ```lua { "hoon" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## html https://github.com/hrsh7th/vscode-langservers-extracted `vscode-html-language-server` can be installed via `npm`: ```sh npm i -g vscode-langservers-extracted ``` Neovim does not currently include built-in snippets. `vscode-html-language-server` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. The code-formatting feature of the lsp can be controlled with the `provideFormatter` option. ```lua --Enable (broadcasting) snippet capability for completion local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true vim.lsp.config('html', { capabilities = capabilities, }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('html') ``` Default config: - `cmd` : ```lua { "vscode-html-language-server", "--stdio" } ``` - `filetypes` : ```lua { "html" } ``` - `init_options` : ```lua { configurationSection = { "html", "css", "javascript" }, embeddedLanguages = { css = true, javascript = true }, provideFormatter = true } ``` - `root_markers` : ```lua { "package.json", ".git" } ``` - `settings` : ```lua {} ``` --- ## htmx https://github.com/ThePrimeagen/htmx-lsp `htmx-lsp` can be installed via `cargo`: ```sh cargo install htmx-lsp ``` Lsp is still very much work in progress and experimental. Use at your own risk. Snippet to enable the language server: ```lua vim.lsp.enable('htmx') ``` Default config: - `cmd` : ```lua { "htmx-lsp" } ``` - `filetypes` : ```lua { "aspnetcorerazor", "astro", "astro-markdown", "blade", "clojure", "django-html", "htmldjango", "edge", "eelixir", "elixir", "ejs", "erb", "eruby", "gohtml", "gohtmltmpl", "haml", "handlebars", "hbs", "html", "htmlangular", "html-eex", "heex", "jade", "leaf", "liquid", "markdown", "mdx", "mustache", "njk", "nunjucks", "php", "razor", "slim", "twig", "javascript", "javascriptreact", "reason", "rescript", "typescript", "typescriptreact", "vue", "svelte", "templ" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## hydra_lsp https://github.com/Retsediv/hydra-lsp LSP for Hydra Python package config files. Snippet to enable the language server: ```lua vim.lsp.enable('hydra_lsp') ``` Default config: - `cmd` : ```lua { "hydra-lsp" } ``` - `filetypes` : ```lua { "yaml" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## hylo_ls https://github.com/hylo-lang/hylo-language-server A language server for the Hylo programming language. Snippet to enable the language server: ```lua vim.lsp.enable('hylo_ls') ``` Default config: - `cmd` : ```lua { "hylo-language-server", "--stdio" } ``` - `filetypes` : ```lua { "hylo" } ``` - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua {} ``` --- ## hyprls https://github.com/hyprland-community/hyprls `hyprls` can be installed via `go`: ```sh go install github.com/hyprland-community/hyprls/cmd/hyprls@latest ``` Snippet to enable the language server: ```lua vim.lsp.enable('hyprls') ``` Default config: - `cmd` : ```lua { "hyprls", "--stdio" } ``` - `filetypes` : ```lua { "hyprlang" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## idris2_lsp https://github.com/idris-community/idris2-lsp The Idris 2 language server. Plugins for the Idris 2 filetype include [Idris2-Vim](https://github.com/edwinb/idris2-vim) (fewer features, stable) and [Nvim-Idris2](https://github.com/ShinKage/nvim-idris2) (cutting-edge, experimental). Idris2-Lsp requires a build of Idris 2 that includes the "Idris 2 API" package. Package managers with known support for this build include the [AUR](https://aur.archlinux.org/packages/idris2/) and [Homebrew](https://formulae.brew.sh/formula/idris2#default). If your package manager does not support the Idris 2 API, you will need to build Idris 2 from source. Refer to the [the Idris 2 installation instructions](https://github.com/idris-lang/Idris2/blob/main/INSTALL.md) for details. Steps 5 and 8 are listed as "optional" in that guide, but they are necessary in order to make the Idris 2 API available. You need to install a version of Idris2-Lsp that is compatible with your version of Idris 2. There should be a branch corresponding to every released Idris 2 version after v0.4.0. Use the latest commit on that branch. For example, if you have Idris v0.5.1, you should use the v0.5.1 branch of Idris2-Lsp. If your Idris 2 version is newer than the newest Idris2-Lsp branch, use the latest commit on the `master` branch, and set a reminder to check the Idris2-Lsp repo for the release of a compatible versioned branch. Snippet to enable the language server: ```lua vim.lsp.enable('idris2_lsp') ``` Default config: - `cmd` : ```lua { "idris2-lsp" } ``` - `filetypes` : ```lua { "idris2" } ``` - `root_dir`: [../lsp/idris2_lsp.lua:35](../lsp/idris2_lsp.lua#L35) --- ## intelephense https://intelephense.com/ `intelephense` can be installed via `npm`: ```sh npm install -g intelephense ``` ```lua -- See https://github.com/bmewburn/intelephense-docs/blob/master/installation.md#initialisation-options init_options = { storagePath = …, -- Optional absolute path to storage dir. Defaults to os.tmpdir(). globalStoragePath = …, -- Optional absolute path to a global storage dir. Defaults to os.homedir(). licenceKey = …, -- Optional licence key or absolute path to a text file containing the licence key. clearCache = …, -- Optional flag to clear server state. State can also be cleared by deleting {storagePath}/intelephense } -- See https://github.com/bmewburn/intelephense-docs settings = { intelephense = { files = { maxSize = 1000000; }; }; } ``` Snippet to enable the language server: ```lua vim.lsp.enable('intelephense') ``` Default config: - `cmd` : ```lua { "intelephense", "--stdio" } ``` - `filetypes` : ```lua { "php" } ``` - `root_markers` : ```lua { ".git", "composer.json" } ``` - `settings` : ```lua { intelephense = { telemetry = { enabled = false } } } ``` --- ## janet_lsp https://github.com/CFiggers/janet-lsp A Language Server Protocol implementation for Janet. Snippet to enable the language server: ```lua vim.lsp.enable('janet_lsp') ``` Default config: - `cmd` : ```lua { "janet-lsp", "--stdio" } ``` - `filetypes` : ```lua { "janet" } ``` - `root_markers` : ```lua { "project.janet", ".git" } ``` --- ## java_language_server https://github.com/georgewfraser/java-language-server Java language server Point `cmd` to `lang_server_linux.sh` or the equivalent script for macOS/Windows provided by java-language-server Snippet to enable the language server: ```lua vim.lsp.enable('java_language_server') ``` Default config: - `cmd` : ```lua { "java-language-server" } ``` - `filetypes` : ```lua { "java" } ``` - `root_markers` : ```lua { "build.gradle", "build.gradle.kts", "pom.xml", ".git" } ``` - `settings` : ```lua {} ``` --- ## jdtls https://projects.eclipse.org/projects/eclipse.jdt.ls Language server for Java. IMPORTANT: If you want all the features jdtls has to offer, [nvim-jdtls](https://github.com/mfussenegger/nvim-jdtls) is highly recommended. If all you need is diagnostics, completion, imports, gotos and formatting and some code actions you can keep reading here. For manual installation you can download precompiled binaries from the [official downloads site](http://download.eclipse.org/jdtls/snapshots/?d) and ensure that the `PATH` variable contains the `bin` directory of the extracted archive. ```lua -- init.lua vim.lsp.enable('jdtls') ``` You can also pass extra custom jvm arguments with the JDTLS_JVM_ARGS environment variable as a space separated list of arguments, that will be converted to multiple --jvm-arg= args when passed to the jdtls script. This will allow for example tweaking the jvm arguments or integration with external tools like lombok: ```sh export JDTLS_JVM_ARGS="-javaagent:$HOME/.local/share/java/lombok.jar" ``` For automatic installation you can use the following unofficial installers/launchers under your own risk: - [jdtls-launcher](https://github.com/eruizc-dev/jdtls-launcher) (Includes lombok support by default) ```lua -- init.lua vim.lsp.config('jdtls', { cmd = { 'jdtls' } }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('jdtls') ``` Default config: - `cmd`: [../lsp/jdtls.lua:74](../lsp/jdtls.lua#L74) - `filetypes` : ```lua { "java" } ``` - `init_options` : ```lua {} ``` - `root_markers` : ```lua { { "mvnw", "gradlew", "settings.gradle", "settings.gradle.kts", ".git" }, { "build.xml", "pom.xml", "build.gradle", "build.gradle.kts" } } ``` --- ## jedi_language_server https://github.com/pappasam/jedi-language-server `jedi-language-server`, a language server for Python, built on top of jedi Snippet to enable the language server: ```lua vim.lsp.enable('jedi_language_server') ``` Default config: - `cmd` : ```lua { "jedi-language-server" } ``` - `filetypes` : ```lua { "python" } ``` - `root_markers` : ```lua { "pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", "Pipfile", ".git" } ``` --- ## jinja_lsp jinja-lsp enhances minijinja development experience by providing Helix/Nvim users with advanced features such as autocomplete, syntax highlighting, hover, goto definition, code actions and linting. The file types are not detected automatically, you can register them manually (see below) or override the filetypes: ```lua vim.filetype.add { extension = { jinja = 'jinja', jinja2 = 'jinja', j2 = 'jinja', }, } ``` Snippet to enable the language server: ```lua vim.lsp.enable('jinja_lsp') ``` Default config: - `cmd` : ```lua { "jinja-lsp" } ``` - `filetypes` : ```lua { "jinja" } ``` - `name` : ```lua "jinja_lsp" ``` - `root_markers` : ```lua { ".git" } ``` --- ## jqls https://github.com/wader/jq-lsp Language server for jq, written using Go. You can install the server easily using go install: ```sh # install directly go install github.com/wader/jq-lsp@master # copy binary to $PATH cp $(go env GOPATH)/bin/jq-lsp /usr/local/bin ``` Note: To activate properly nvim needs to know the jq filetype. You can add it via: ```lua vim.cmd([[au BufRead,BufNewFile *.jq setfiletype jq]]) ``` Snippet to enable the language server: ```lua vim.lsp.enable('jqls') ``` Default config: - `cmd` : ```lua { "jq-lsp" } ``` - `filetypes` : ```lua { "jq" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## jsonls https://github.com/hrsh7th/vscode-langservers-extracted vscode-json-language-server, a language server for JSON and JSON schema `vscode-json-language-server` can be installed via `npm`: ```sh npm i -g vscode-langservers-extracted ``` `vscode-json-language-server` only provides completions when snippet support is enabled. If you use Neovim older than v0.10 you need to enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. ```lua --Enable (broadcasting) snippet capability for completion local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true vim.lsp.config('jsonls', { capabilities = capabilities, }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('jsonls') ``` Default config: - `cmd` : ```lua { "vscode-json-language-server", "--stdio" } ``` - `filetypes` : ```lua { "json", "jsonc" } ``` - `init_options` : ```lua { provideFormatter = true } ``` - `root_markers` : ```lua { ".git" } ``` --- ## jsonnet_ls https://github.com/grafana/jsonnet-language-server A Language Server Protocol (LSP) server for Jsonnet. The language server can be installed with `go`: ```sh go install github.com/grafana/jsonnet-language-server@latest ``` Snippet to enable the language server: ```lua vim.lsp.enable('jsonnet_ls') ``` Default config: - `cmd` : ```lua { "jsonnet-language-server" } ``` - `filetypes` : ```lua { "jsonnet", "libsonnet" } ``` - `root_markers` : ```lua { "jsonnetfile.json", ".git" } ``` --- ## julials https://github.com/julia-vscode/julia-vscode LanguageServer.jl, SymbolServer.jl and StaticLint.jl can be installed with `julia` and `Pkg`: ```sh julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.add("LanguageServer"); Pkg.add("SymbolServer"); Pkg.add("StaticLint")' ``` where `~/.julia/environments/nvim-lspconfig` is the location where the default configuration expects LanguageServer.jl, SymbolServer.jl and StaticLint.jl to be installed. To update an existing install, use the following command: ```sh julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.update()' ``` Note: In order to have LanguageServer.jl pick up installed packages or dependencies in a Julia project, you must make sure that the project is instantiated: ```sh julia --project=/path/to/my/project -e 'using Pkg; Pkg.instantiate()' ``` To activate a Julia environment, use the `:LspJuliaActivateEnv` command. A prompt will ask you to select a Julia environment from the list of environments found in the current working directory and the `environments/` folder of `$JULIA_DEPOT_PATH` entries. You can also provide a path to a Julia environment directly. Example: `:LspJuliaActivateEnv /path/to/my/project`. Note: The julia programming language searches for global environments within the `environments/` folder of `$JULIA_DEPOT_PATH` entries. By default this simply `~/.julia/environments` Snippet to enable the language server: ```lua vim.lsp.enable('julials') ``` Default config: - `cmd` : ```lua { "julia", "--startup-file=no", "--history-file=no", "-e", ' # Load LanguageServer.jl: attempt to load from ~/.julia/environments/nvim-lspconfig\n # with the regular load path as a fallback\n ls_install_path = joinpath(\n get(DEPOT_PATH, 1, joinpath(homedir(), ".julia")),\n "environments", "nvim-lspconfig"\n )\n pushfirst!(LOAD_PATH, ls_install_path)\n using LanguageServer, SymbolServer, StaticLint\n popfirst!(LOAD_PATH)\n depot_path = get(ENV, "JULIA_DEPOT_PATH", "")\n project_path = let\n dirname(something(\n ## 1. Finds an explicitly set project (JULIA_PROJECT)\n Base.load_path_expand((\n p = get(ENV, "JULIA_PROJECT", nothing);\n p === nothing ? nothing : isempty(p) ? nothing : p\n )),\n ## 2. Look for a Project.toml file in the current working directory,\n ## or parent directories, with $HOME as an upper boundary\n Base.current_project(),\n ## 3. First entry in the load path\n get(Base.load_path(), 1, nothing),\n ## 4. Fallback to default global environment,\n ## this is more or less unreachable\n Base.load_path_expand("@v#.#"),\n ))\n end\n @info "Running language server" VERSION pwd() project_path depot_path\n server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)\n server.runlinter = true\n run(server)\n ' } ``` - `filetypes` : ```lua { "julia" } ``` - `on_attach`: [../lsp/julials.lua:127](../lsp/julials.lua#L127) - `root_markers` : ```lua { "Project.toml", "JuliaProject.toml" } ``` --- ## just https://github.com/terror/just-lsp `just-lsp` is an LSP for just built on top of the tree-sitter-just parser. Snippet to enable the language server: ```lua vim.lsp.enable('just') ``` Default config: - `cmd` : ```lua { "just-lsp" } ``` - `filetypes` : ```lua { "just" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## kakehashi https://github.com/atusy/kakehashi Tree-sitter-based language server that provides semantic tokens, selection ranges, and LSP bridging for embedded languages (e.g., code blocks in Markdown). kakehashi works with any language that has a Tree-sitter grammar. Parsers and queries are automatically installed on first use when `autoInstall` is enabled (the default). This requires the `tree-sitter` CLI, a C compiler, and Git. **You must specify `filetypes` in your call to `vim.lsp.config`** to restrict which files activate the server: ```lua vim.lsp.config('kakehashi', { filetypes = { 'markdown', 'lua', 'rust', 'python' }, init_options = { autoInstall = true, -- Optional: bridge LSP requests in injection regions languageServers = { ['lua_ls'] = { cmd = { 'lua-language-server' }, languages = { 'lua' }, }, }, languages = { markdown = { bridge = { lua_ls = { enabled = true } }, }, }, }, }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('kakehashi') ``` Default config: - `cmd` : ```lua { "kakehashi" } ``` - `root_markers` : ```lua { "kakehashi.toml", ".git" } ``` --- ## kcl https://github.com/kcl-lang/kcl.nvim Language server for the KCL configuration and policy language. Snippet to enable the language server: ```lua vim.lsp.enable('kcl') ``` Default config: - `cmd` : ```lua { "kcl-language-server" } ``` - `filetypes` : ```lua { "kcl" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## koka https://koka-lang.github.io/koka/doc/index.html Koka is a functional programming language with effect types and handlers. Snippet to enable the language server: ```lua vim.lsp.enable('koka') ``` Default config: - `cmd` : ```lua { "koka", "--language-server", "--lsstdio" } ``` - `filetypes` : ```lua { "koka" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## kotlin_language_server A kotlin language server which was developed for internal usage and released afterwards. Maintaining is not done by the original author, but by fwcd. It is built via gradle and developed on github. Source and additional description: https://github.com/fwcd/kotlin-language-server This server requires vim to be aware of the kotlin-filetype. You could refer for this capability to: https://github.com/udalov/kotlin-vim (recommended) Note that there is no LICENSE specified yet. For faster startup, you can setup caching by specifying a storagePath in the init_options. The default is your home directory. Snippet to enable the language server: ```lua vim.lsp.enable('kotlin_language_server') ``` Default config: - `cmd` : ```lua { "kotlin-language-server" } ``` - `filetypes` : ```lua { "kotlin" } ``` - `init_options` : ```lua {} ``` - `root_markers` : ```lua { "settings.gradle", "settings.gradle.kts", "build.xml", "pom.xml", "build.gradle", "build.gradle.kts" } ``` --- ## kotlin_lsp Pre-alpha official Kotlin support for Visual Studio Code and an implementation of Language Server Protocol for the Kotlin language. The server is based on IntelliJ IDEA and the IntelliJ IDEA Kotlin Plugin implementation. Snippet to enable the language server: ```lua vim.lsp.enable('kotlin_lsp') ``` Default config: - `cmd` : ```lua { "kotlin-lsp", "--stdio" } ``` - `filetypes` : ```lua { "kotlin" } ``` - `root_markers` : ```lua { "settings.gradle", "settings.gradle.kts", "pom.xml", "build.gradle", "build.gradle.kts", "workspace.json" } ``` --- ## kulala_ls https://github.com/mistweaverco/kulala-ls A minimal language server for HTTP syntax. Snippet to enable the language server: ```lua vim.lsp.enable('kulala_ls') ``` Default config: - `cmd` : ```lua { "kulala-ls", "--stdio" } ``` - `filetypes` : ```lua { "http" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## laravel_ls https://github.com/laravel-ls/laravel-ls `laravel-ls`, language server for laravel The default `cmd` assumes that the `laravel-ls` binary can be found in `$PATH`. Snippet to enable the language server: ```lua vim.lsp.enable('laravel_ls') ``` Default config: - `cmd` : ```lua { "laravel-ls" } ``` - `filetypes` : ```lua { "php", "blade" } ``` - `root_markers` : ```lua { "artisan" } ``` --- ## lean3ls https://github.com/leanprover/lean-client-js/tree/master/lean-language-server Lean installation instructions can be found [here](https://leanprover-community.github.io/get_started.html#regular-install). Once Lean is installed, you can install the Lean 3 language server by running ```sh npm install -g lean-language-server ``` Note: that if you're using [lean.nvim](https://github.com/Julian/lean.nvim), that plugin fully handles the setup of the Lean language server, and you shouldn't set up `lean3ls` both with it and `lspconfig`. Snippet to enable the language server: ```lua vim.lsp.enable('lean3ls') ``` Default config: - `cmd` : ```lua { "lean-language-server", "--stdio", "--", "-M", "4096", "-T", "100000" } ``` - `filetypes` : ```lua { "lean3" } ``` - `offset_encoding` : ```lua "utf-32" ``` - `root_dir`: [../lsp/lean3ls.lua:18](../lsp/lean3ls.lua#L18) --- ## lelwel_ls https://github.com/0x2a-42/lelwel Language server for lelwel grammars. You can install `lelwel-ls` via cargo: ```sh cargo install --features="lsp" lelwel ``` Snippet to enable the language server: ```lua vim.lsp.enable('lelwel_ls') ``` Default config: - `cmd` : ```lua { "lelwel-ls" } ``` - `filetypes` : ```lua { "llw" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## lemminx https://github.com/eclipse/lemminx The easiest way to install the server is to get a binary from https://github.com/redhat-developer/vscode-xml/releases and place it on your PATH. NOTE to macOS users: Binaries from unidentified developers are blocked by default. If you trust the downloaded binary, run it once, cancel the prompt, then remove the binary from Gatekeeper quarantine with `xattr -d com.apple.quarantine lemminx`. It should now run without being blocked. Snippet to enable the language server: ```lua vim.lsp.enable('lemminx') ``` Default config: - `cmd` : ```lua { "lemminx" } ``` - `filetypes` : ```lua { "xml", "xsd", "xsl", "xslt", "svg" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## lexical https://github.com/lexical-lsp/lexical Lexical is a next-generation language server for the Elixir programming language. To install from source, follow the [Detailed Installation Instructions](https://github.com/lexical-lsp/lexical/blob/main/pages/installation.md). Ensure to point `cmd` to the generated `_build/dev/package/lexical/start_lexical.sh` executable. Snippet to enable the language server: ```lua vim.lsp.enable('lexical') ``` Default config: - `cmd` : ```lua { "lexical" } ``` - `filetypes` : ```lua { "elixir", "eelixir", "heex", "surface" } ``` - `root_markers` : ```lua { "mix.exs", ".git" } ``` --- ## lsp_ai https://github.com/SilasMarvin/lsp-ai LSP-AI is an open source language server that serves as a backend for AI-powered functionality in your favorite code editors. It offers features like in-editor chatting with LLMs and code completions. You will need to provide configuration for the inference backends and models you want to use, as well as configure completion/code actions. See the [wiki docs](https://github.com/SilasMarvin/lsp-ai/wiki/Configuration) and [examples](https://github.com/SilasMarvin/lsp-ai/blob/main/examples/nvim) for more information. Snippet to enable the language server: ```lua vim.lsp.enable('lsp_ai') ``` Default config: - `cmd` : ```lua { "lsp-ai" } ``` - `filetypes` : ```lua {} ``` - `init_options` : ```lua { memory = { file_store = vim.empty_dict() }, models = vim.empty_dict() } ``` --- ## ltex https://github.com/valentjn/ltex-ls LTeX Language Server: LSP language server for LanguageTool 🔍✔️ with support for LaTeX 🎓, Markdown 📝, and others To install, download the latest [release](https://github.com/valentjn/ltex-ls/releases) and ensure `ltex-ls` is on your path. This server accepts configuration via the `settings` key. ```lua settings = { ltex = { language = "en-GB", }, }, ``` To support org files or R sweave, users can define a custom filetype autocommand (or use a plugin which defines these filetypes): ```lua vim.cmd [[ autocmd BufRead,BufNewFile *.org set filetype=org ]] ``` Snippet to enable the language server: ```lua vim.lsp.enable('ltex') ``` Default config: - `cmd` : ```lua { "ltex-ls" } ``` - `filetypes` : ```lua { "bib", "gitcommit", "markdown", "org", "plaintex", "rst", "rnoweb", "tex", "pandoc", "quarto", "rmd", "context", "html", "xhtml", "mail", "text" } ``` - `get_language_id`: [../lsp/ltex.lua:75](../lsp/ltex.lua#L75) - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua { ltex = { enabled = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex", "quarto", "rmd", "context", "html", "xhtml", "mail", "plaintext" } } } ``` --- ## ltex_plus https://github.com/ltex-plus/ltex-ls-plus LTeX Language Server: LSP language server for LanguageTool 🔍✔️ with support for LaTeX 🎓, Markdown 📝, and others To install, download the latest [release](https://github.com/ltex-plus/ltex-ls-plus) and ensure `ltex-ls-plus` is on your path. This server accepts configuration via the `settings` key. ```lua settings = { ltex = { language = "en-GB", }, }, ``` To support org files or R sweave, users can define a custom filetype autocommand (or use a plugin which defines these filetypes): ```lua vim.cmd [[ autocmd BufRead,BufNewFile *.org set filetype=org ]] ``` Snippet to enable the language server: ```lua vim.lsp.enable('ltex_plus') ``` Default config: - `cmd` : ```lua { "ltex-ls-plus" } ``` - `filetypes` : ```lua { "asciidoc", "bib", "context", "gitcommit", "html", "markdown", "org", "pandoc", "plaintex", "quarto", "mail", "mdx", "rmd", "rnoweb", "rst", "tex", "text", "typst", "xhtml" } ``` - `get_language_id`: [../lsp/ltex_plus.lua:36](../lsp/ltex_plus.lua#L36) - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua { ltex = { enabled = { "asciidoc", "bib", "context", "gitcommit", "html", "markdown", "org", "pandoc", "plaintex", "quarto", "mail", "mdx", "rmd", "rnoweb", "rst", "tex", "latex", "text", "typst", "xhtml" } } } ``` --- ## lua_ls https://github.com/luals/lua-language-server Lua language server. `lua-language-server` can be installed by following the instructions [here](https://luals.github.io/#neovim-install). The default `cmd` assumes that the `lua-language-server` binary can be found in `$PATH`. If you primarily use `lua-language-server` for Neovim, and want to provide completions, analysis, and location handling for plugins on runtime path, you can use the following settings. ```lua vim.lsp.config('lua_ls', { on_init = function(client) if client.workspace_folders then local path = client.workspace_folders[1].name if path ~= vim.fn.stdpath('config') and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) then return end end client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, { runtime = { -- Tell the language server which version of Lua you're using (most -- likely LuaJIT in the case of Neovim) version = 'LuaJIT', -- Tell the language server how to find Lua modules same way as Neovim -- (see `:h lua-module-load`) path = { 'lua/?.lua', 'lua/?/init.lua', }, }, -- Make the server aware of Neovim runtime files workspace = { checkThirdParty = false, library = { vim.env.VIMRUNTIME, -- Depending on the usage, you might want to add additional paths -- here. -- '${3rd}/luv/library', -- '${3rd}/busted/library', }, -- Or pull in all of 'runtimepath'. -- NOTE: this is a lot slower and will cause issues when working on -- your own configuration. -- See https://github.com/neovim/nvim-lspconfig/issues/3189 -- library = vim.api.nvim_get_runtime_file('', true), }, }) end, settings = { Lua = {}, }, }) ``` See `lua-language-server`'s [documentation](https://luals.github.io/wiki/settings/) for an explanation of the above fields: * [Lua.runtime.path](https://luals.github.io/wiki/settings/#runtimepath) * [Lua.workspace.library](https://luals.github.io/wiki/settings/#workspacelibrary) Snippet to enable the language server: ```lua vim.lsp.enable('lua_ls') ``` Default config: - `cmd` : ```lua { "lua-language-server" } ``` - `filetypes` : ```lua { "lua" } ``` - `root_markers` : ```lua { { ".emmyrc.json", ".luarc.json", ".luarc.jsonc" }, { ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml", "selene.yml" }, { ".git" } } ``` - `settings` : ```lua { Lua = { codeLens = { enable = true }, hint = { enable = true, semicolon = "Disable" } } } ``` --- ## luau_lsp https://github.com/JohnnyMorganz/luau-lsp Language server for the [Luau](https://luau-lang.org/) language. `luau-lsp` can be installed by downloading one of the release assets available at https://github.com/JohnnyMorganz/luau-lsp. You might also have to set up automatic filetype detection for Luau files, for example like so: ```vim autocmd BufRead,BufNewFile *.luau setf luau ``` Snippet to enable the language server: ```lua vim.lsp.enable('luau_lsp') ``` Default config: - `cmd` : ```lua { "luau-lsp", "lsp" } ``` - `filetypes` : ```lua { "luau" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## lwc_ls https://github.com/forcedotcom/lightning-language-server/ Language server for Lightning Web Components. For manual installation, utilize the official [NPM package](https://www.npmjs.com/package/@salesforce/lwc-language-server). Then, configure `cmd` to run the Node script at the unpacked location: ```lua vim.lsp.config('lwc_ls', { cmd = { 'node', '/path/to/node_modules/@salesforce/lwc-language-server/bin/lwc-language-server.js', '--stdio' } }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('lwc_ls') ``` Default config: - `cmd` : ```lua { "lwc-language-server", "--stdio" } ``` - `filetypes` : ```lua { "javascript", "html" } ``` - `init_options` : ```lua { embeddedLanguages = { javascript = true } } ``` - `root_markers` : ```lua { "sfdx-project.json" } ``` --- ## m68k https://github.com/grahambates/m68k-lsp Language server for Motorola 68000 family assembly `m68k-lsp-server` can be installed via `npm`: ```sh npm install -g m68k-lsp-server ``` Ensure you are using the 68k asm syntax variant in Neovim. ```lua vim.g.asmsyntax = 'asm68k' ``` Snippet to enable the language server: ```lua vim.lsp.enable('m68k') ``` Default config: - `cmd` : ```lua { "m68k-lsp-server", "--stdio" } ``` - `filetypes` : ```lua { "asm68k" } ``` - `root_markers` : ```lua { "Makefile", ".git" } ``` --- ## markdown_oxide https://github.com/Feel-ix-343/markdown-oxide Editor Agnostic PKM: you bring the text editor and we bring the PKM. Inspired by and compatible with Obsidian. Check the readme to see how to properly setup. Snippet to enable the language server: ```lua vim.lsp.enable('markdown_oxide') ``` Default config: - `cmd` : ```lua { "markdown-oxide" } ``` - `filetypes` : ```lua { "markdown" } ``` - `on_attach`: [../lsp/markdown_oxide.lua:24](../lsp/markdown_oxide.lua#L24) - `root_markers` : ```lua { ".git", ".obsidian", ".moxide.toml" } ``` --- ## marko-js https://github.com/marko-js/language-server Using the Language Server Protocol to improve Marko's developer experience. Can be installed via npm: ``` npm i -g @marko/language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('marko-js') ``` Default config: - `cmd` : ```lua { "marko-language-server", "--stdio" } ``` - `filetypes` : ```lua { "marko" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## marksman https://github.com/artempyanykh/marksman Marksman is a Markdown LSP server providing completion, cross-references, diagnostics, and more. Marksman works on MacOS, Linux, and Windows and is distributed as a self-contained binary for each OS. Pre-built binaries can be downloaded from https://github.com/artempyanykh/marksman/releases Snippet to enable the language server: ```lua vim.lsp.enable('marksman') ``` Default config: - `cmd` : ```lua { "marksman", "server" } ``` - `filetypes` : ```lua { "markdown", "markdown.mdx" } ``` - `root_markers` : ```lua { ".marksman.toml", ".git" } ``` --- ## matlab_ls https://github.com/mathworks/MATLAB-language-server MATLAB® language server implements the Microsoft® Language Server Protocol for the MATLAB language. Make sure to set `MATLAB.installPath` to your MATLAB path, e.g.: ```lua settings = { MATLAB = { ... installPath = '/usr/local/MATLAB/R2023a', ... }, }, ``` Snippet to enable the language server: ```lua vim.lsp.enable('matlab_ls') ``` Default config: - `cmd` : ```lua { "matlab-language-server", "--stdio" } ``` - `filetypes` : ```lua { "matlab" } ``` - `root_dir`: [../lsp/matlab_ls.lua:19](../lsp/matlab_ls.lua#L19) - `settings` : ```lua { MATLAB = { indexWorkspace = true, installPath = "", matlabConnectionTiming = "onStart", telemetry = true } } ``` --- ## mdx_analyzer https://github.com/mdx-js/mdx-analyzer `mdx-analyzer`, a language server for MDX Snippet to enable the language server: ```lua vim.lsp.enable('mdx_analyzer') ``` Default config: - `before_init`: [../lsp/mdx_analyzer.lua:9](../lsp/mdx_analyzer.lua#L9) - `cmd` : ```lua { "mdx-language-server", "--stdio" } ``` - `filetypes` : ```lua { "mdx" } ``` - `init_options` : ```lua { typescript = {} } ``` - `root_markers` : ```lua { "package.json" } ``` - `settings` : ```lua {} ``` --- ## mesonlsp https://github.com/JCWasmx86/mesonlsp An unofficial, unendorsed language server for meson written in C++ Snippet to enable the language server: ```lua vim.lsp.enable('mesonlsp') ``` Default config: - `cmd` : ```lua { "mesonlsp", "--lsp" } ``` - `filetypes` : ```lua { "meson" } ``` - `root_dir`: [../lsp/mesonlsp.lua:32](../lsp/mesonlsp.lua#L32) --- ## metals https://scalameta.org/metals/ Scala language server with rich IDE features. See full instructions in the Metals documentation: https://scalameta.org/metals/docs/editors/vim#using-an-alternative-lsp-client Note: that if you're using [nvim-metals](https://github.com/scalameta/nvim-metals), that plugin fully handles the setup and installation of Metals, and you shouldn't set up Metals both with it and `lspconfig`. To install Metals, make sure to have [coursier](https://get-coursier.io/docs/cli-installation) installed, and once you do you can install the latest Metals with `cs install metals`. Snippet to enable the language server: ```lua vim.lsp.enable('metals') ``` Default config: - `capabilities` : ```lua { workspace = { configuration = false } } ``` - `cmd` : ```lua { "metals" } ``` - `filetypes` : ```lua { "scala" } ``` - `init_options` : ```lua { compilerOptions = { snippetAutoIndent = false }, isHttpEnabled = true, statusBarProvider = "show-message" } ``` - `root_markers` : ```lua { "build.sbt", "build.sc", { "build.gradle", "build.gradle.kts" }, "pom.xml" } ``` --- ## millet https://github.com/azdavis/millet Millet, a language server for Standard ML To use with nvim: 1. Install a Rust toolchain: https://rustup.rs 2. Clone the repo 3. Run `cargo build --release --bin millet-ls` 4. Move `target/release/millet-ls` to somewhere on your $PATH as `millet` Snippet to enable the language server: ```lua vim.lsp.enable('millet') ``` Default config: - `cmd` : ```lua { "millet" } ``` - `filetypes` : ```lua { "sml" } ``` - `root_markers` : ```lua { "millet.toml" } ``` --- ## mint https://www.mint-lang.com Install Mint using the [instructions](https://www.mint-lang.com/install). The language server is included since version 0.12.0. Snippet to enable the language server: ```lua vim.lsp.enable('mint') ``` Default config: - `cmd` : ```lua { "mint", "ls" } ``` - `filetypes` : ```lua { "mint" } ``` - `root_markers` : ```lua { "mint.json", ".git" } ``` --- ## mlir_lsp_server https://mlir.llvm.org/docs/Tools/MLIRLSP/#mlir-lsp-language-server--mlir-lsp-server= The Language Server for the LLVM MLIR language `mlir-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) Snippet to enable the language server: ```lua vim.lsp.enable('mlir_lsp_server') ``` Default config: - `cmd` : ```lua { "mlir-lsp-server" } ``` - `filetypes` : ```lua { "mlir" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## mlir_pdll_lsp_server https://mlir.llvm.org/docs/Tools/MLIRLSP/#pdll-lsp-language-server--mlir-pdll-lsp-server The Language Server for the LLVM PDLL language `mlir-pdll-lsp-server` can be installed at the llvm-project repository (https://github.com/llvm/llvm-project) Snippet to enable the language server: ```lua vim.lsp.enable('mlir_pdll_lsp_server') ``` Default config: - `cmd` : ```lua { "mlir-pdll-lsp-server" } ``` - `filetypes` : ```lua { "pdll" } ``` - `root_markers` : ```lua { "pdll_compile_commands.yml", ".git" } ``` --- ## mm0_ls https://github.com/digama0/mm0 Language Server for the metamath-zero theorem prover. Requires [mm0-rs](https://github.com/digama0/mm0/tree/master/mm0-rs) to be installed and available on the `PATH`. Snippet to enable the language server: ```lua vim.lsp.enable('mm0_ls') ``` Default config: - `cmd` : ```lua { "mm0-rs", "server" } ``` - `filetypes` : ```lua { "metamath-zero" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## mojo https://github.com/modularml/mojo `mojo-lsp-server` can be installed [via Modular](https://developer.modular.com/download) Mojo is a new programming language that bridges the gap between research and production by combining Python syntax and ecosystem with systems programming and metaprogramming features. Snippet to enable the language server: ```lua vim.lsp.enable('mojo') ``` Default config: - `cmd` : ```lua { "mojo-lsp-server" } ``` - `filetypes` : ```lua { "mojo" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## motoko_lsp https://github.com/dfinity/vscode-motoko Language server for the Motoko programming language. Snippet to enable the language server: ```lua vim.lsp.enable('motoko_lsp') ``` Default config: - `cmd` : ```lua { "motoko-lsp", "--stdio" } ``` - `filetypes` : ```lua { "motoko" } ``` - `init_options` : ```lua { formatter = "auto" } ``` - `root_markers` : ```lua { "dfx.json", ".git" } ``` --- ## move_analyzer https://github.com/move-language/move/tree/main/language/move-analyzer Language server for Move The `move-analyzer` can be installed by running: ``` cargo install --git https://github.com/move-language/move move-analyzer ``` See [`move-analyzer`'s doc](https://github.com/move-language/move/blob/1b258a06e3c7d2bc9174578aac92cca3ac19de71/language/move-analyzer/editors/code/README.md#how-to-install) for details. Snippet to enable the language server: ```lua vim.lsp.enable('move_analyzer') ``` Default config: - `cmd` : ```lua { "move-analyzer" } ``` - `filetypes` : ```lua { "move" } ``` - `root_markers` : ```lua { "Move.toml" } ``` --- ## mpls https://github.com/mhersson/mpls Markdown Preview Language Server Snippet to enable the language server: ```lua vim.lsp.enable('mpls') ``` Default config: - `cmd` : ```lua { "mpls", "--theme", "dark", "--enable-emoji", "--enable-footnotes", "--no-auto" } ``` - `filetypes` : ```lua { "markdown" } ``` - `on_attach`: [../lsp/mpls.lua:8](../lsp/mpls.lua#L8) - `root_markers` : ```lua { ".marksman.toml", ".git" } ``` --- ## msbuild_project_tools_server https://github.com/tintoy/msbuild-project-tools-server/ MSBuild Project Tools Server can be installed by following the README.MD on the above repository. Example config: ```lua vim.lsp.config('msbuild_project_tools_server', { cmd = {'dotnet', '/path/to/server/MSBuildProjectTools.LanguageServer.Host.dll'} }) ``` There's no builtin filetypes for msbuild files, would require some filetype aliases: ```lua vim.filetype.add({ extension = { props = 'msbuild', tasks = 'msbuild', targets = 'msbuild', }, pattern = { [ [[.*\..*proj]] ] = 'msbuild', }, }) ``` Optionally tell treesitter to treat `msbuild` as `xml` so you can get syntax highlighting if you have the treesitter-xml-parser installed. ```lua vim.treesitter.language.register('xml', { 'msbuild' }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('msbuild_project_tools_server') ``` Default config: - `cmd` : ```lua { "dotnet", "MSBuildProjectTools.LanguageServer.Host.dll" } ``` - `filetypes` : ```lua { "msbuild" } ``` - `init_options` : ```lua {} ``` - `root_dir`: [../lsp/msbuild_project_tools_server.lua:39](../lsp/msbuild_project_tools_server.lua#L39) --- ## muon https://muon.build Snippet to enable the language server: ```lua vim.lsp.enable('muon') ``` Default config: - `cmd` : ```lua { "muon", "analyze", "lsp" } ``` - `filetypes` : ```lua { "meson" } ``` - `root_dir`: [../lsp/muon.lua:6](../lsp/muon.lua#L6) --- ## mutt_ls https://github.com/neomutt/mutt-language-server A language server for (neo)mutt's muttrc. It can be installed via pip. ```sh pip install mutt-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('mutt_ls') ``` Default config: - `cmd` : ```lua { "mutt-language-server" } ``` - `filetypes` : ```lua { "muttrc", "neomuttrc" } ``` - `root_markers` : ```lua { ".git" } ``` - `settings` : ```lua {} ``` --- ## nelua_lsp https://github.com/codehz/nelua-lsp nelua-lsp is an experimental nelua language server. You need [nelua.vim](https://github.com/stefanos82/nelua.vim/blob/main/ftdetect/nelua.vim) for nelua files to be recognized or add this to your config: in vimscript: ```vimscript au BufNewFile,BufRead *.nelua setf nelua ``` in lua: ```lua vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, { pattern = { "*.nelua" }, command = "setf nelua"}) ``` **By default, nelua-lsp doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. You must add the following to your init.vim or init.lua to set `cmd` to the absolute path ($HOME and ~ are not expanded) of the unzipped run script or binary. ```lua vim.lsp.config('nelua_lsp', { cmd = { "nelua", "-L", "/path/to/nelua-lsp/", "--script", "/path/to/nelua-lsp/nelua-lsp.lua" }, }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('nelua_lsp') ``` Default config: - `filetypes` : ```lua { "nelua" } ``` - `root_markers` : ```lua { "Makefile", ".git", "*.nelua" } ``` --- ## neocmake https://github.com/neocmakelsp/neocmakelsp CMake LSP Implementation Neovim does not currently include built-in snippets. `neocmakelsp` only provides completions when snippet support is enabled. To enable completion, install a snippet plugin and add the following override to your language client capabilities during setup. ```lua --Enable (broadcasting) snippet capability for completion local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true vim.lsp.config('neocmake', { capabilities = capabilities, }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('neocmake') ``` Default config: - `cmd` : ```lua { "neocmakelsp", "stdio" } ``` - `filetypes` : ```lua { "cmake" } ``` - `root_markers` : ```lua { ".neocmake.toml", ".git", "build", "cmake" } ``` --- ## nextflow_ls https://github.com/nextflow-io/language-server Requirements: - Java 17+ `nextflow_ls` can be installed by following the instructions [here](https://github.com/nextflow-io/language-server#development). If you have installed nextflow language server, you can set the `cmd` custom path as follow: ```lua vim.lsp.config('nextflow_ls', { cmd = { 'nextflow-language-server' }, filetypes = { 'nextflow' }, settings = { nextflow = { files = { exclude = { '.git', '.nf-test', 'work' }, }, }, }, }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('nextflow_ls') ``` Default config: - `cmd` : ```lua { "nextflow-language-server" } ``` - `filetypes` : ```lua { "nextflow" } ``` - `root_markers` : ```lua { "nextflow.config", ".git" } ``` - `settings` : ```lua { nextflow = { files = { exclude = { ".git", ".nf-test", "work" } } } } ``` --- ## nextls https://github.com/elixir-tools/next-ls **Please see the following [detailed instructions](https://www.elixir-tools.dev/docs/next-ls/installation/) for possible installation methods.** Snippet to enable the language server: ```lua vim.lsp.enable('nextls') ``` Default config: - `cmd` : ```lua { "nextls", "--stdio" } ``` - `filetypes` : ```lua { "elixir", "eelixir", "heex", "surface" } ``` - `root_markers` : ```lua { "mix.exs", ".git" } ``` --- ## nginx_language_server https://pypi.org/project/nginx-language-server/ `nginx-language-server` can be installed via pip: ```sh pip install -U nginx-language-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('nginx_language_server') ``` Default config: - `cmd` : ```lua { "nginx-language-server" } ``` - `filetypes` : ```lua { "nginx" } ``` - `root_markers` : ```lua { "nginx.conf", ".git" } ``` --- ## nickel_ls Nickel Language Server https://github.com/tweag/nickel `nls` can be installed with nix, or cargo, from the Nickel repository. ```sh git clone https://github.com/tweag/nickel.git ``` Nix: ```sh cd nickel nix-env -f . -i ``` cargo: ```sh cd nickel/lsp/nls cargo install --path . ``` In order to have lspconfig detect Nickel filetypes (a prerequisite for autostarting a server), install the [Nickel vim plugin](https://github.com/nickel-lang/vim-nickel). Snippet to enable the language server: ```lua vim.lsp.enable('nickel_ls') ``` Default config: - `cmd` : ```lua { "nls" } ``` - `filetypes` : ```lua { "ncl", "nickel" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## nil_ls https://github.com/oxalica/nil A new language server for Nix Expression Language. If you are using Nix with Flakes support, run `nix profile install github:oxalica/nil` to install. Check the repository README for more information. _See an example config at https://github.com/oxalica/nil/blob/main/dev/nvim-lsp.nix._ Snippet to enable the language server: ```lua vim.lsp.enable('nil_ls') ``` Default config: - `cmd` : ```lua { "nil" } ``` - `filetypes` : ```lua { "nix" } ``` - `root_markers` : ```lua { "flake.nix", ".git" } ``` --- ## nim_langserver https://github.com/nim-lang/langserver `nim-langserver` can be installed via the `nimble` package manager: ```sh nimble install nimlangserver ``` Snippet to enable the language server: ```lua vim.lsp.enable('nim_langserver') ``` Default config: - `cmd` : ```lua { "nimlangserver" } ``` - `filetypes` : ```lua { "nim" } ``` - `root_dir`: [../lsp/nim_langserver.lua:14](../lsp/nim_langserver.lua#L14) --- ## nimls https://github.com/PMunch/nimlsp `nimlsp` can be installed via the `nimble` package manager: ```sh nimble install nimlsp ``` Snippet to enable the language server: ```lua vim.lsp.enable('nimls') ``` Default config: - `cmd` : ```lua { "nimlsp" } ``` - `filetypes` : ```lua { "nim" } ``` - `root_dir`: [../lsp/nimls.lua:14](../lsp/nimls.lua#L14) --- ## nixd https://github.com/nix-community/nixd Nix language server, based on nix libraries. If you are using Nix with Flakes support, run `nix profile install github:nix-community/nixd` to install. Check the repository README for more information. Snippet to enable the language server: ```lua vim.lsp.enable('nixd') ``` Default config: - `cmd` : ```lua { "nixd" } ``` - `filetypes` : ```lua { "nix" } ``` - `root_markers` : ```lua { "flake.nix", ".git" } ``` --- ## nomad_lsp https://github.com/juliosueiras/nomad-lsp Written in Go, compilation is needed for `nomad_lsp` to be used. Please see the [original repository](https://github.com/juliosuieras/nomad-lsp). Add the executable to your system or vim PATH and it will be set to go. No configuration option is needed unless you choose not to add `nomad-lsp` executable to the PATH. You should know what you are doing if you choose so. ```lua vim.lsp.enable('nomad_lsp') ``` However, a `hcl.nomad` or `nomad` filetype should be defined. Description of your jobs should be written in `.nomad` files for the LSP client to configure the server's `root_dir` configuration option. Snippet to enable the language server: ```lua vim.lsp.enable('nomad_lsp') ``` Default config: - `cmd` : ```lua { "nomad-lsp" } ``` - `filetypes` : ```lua { "hcl.nomad", "nomad" } ``` - `root_dir`: [../lsp/nomad_lsp.lua:27](../lsp/nomad_lsp.lua#L27) --- ## ntt https://github.com/nokia/ntt Installation instructions can be found [here](https://github.com/nokia/ntt#Install). Can be configured by passing a "settings" object to vim.lsp.config('ntt'): ```lua vim.lsp.config('ntt', { settings = { ntt = { } } }) ``` Snippet to enable the language server: ```lua vim.lsp.enable('ntt') ``` Default config: - `cmd` : ```lua { "ntt", "langserver" } ``` - `filetypes` : ```lua { "ttcn" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## nushell https://github.com/nushell/nushell Nushell built-in language server. Snippet to enable the language server: ```lua vim.lsp.enable('nushell') ``` Default config: - `cmd` : ```lua { "nu", "--lsp" } ``` - `filetypes` : ```lua { "nu" } ``` - `root_dir`: [../lsp/nushell.lua:8](../lsp/nushell.lua#L8) --- ## nxls https://github.com/nrwl/nx-console/tree/master/apps/nxls nxls, a language server for Nx Workspaces `nxls` can be installed via `npm`: ```sh npm i -g nxls ``` Snippet to enable the language server: ```lua vim.lsp.enable('nxls') ``` Default config: - `cmd` : ```lua { "nxls", "--stdio" } ``` - `filetypes` : ```lua { "json", "jsonc" } ``` - `root_markers` : ```lua { "nx.json", ".git" } ``` --- ## ocamllsp https://github.com/ocaml/ocaml-lsp `ocaml-lsp` can be installed as described in [installation guide](https://github.com/ocaml/ocaml-lsp#installation). To install the lsp server in a particular opam switch: ```sh opam install ocaml-lsp-server ``` Snippet to enable the language server: ```lua vim.lsp.enable('ocamllsp') ``` Default config: - `cmd` : ```lua { "ocamllsp" } ``` - `filetypes` : ```lua { "ocaml", "menhir", "ocamlinterface", "ocamllex", "reason", "dune" } ``` - `get_language_id`: [../lsp/ocamllsp.lua:77](../lsp/ocamllsp.lua#L77) - `on_attach`: [../lsp/ocamllsp.lua:77](../lsp/ocamllsp.lua#L77) - `root_markers` : ```lua { { "dune-project", "dune-workspace" }, { "*.opam", "opam", "esy.json", "package.json" }, { ".git" } } ``` --- ## ols https://github.com/DanielGavin/ols `Odin Language Server`. Snippet to enable the language server: ```lua vim.lsp.enable('ols') ``` Default config: - `cmd` : ```lua { "ols" } ``` - `filetypes` : ```lua { "odin" } ``` - `root_dir`: [../lsp/ols.lua:10](../lsp/ols.lua#L10) --- ## omnisharp https://github.com/omnisharp/omnisharp-roslyn OmniSharp server based on Roslyn workspaces `omnisharp-roslyn` can be installed by downloading and extracting a release from [here](https://github.com/OmniSharp/omnisharp-roslyn/releases). OmniSharp can also be built from source by following the instructions [here](https://github.com/omnisharp/omnisharp-roslyn#downloading-omnisharp). OmniSharp requires the [dotnet-sdk](https://dotnet.microsoft.com/download) to be installed. For `go_to_definition` to work fully, extended `textDocument/definition` handler is needed, for example see [omnisharp-extended-lsp.nvim](https://github.com/Hoffs/omnisharp-extended-lsp.nvim) Snippet to enable the language server: ```lua vim.lsp.enable('omnisharp') ``` Default config: - `capabilities` : ```lua { workspace = { workspaceFolders = false } } ``` - `cmd` : ```lua { "omnisharp", "-z", "--hostPID", "12345", "DotNet:enablePackageRestore=false", "--encoding", "utf-8", "--languageserver" } ``` - `filetypes` : ```lua { "cs", "vb" } ``` - `init_options` : ```lua {} ``` - `root_dir`: [../lsp/omnisharp.lua:18](../lsp/omnisharp.lua#L18) - `settings` : ```lua { FormattingOptions = { EnableEditorConfigSupport = true }, MsBuild = {}, RenameOptions = {}, RoslynExtensionsOptions = {}, Sdk = { IncludePrereleases = true } } ``` --- ## opencl_ls https://github.com/Galarius/opencl-language-server Build instructions can be found [here](https://github.com/Galarius/opencl-language-server/blob/main/_dev/build.md). Prebuilt binaries are available for Linux, macOS and Windows [here](https://github.com/Galarius/opencl-language-server/releases). Snippet to enable the language server: ```lua vim.lsp.enable('opencl_ls') ``` Default config: - `cmd` : ```lua { "opencl-language-server" } ``` - `filetypes` : ```lua { "opencl" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## openscad_ls https://github.com/dzhu/openscad-language-server A Language Server Protocol server for OpenSCAD You can build and install `openscad-language-server` binary with `cargo`: ```sh cargo install openscad-language-server ``` Vim does not have built-in syntax for the `openscad` filetype currently. This can be added via an autocmd: ```lua vim.cmd [[ autocmd BufRead,BufNewFile *.scad set filetype=openscad ]] ``` or by installing a filetype plugin such as https://github.com/sirtaj/vim-openscad Snippet to enable the language server: ```lua vim.lsp.enable('openscad_ls') ``` Default config: - `cmd` : ```lua { "openscad-language-server" } ``` - `filetypes` : ```lua { "openscad" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## openscad_lsp https://github.com/Leathong/openscad-LSP A Language Server Protocol server for OpenSCAD You can build and install `openscad-lsp` binary with `cargo`: ```sh cargo install openscad-lsp ``` Snippet to enable the language server: ```lua vim.lsp.enable('openscad_lsp') ``` Default config: - `cmd` : ```lua { "openscad-lsp", "--stdio" } ``` - `filetypes` : ```lua { "openscad" } ``` - `root_markers` : ```lua { ".git" } ``` --- ## oso https://www.osohq.com/docs/develop/local-dev/env-setup Oso Polar language server. `oso-cloud` can be installed by following the instructions [here](https://www.osohq.com/docs/develop/local-dev/env-setup). The default `cmd` assumes that the `oso-cloud` binary can be found in the `$PATH`. You may need to configure the filetype for Polar (*.polar) files: ``` autocmd BufNewFile,BufRead *.polar set filetype=polar ``` or ```lua vim.filetype.add({ pattern = { ['.*/*.polar'] = 'polar', }, }) Alternatively, you may use a syntax plugin like https://github.com/osohq/polar.vim Snippet to enable the language server: ```lua vim.lsp.enable('oso') ``` Default config: - `cmd` : ```lua { "oso-cloud", "lsp" } ``` - `filetypes` : ```lua { "polar" } ``` --- ## oxfmt https://github.com/oxc-project/oxc https://oxc.rs/docs/guide/usage/formatter.html `oxfmt` is a Prettier-compatible code formatter that supports multiple languages including JavaScript, TypeScript, JSON, YAML, HTML, CSS, Markdown, and more. It can be installed via `npm`: ```sh npm i -g oxfmt ``` Snippet to enable the language server: ```lua vim.lsp.enable('oxfmt') ``` Default config: - `cmd`: [../lsp/oxfmt.lua:17](../lsp/oxfmt.lua#L17) - `filetypes` : ```lua { "javascript", "javascriptreact", "typescript", "typescriptreact", "toml", "json", "jsonc", "json5", "yaml", "html", "vue", "handlebars", "css", "scss", "less", "graphql", "markdown" } ``` - `root_dir`: [../lsp/oxfmt.lua:17](../lsp/oxfmt.lua#L17) - `workspace_required` : `true` --- ## oxlint https://github.com/oxc-project/oxc https://oxc.rs/docs/guide/usage/linter.html `oxlint` is a linter for JavaScript / TypeScript supporting over 500 rules from ESLint and its popular plugins. It also supports linting framework files (Vue, Svelte, Astro) by analyzing their