From 9521ecd892bfd9bed9ae7e330c566629cee15508 Mon Sep 17 00:00:00 2001 From: Bad Date: Tue, 24 May 2022 20:19:06 +0200 Subject: [PATCH] Fix coc-nvim config --- overlays/overrides.nix | 1 + users/profiles/neovim/default.nix | 53 +++++++++++++++++-------------- 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/overlays/overrides.nix b/overlays/overrides.nix index bd3a3e4..f33dec4 100644 --- a/overlays/overrides.nix +++ b/overlays/overrides.nix @@ -22,6 +22,7 @@ in delve neovim polymc + sumneko-lua-language-server cargo-crev cargo-fuzz tdesktop diff --git a/users/profiles/neovim/default.nix b/users/profiles/neovim/default.nix index 41ab312..f5986d7 100644 --- a/users/profiles/neovim/default.nix +++ b/users/profiles/neovim/default.nix @@ -127,7 +127,7 @@ coc-pyright coc-tsserver coc-clangd - + coc-lua kotlin-vim neoformat undotree @@ -152,29 +152,34 @@ ''; coc.enable = true; coc.settings = { - text = { - "coc.preferences.formatOnSaveFiletypes" = [ - "css" - "markdown" - "javascript" - "typescript" - ]; - "prettier.useTabs" = true; - "rust-analyzer.server.path" = "${pkgs.fenix.rust-analyzer}"; - "rust-analyzer.updates.prompt" = false; - "rust-analyzer.updates.checkOnStartup" = false; - "rust-analyzer.cargo.loadOutDirsFromCheck" = true; - "rust-analyzer.procMacro.enable" = true; - "clangd.checkUpdates" = false; - "clangd.path" = "clangd"; - "svelte.plugin.svelte.format.enable" = false; - "languageserver" = { - "nix" = { - "command" = "${pkgs.rnix-lsp}/bin/rnix-lsp"; - "filetypes" = [ - "nix" - ]; - }; + "coc.preferences.formatOnSaveFiletypes" = [ + "css" + "markdown" + "javascript" + "typescript" + ]; + "prettier.useTabs" = true; + "rust-analyzer.server.path" = "${pkgs.fenix.rust-analyzer}"; + "rust-analyzer.updates.prompt" = false; + "rust-analyzer.updates.checkOnStartup" = false; + "rust-analyzer.cargo.loadOutDirsFromCheck" = true; + "rust-analyzer.procMacro.enable" = true; + "clangd.checkUpdates" = false; + "clangd.path" = "clangd"; + "svelte.plugin.svelte.format.enable" = false; + "languageserver" = { + "nix" = { + "command" = "${pkgs.rnix-lsp}/bin/rnix-lsp"; + "filetypes" = [ + "nix" + ]; + }; + "lua" = { + "command" = "${pkgs.sumneko-lua-language-server}/bin/lua-language-server"; + "rootPatterns" = [ ".git" ]; + "filetypes" = [ + "lua" + ]; }; }; };