Compare commits

..

2 commits

Author SHA1 Message Date
Geoffrey Frogeye 41c3266ee2
Process nvim FIXMEs 2023-12-08 19:02:29 +01:00
Geoffrey Frogeye 85ac632025
Fix Perl Language server 2023-12-07 23:10:48 +01:00
3 changed files with 19 additions and 13 deletions

View file

@ -7,6 +7,8 @@
c = true;
docker = true;
fpga = true;
perl = true;
php = true;
python = true;
};
extra = true;

View file

@ -2,7 +2,7 @@
let
nixvim = import (builtins.fetchGit {
url = "https://github.com/nix-community/nixvim";
ref = "nixos-23.11";
rev = "c96d7b46d05a78e695ed1c725d1596b65509b4f9"; # 24.05 Anythin after this commit works
});
vim-shot-f = pkgs.vimUtils.buildVimPlugin {
pname = "vim-shot-f";
@ -98,10 +98,10 @@ in
gS = "search_history";
gC = "commands";
gr = "lsp_references";
ge = "diagnostics";
# ga = "lsp_code_actions";
# ge = "lsp_document_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";
gs = "lsp_document_symbols";
};
@ -156,14 +156,14 @@ in
};
};
servers = {
# FIXME ansiblels
ansiblels.enable = config.frogeye.dev.ansible; # Ansible
bashls.enable = true; # Bash
jsonls.enable = true; # JSON
lua-ls.enable = true; # Lua (for Neovim debugging)
# FIXME perlls
pylsp = lib.mkIf config.frogeye.dev.python {
perlpls.enable = config.frogeye.dev.perl; # Perl
pylsp = {
# Python
enable = true;
enable = config.frogeye.dev.python;
settings.plugins = {
black.enabled = true;
flake8 = {
@ -187,20 +187,21 @@ in
"--disallow-untyped-calls"
"--disallow-incomplete-defs"
"--disallow-untyped-decorators"
true
];
};
# FIXME Somehow no warning is shown
# TODO Could add some, could also remove some
};
};
phpactor.enable = true; # PHP
phpactor.enable = config.frogeye.dev.php; # PHP
rnix-lsp.enable = true; # Nix
# FIXME sqlls
# TODO Something for SQL. sqls is deprecated, sqlls is not in Nixpkgs. Probably needs a DB connection configured anyways?
yamlls.enable = true; # YAML
# TODO Check out none-ls
};
# FIXME vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') as onAttach... is it needed?
# FIXME flags = { debounce_text_changes = 150 } is the default value ok? Maybe it was actually ignored
onAttach = ''
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
''; # Seems needed for auto-completion with nvim-compe
};
nvim-lightbulb = {
# Shows a lightbulb whenever a codeAction is available under the cursor
@ -288,13 +289,14 @@ in
] ++ lib.optionals config.frogeye.dev.c [
nvim-dap # Debug Adapter Protocol client
] ++ 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) [
./vim/feline.lua
./vim/symbols-outline-nvim.lua
./vim/lsp_signature-nvim.lua
./vim/nvim-ts-rainbow.lua
./vim/nvim-compe.lua
];
extraConfigVim = ''
" GENERAL

View file

@ -30,6 +30,8 @@
c = lib.mkEnableOption "C/C++ dev stuff";
docker = lib.mkEnableOption "Docker 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";
};
shellAliases = lib.mkOption {