parent
83bc927a8d
commit
4d6a733a6e
4 changed files with 45 additions and 0 deletions
configurations/android
homeManagerModules/neovim
|
@ -52,6 +52,7 @@
|
||||||
user = "nix-on-droid";
|
user = "nix-on-droid";
|
||||||
|
|
||||||
ideConfig = {
|
ideConfig = {
|
||||||
|
enableGolang = false;
|
||||||
enableJava = false;
|
enableJava = false;
|
||||||
enableNix = false;
|
enableNix = false;
|
||||||
enablePython = false;
|
enablePython = false;
|
||||||
|
|
|
@ -25,6 +25,10 @@ in {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
enableGolang = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
enableJava = mkOption {
|
enableJava = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
|
|
@ -14,6 +14,7 @@ in {
|
||||||
imports = [
|
imports = [
|
||||||
./bash
|
./bash
|
||||||
./c-lang
|
./c-lang
|
||||||
|
./golang
|
||||||
./hyprlang
|
./hyprlang
|
||||||
./java
|
./java
|
||||||
./json
|
./json
|
||||||
|
|
39
homeManagerModules/neovim/langs/golang/default.nix
Normal file
39
homeManagerModules/neovim/langs/golang/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
cfg = config.programs.neovim;
|
||||||
|
in {
|
||||||
|
config = mkIf (cfg.enable && cfg.ideConfig.enableGolang) {
|
||||||
|
programs = {
|
||||||
|
neovim = {
|
||||||
|
extraPackages = with pkgs; [go gopls];
|
||||||
|
|
||||||
|
plugins = [
|
||||||
|
{
|
||||||
|
plugin = pkgs.vimPlugins.clangd_extensions-nvim;
|
||||||
|
type = "lua";
|
||||||
|
config =
|
||||||
|
# lua
|
||||||
|
''
|
||||||
|
local lsp = require('lspconfig');
|
||||||
|
local default_capabilities = require('cmp_nvim_lsp').default_capabilities();
|
||||||
|
|
||||||
|
lsp.gopls.setup({
|
||||||
|
cmd = { '${pkgs.gopls}/bin/gopls' },
|
||||||
|
capabilities = default_capabilities,
|
||||||
|
});
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# For accurate stack trace
|
||||||
|
_file = ./default.nix;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue