nix #11
|
@ -7,6 +7,8 @@
|
||||||
c = true;
|
c = true;
|
||||||
docker = true;
|
docker = true;
|
||||||
fpga = true;
|
fpga = true;
|
||||||
|
perl = true;
|
||||||
|
php = true;
|
||||||
python = true;
|
python = true;
|
||||||
};
|
};
|
||||||
extra = true;
|
extra = true;
|
||||||
|
|
29
hm/vim.nix
29
hm/vim.nix
|
@ -1,9 +1,8 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
let
|
let
|
||||||
nixvim = import (builtins.fetchGit {
|
nixvim = import (builtins.fetchGit {
|
||||||
# UPST Ready to create a MR once the tests have ran
|
url = "https://github.com/nix-community/nixvim";
|
||||||
url = "https://github.com/GeoffreyFrogeye/nixvim";
|
rev = "c96d7b46d05a78e695ed1c725d1596b65509b4f9"; # 24.05 Anythin after this commit works
|
||||||
ref = "perlls";
|
|
||||||
});
|
});
|
||||||
vim-shot-f = pkgs.vimUtils.buildVimPlugin {
|
vim-shot-f = pkgs.vimUtils.buildVimPlugin {
|
||||||
pname = "vim-shot-f";
|
pname = "vim-shot-f";
|
||||||
|
@ -99,10 +98,10 @@ in
|
||||||
gS = "search_history";
|
gS = "search_history";
|
||||||
gC = "commands";
|
gC = "commands";
|
||||||
gr = "lsp_references";
|
gr = "lsp_references";
|
||||||
|
ge = "diagnostics";
|
||||||
# ga = "lsp_code_actions";
|
# ga = "lsp_code_actions";
|
||||||
# ge = "lsp_document_diagnostics";
|
|
||||||
# gE = "lsp_workspace_diagnostics";
|
# gE = "lsp_workspace_diagnostics";
|
||||||
# FIXME Above makes nvim crash on startup, action is not provided
|
# TODO Above makes nvim crash on startup, action is not provided
|
||||||
gd = "lsp_definitions";
|
gd = "lsp_definitions";
|
||||||
gs = "lsp_document_symbols";
|
gs = "lsp_document_symbols";
|
||||||
};
|
};
|
||||||
|
@ -157,14 +156,14 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
servers = {
|
servers = {
|
||||||
ansiblels.enable = true; # Ansible
|
ansiblels.enable = config.frogeye.dev.ansible; # Ansible
|
||||||
bashls.enable = true; # Bash
|
bashls.enable = true; # Bash
|
||||||
jsonls.enable = true; # JSON
|
jsonls.enable = true; # JSON
|
||||||
lua-ls.enable = true; # Lua (for Neovim debugging)
|
lua-ls.enable = true; # Lua (for Neovim debugging)
|
||||||
perlpls.enable = true; # Perl
|
perlpls.enable = config.frogeye.dev.perl; # Perl
|
||||||
pylsp = lib.mkIf config.frogeye.dev.python {
|
pylsp = {
|
||||||
# Python
|
# Python
|
||||||
enable = true;
|
enable = config.frogeye.dev.python;
|
||||||
settings.plugins = {
|
settings.plugins = {
|
||||||
black.enabled = true;
|
black.enabled = true;
|
||||||
flake8 = {
|
flake8 = {
|
||||||
|
@ -188,20 +187,21 @@ in
|
||||||
"--disallow-untyped-calls"
|
"--disallow-untyped-calls"
|
||||||
"--disallow-incomplete-defs"
|
"--disallow-incomplete-defs"
|
||||||
"--disallow-untyped-decorators"
|
"--disallow-untyped-decorators"
|
||||||
|
true
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# FIXME Somehow no warning is shown
|
|
||||||
# TODO Could add some, could also remove some
|
# TODO Could add some, could also remove some
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
phpactor.enable = true; # PHP
|
phpactor.enable = config.frogeye.dev.php; # PHP
|
||||||
rnix-lsp.enable = true; # Nix
|
rnix-lsp.enable = true; # Nix
|
||||||
# TODO Something for SQL. sqls is deprecated, sqlls is not in Nixpkgs. Probably needs a DB connection configured anyways?
|
# TODO Something for SQL. sqls is deprecated, sqlls is not in Nixpkgs. Probably needs a DB connection configured anyways?
|
||||||
yamlls.enable = true; # YAML
|
yamlls.enable = true; # YAML
|
||||||
# TODO Check out none-ls
|
# TODO Check out none-ls
|
||||||
};
|
};
|
||||||
# FIXME vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') as onAttach... is it needed?
|
onAttach = ''
|
||||||
# FIXME flags = { debounce_text_changes = 150 } is the default value ok? Maybe it was actually ignored
|
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
|
''; # Seems needed for auto-completion with nvim-compe
|
||||||
};
|
};
|
||||||
nvim-lightbulb = {
|
nvim-lightbulb = {
|
||||||
# Shows a lightbulb whenever a codeAction is available under the cursor
|
# Shows a lightbulb whenever a codeAction is available under the cursor
|
||||||
|
@ -289,13 +289,14 @@ in
|
||||||
] ++ lib.optionals config.frogeye.dev.c [
|
] ++ lib.optionals config.frogeye.dev.c [
|
||||||
nvim-dap # Debug Adapter Protocol client
|
nvim-dap # Debug Adapter Protocol client
|
||||||
] ++ lib.optionals config.frogeye.dev.ansible [
|
] ++ lib.optionals config.frogeye.dev.ansible [
|
||||||
ansible-vim # FIXME See if it doesn't require to do ./UltiSnips/generate.sh
|
ansible-vim # TODO Doesn't have snippets
|
||||||
];
|
];
|
||||||
extraConfigLua = lib.strings.concatMapStringsSep "\n" (f: builtins.readFile f) [
|
extraConfigLua = lib.strings.concatMapStringsSep "\n" (f: builtins.readFile f) [
|
||||||
./vim/feline.lua
|
./vim/feline.lua
|
||||||
./vim/symbols-outline-nvim.lua
|
./vim/symbols-outline-nvim.lua
|
||||||
./vim/lsp_signature-nvim.lua
|
./vim/lsp_signature-nvim.lua
|
||||||
./vim/nvim-ts-rainbow.lua
|
./vim/nvim-ts-rainbow.lua
|
||||||
|
./vim/nvim-compe.lua
|
||||||
];
|
];
|
||||||
extraConfigVim = ''
|
extraConfigVim = ''
|
||||||
" GENERAL
|
" GENERAL
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
c = lib.mkEnableOption "C/C++ dev stuff";
|
c = lib.mkEnableOption "C/C++ dev stuff";
|
||||||
docker = lib.mkEnableOption "Docker dev stuff";
|
docker = lib.mkEnableOption "Docker dev stuff";
|
||||||
fpga = lib.mkEnableOption "FPGA dev stuff";
|
fpga = lib.mkEnableOption "FPGA dev stuff";
|
||||||
|
perl = lib.mkEnableOption "Perl dev stuff";
|
||||||
|
php = lib.mkEnableOption "PHP dev stuff";
|
||||||
python = lib.mkEnableOption "Python dev stuff";
|
python = lib.mkEnableOption "Python dev stuff";
|
||||||
};
|
};
|
||||||
shellAliases = lib.mkOption {
|
shellAliases = lib.mkOption {
|
||||||
|
|
Loading…
Reference in a new issue