From b7e810638a8dbcb381f73bf51aff3ad64ce35a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=A9tan=20Lepage?= <33058747+GaetanLepage@users.noreply.github.com> Date: Sat, 25 Feb 2023 16:32:55 +0100 Subject: [PATCH] plugins/nvim-lsp/language-servers: re-order LS list by alphabetical order (#194) --- plugins/nvim-lsp/language-servers/default.nix | 128 +++++++++--------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/plugins/nvim-lsp/language-servers/default.nix b/plugins/nvim-lsp/language-servers/default.nix index 3299da23..f0bab4d9 100644 --- a/plugins/nvim-lsp/language-servers/default.nix +++ b/plugins/nvim-lsp/language-servers/default.nix @@ -151,6 +151,12 @@ with lib; let name = "gopls"; description = "Enable gopls, for Go."; } + { + name = "hls"; + description = "Enable haskell language server"; + package = pkgs.haskell-language-server; + cmd = cfg: ["haskell-language-server-wrapper"]; + } { name = "html"; description = "Enable html, for HTML"; @@ -163,64 +169,6 @@ with lib; let package = pkgs.nodePackages.vscode-langservers-extracted; cmd = cfg: ["${cfg.package}/bin/vscode-json-language-server" "--stdio"]; } - { - name = "nil_ls"; - description = "Enable nil, for Nix"; - package = pkgs.nil; - settingsOptions = { - formatting.command = mkOption { - type = types.nullOr (types.listOf types.str); - default = null; - description = '' - External formatter command (with arguments). - It should accepts file content in stdin and print the formatted code into stdout. - ''; - }; - diagnostics = { - ignored = mkOption { - type = types.listOf types.str; - default = []; - description = '' - Ignored diagnostic kinds. - The kind identifier is a snake_cased_string usually shown together - with the diagnostic message. - ''; - }; - excludedFiles = mkOption { - type = types.listOf types.str; - default = []; - description = '' - Files to exclude from showing diagnostics. Useful for generated files. - It accepts an array of paths. Relative paths are joint to the workspace root. - Glob patterns are currently not supported. - ''; - }; - }; - }; - settings = cfg: {nil = {inherit (cfg) formatting diagnostics;};}; - } - { - name = "pylsp"; - description = "Enable pylsp, for Python."; - package = pkgs.python3Packages.python-lsp-server; - } - { - name = "pyright"; - description = "Enable pyright, for Python."; - } - { - name = "rnix-lsp"; - description = "Enable rnix LSP, for Nix"; - serverName = "rnix"; - } - { - name = "rust-analyzer"; - description = "Enable rust-analyzer, for Rust."; - serverName = "rust_analyzer"; - - settingsOptions = import ./rust-analyzer-config.nix lib; - settings = cfg: {rust-analyzer = cfg;}; - } { name = "lua-ls"; description = "Enable lua LS, for lua"; @@ -279,6 +227,64 @@ with lib; let }; settings = cfg: {Lua = cfg;}; } + { + name = "nil_ls"; + description = "Enable nil, for Nix"; + package = pkgs.nil; + settingsOptions = { + formatting.command = mkOption { + type = types.nullOr (types.listOf types.str); + default = null; + description = '' + External formatter command (with arguments). + It should accepts file content in stdin and print the formatted code into stdout. + ''; + }; + diagnostics = { + ignored = mkOption { + type = types.listOf types.str; + default = []; + description = '' + Ignored diagnostic kinds. + The kind identifier is a snake_cased_string usually shown together + with the diagnostic message. + ''; + }; + excludedFiles = mkOption { + type = types.listOf types.str; + default = []; + description = '' + Files to exclude from showing diagnostics. Useful for generated files. + It accepts an array of paths. Relative paths are joint to the workspace root. + Glob patterns are currently not supported. + ''; + }; + }; + }; + settings = cfg: {nil = {inherit (cfg) formatting diagnostics;};}; + } + { + name = "pylsp"; + description = "Enable pylsp, for Python."; + package = pkgs.python3Packages.python-lsp-server; + } + { + name = "pyright"; + description = "Enable pyright, for Python."; + } + { + name = "rnix-lsp"; + description = "Enable rnix LSP, for Nix"; + serverName = "rnix"; + } + { + name = "rust-analyzer"; + description = "Enable rust-analyzer, for Rust."; + serverName = "rust_analyzer"; + + settingsOptions = import ./rust-analyzer-config.nix lib; + settings = cfg: {rust-analyzer = cfg;}; + } { name = "tailwindcss"; description = "Enable tailwindcss language server, for tailwindcss"; @@ -302,12 +308,6 @@ with lib; let name = "zls"; description = "Enable zls, for Zig."; } - { - name = "hls"; - description = "Enable haskell language server"; - package = pkgs.haskell-language-server; - cmd = cfg: ["haskell-language-server-wrapper"]; - } ]; in { imports =