From 9d54e5d3051d0c2ed41cd27cc5f0f2e9aa06709e Mon Sep 17 00:00:00 2001 From: Redyf Date: Sat, 10 Feb 2024 16:51:28 -0300 Subject: [PATCH 1/3] refactor: Commenting unused plugins to improve startup time --- config/default.nix | 25 ++++++++++--------------- config/lsp/conform.nix | 5 ----- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/config/default.nix b/config/default.nix index da0263c9..8507f90a 100644 --- a/config/default.nix +++ b/config/default.nix @@ -1,8 +1,4 @@ -{ inputs -, self -, pkgs -, ... -}: { +{ # Import all your configuration modules here imports = [ ./sets.nix @@ -10,9 +6,9 @@ ./bufferlines/bufferline.nix - ./colorschemes/base16.nix + # ./colorschemes/base16.nix ./colorschemes/catppuccin.nix - ./colorschemes/rose-pine.nix + # ./colorschemes/rose-pine.nix ./completion/cmp.nix ./completion/copilot.nix @@ -20,18 +16,17 @@ ./dap/dap.nix - ./filetrees/neo-tree.nix - + # ./filetrees/neo-tree.nix ./git/gitsigns.nix ./git/lazygit.nix - ./git/neogit.nix + # ./git/neogit.nix ./languages/nvim-jdtls.nix ./languages/nvim-lint.nix ./languages/typescript-tools-nvim.nix ./languages/treesitter/treesitter.nix ./languages/treesitter/treesitter-context.nix - ./languages/treesitter/treesitter-textobjects.nix + # ./languages/treesitter/treesitter-textobjects.nix ./languages/treesitter/ts-autotag.nix ./languages/treesitter/ts-context-commentstring.nix @@ -41,7 +36,7 @@ ./lsp/lspsaga.nix ./lsp/trouble.nix - ./none-ls/none-ls.nix + # ./none-ls/none-ls.nix ./snippets/luasnip.nix @@ -58,15 +53,15 @@ ./utils/better-escape.nix ./utils/discordrpc.nix - ./utils/flash.nix + # ./utils/flash.nix ./utils/hardtime.nix ./utils/harpoon.nix - ./utils/illuminate.nix + # ./utils/illuminate.nix ./utils/markdown-preview.nix ./utils/mini.nix ./utils/neodev.nix ./utils/neotest.nix - ./utils/nvim-autopairs.nix + # ./utils/nvim-autopairs.nix ./utils/nvim-colorizer.nix ./utils/nvim-surround.nix ./utils/oil.nix diff --git a/config/lsp/conform.nix b/config/lsp/conform.nix index d6322cc3..8853ac17 100644 --- a/config/lsp/conform.nix +++ b/config/lsp/conform.nix @@ -1,11 +1,6 @@ { plugins.conform-nvim = { enable = true; - # As a shortcut, conform will optionally set up this format-on-save autocmd for you - # formatOnSave = { - # lspFallback = true; - # timeoutMs = 500; - # }; notifyOnError = true; formattersByFt = { html = [["prettierd" "prettier"]]; From 22cbf337e04e2f1c9924ab78cb1e3f214f196d52 Mon Sep 17 00:00:00 2001 From: Redyf Date: Sat, 10 Feb 2024 16:52:34 -0300 Subject: [PATCH 2/3] feat: Add capabilities option for lsp to fix clangd --- config/lsp/lsp.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config/lsp/lsp.nix b/config/lsp/lsp.nix index 462e33b7..224585ce 100644 --- a/config/lsp/lsp.nix +++ b/config/lsp/lsp.nix @@ -5,8 +5,9 @@ }; lsp = { enable = true; + capabilities = "offsetEncoding = 'utf-16'"; servers = { - clangd = { enable = true; }; + clangd = {enable = true;}; lua-ls = { enable = true; extraOptions = { @@ -22,14 +23,14 @@ }; }; }; - nil_ls = { enable = true; }; + nil_ls = {enable = true;}; tsserver = { enable = false; - filetypes = [ "javascript" "javascriptreact" "typescript" "typescriptreact" ]; + filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact"]; }; - eslint = { enable = true; }; - pyright = { enable = true; }; - ruff-lsp = { enable = true; }; + eslint = {enable = true;}; + pyright = {enable = true;}; + ruff-lsp = {enable = true;}; rust-analyzer = { enable = true; From 5a1fcef06f6fbe8eb0b00dd4275a171ea3e920c7 Mon Sep 17 00:00:00 2001 From: redyf Date: Sat, 10 Feb 2024 19:54:20 +0000 Subject: [PATCH 3/3] Auto lint/format --- config/lsp/lsp.nix | 12 ++++++------ flake.lock | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/lsp/lsp.nix b/config/lsp/lsp.nix index 224585ce..e4fa515a 100644 --- a/config/lsp/lsp.nix +++ b/config/lsp/lsp.nix @@ -7,7 +7,7 @@ enable = true; capabilities = "offsetEncoding = 'utf-16'"; servers = { - clangd = {enable = true;}; + clangd = { enable = true; }; lua-ls = { enable = true; extraOptions = { @@ -23,14 +23,14 @@ }; }; }; - nil_ls = {enable = true;}; + nil_ls = { enable = true; }; tsserver = { enable = false; - filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact"]; + filetypes = [ "javascript" "javascriptreact" "typescript" "typescriptreact" ]; }; - eslint = {enable = true;}; - pyright = {enable = true;}; - ruff-lsp = {enable = true;}; + eslint = { enable = true; }; + pyright = { enable = true; }; + ruff-lsp = { enable = true; }; rust-analyzer = { enable = true; diff --git a/flake.lock b/flake.lock index e1f54f60..4854f06d 100644 --- a/flake.lock +++ b/flake.lock @@ -176,11 +176,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1707545157, - "narHash": "sha256-w4dubmw//nocfi2/KkvM1SLtDQUhIFfVsXDWf3zZTLk=", + "lastModified": 1707584021, + "narHash": "sha256-UVRukeM/6UsqqZ/z+Pe59pPWH3Ys9kyuS3lfkH4IsM4=", "owner": "nix-community", "repo": "nixvim", - "rev": "66c069c48db4b67fd0d536128b000684a5f72f5b", + "rev": "3c174e874c06a3f86cd911e5bb48ca38fe958b51", "type": "github" }, "original": {