From d987e13e04a02424d59e35c90d6fd4995e4fdcc3 Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Sat, 4 Jan 2025 13:15:57 +0100 Subject: [PATCH] Nixvim: Add Go support --- home/features/coding/nixvim/lsp.nix | 2 +- home/features/coding/nixvim/none-ls.nix | 2 ++ home/features/coding/nixvim/options.nix | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/home/features/coding/nixvim/lsp.nix b/home/features/coding/nixvim/lsp.nix index ec8ff84..8eef179 100644 --- a/home/features/coding/nixvim/lsp.nix +++ b/home/features/coding/nixvim/lsp.nix @@ -17,7 +17,7 @@ bashls.enable = true; # Bash clangd.enable = true; # C/C++ yamlls.enable = true; # YAML - + gopls.enable = true; # Go lua_ls = { # Lua enable = true; diff --git a/home/features/coding/nixvim/none-ls.nix b/home/features/coding/nixvim/none-ls.nix index eefc92b..db7a272 100644 --- a/home/features/coding/nixvim/none-ls.nix +++ b/home/features/coding/nixvim/none-ls.nix @@ -12,6 +12,7 @@ deadnix.enable = true; pylint.enable = true; checkstyle.enable = true; + golangci_lint.enable = true; # Go }; formatting = { alejandra.enable = true; @@ -19,6 +20,7 @@ shfmt.enable = true; nixpkgs_fmt.enable = true; google_java_format.enable = false; + gofmt.enable = true; # Go prettier = { enable = true; disableTsServerFormatter = true; diff --git a/home/features/coding/nixvim/options.nix b/home/features/coding/nixvim/options.nix index 8ae2eba..00a86d4 100644 --- a/home/features/coding/nixvim/options.nix +++ b/home/features/coding/nixvim/options.nix @@ -13,7 +13,8 @@ opts = { number = true; # Show line numbers relativenumber = true; # Show relative line numbers - shiftwidth = 2; # Tab width should be 2 + shiftwidth = 0; # Tab width should be 2 + tabstop = 3; # Tab width should be 4 # Always show the signcolumn, otherwise text would be shifted when displaying error icons signcolumn = "yes";