Compare commits
No commits in common. "7cd77af9bf72cc2d417581f63d6cd7ea71470565" and "55756e4ae7730cfc90ec14c07582447689141d73" have entirely different histories.
7cd77af9bf
...
55756e4ae7
|
@ -144,8 +144,6 @@ in
|
|||
|
||||
# misc
|
||||
gnome.gedit
|
||||
xfce.thunar
|
||||
nomacs
|
||||
feh
|
||||
zbar
|
||||
zathura
|
||||
|
|
|
@ -12,26 +12,11 @@
|
|||
# TODO libreoffice-extension-languagetool or libreoffice-extension-grammalecte-fr
|
||||
];
|
||||
};
|
||||
programs.nixvim = {
|
||||
autoCmd = [
|
||||
# vim-easy-align: Align Markdown tables with |
|
||||
{ event = "FileType"; pattern = "markdown"; command = "vmap <Bar> :EasyAlign*<Bar><Enter>"; }
|
||||
];
|
||||
extraPlugins = with pkgs.vimPlugins; lib.optionals config.programs.pandoc.enable [
|
||||
vim-pandoc # Pandoc-specific stuff because there's no LSP for it
|
||||
vim-pandoc-syntax
|
||||
];
|
||||
extraConfigVim = lib.optionalString config.programs.pandoc.enable ''
|
||||
let g:pandoc#modules#disabled = ["folding"]
|
||||
let g:pandoc#spell#enabled = 0
|
||||
let g:pandoc#syntax#conceal#use = 0
|
||||
'';
|
||||
plugins.none-ls = {
|
||||
enable = true;
|
||||
sources = {
|
||||
code_actions.ltrs.enable = true;
|
||||
diagnostics.ltrs.enable = true;
|
||||
};
|
||||
programs.nixvim.plugins.none-ls = {
|
||||
enable = true;
|
||||
sources = {
|
||||
code_actions.ltrs.enable = true;
|
||||
diagnostics.ltrs.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -50,6 +50,10 @@
|
|||
gH = "command_history";
|
||||
gS = "search_history";
|
||||
gC = "commands";
|
||||
gr = "lsp_references";
|
||||
ge = "diagnostics";
|
||||
gd = "lsp_definitions";
|
||||
gs = "lsp_document_symbols";
|
||||
};
|
||||
defaults = {
|
||||
vimgrep_arguments = [
|
||||
|
@ -87,18 +91,37 @@
|
|||
|
||||
# Language-specific
|
||||
tcomment_vim # Language-aware (un)commenting
|
||||
] ++ lib.optionals config.programs.pandoc.enable [
|
||||
vim-pandoc # Pandoc-specific stuff because there's no LSP for it
|
||||
vim-pandoc-syntax
|
||||
] ++ lib.optionals config.frogeye.dev.ansible [
|
||||
ansible-vim
|
||||
# Doesn't generate snippets, but those are for UltiSnip anyways
|
||||
];
|
||||
extraConfigVim = ''
|
||||
" GENERAL
|
||||
|
||||
" Avoid showing message extra message when using completion
|
||||
set shortmess+=c
|
||||
|
||||
command Reload source $MYVIMRC
|
||||
|
||||
" PLUGINS
|
||||
'' + lib.optionalString config.programs.pandoc.enable ''
|
||||
" vim-pandox
|
||||
let g:pandoc#modules#disabled = ["folding"]
|
||||
let g:pandoc#spell#enabled = 0
|
||||
let g:pandoc#syntax#conceal#use = 0
|
||||
|
||||
'';
|
||||
autoCmd = [
|
||||
# vim-easy-align: Align Markdown tables
|
||||
{ event = "FileType"; pattern = "markdown"; command = "vmap <Bar> :EasyAlign*<Bar><Enter>"; }
|
||||
];
|
||||
|
||||
userCommands = {
|
||||
Reload = { command = "source ${config.xdg.configHome}/nvim/init.lua"; force = false; };
|
||||
# 24.05 force=false was for https://github.com/nix-community/nixvim/issues/954
|
||||
# Reload = { command = "source $MYVIRMC"; };
|
||||
# TODO Is not working, options is set to nil even though it shouldn't
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
|
|
|
@ -12,28 +12,6 @@
|
|||
lsp_signature-nvim # Show argument definition when typing a function
|
||||
];
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<space>wl";
|
||||
lua = true;
|
||||
action = ''
|
||||
function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end
|
||||
'';
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<space>f";
|
||||
lua = true;
|
||||
action = ''
|
||||
function()
|
||||
vim.lsp.buf.format { async = true }
|
||||
end
|
||||
'';
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
plugins = {
|
||||
# Language Server
|
||||
|
@ -47,24 +25,25 @@
|
|||
"]e" = "goto_next";
|
||||
};
|
||||
lspBuf = {
|
||||
# TODO Include the Telescope ones in this file
|
||||
"gD" = "declaration";
|
||||
"K" = "hover";
|
||||
"gi" = "implementation";
|
||||
"<C-S-k>" = "signature_help";
|
||||
"<space>wa" = "add_workspace_folder";
|
||||
"<space>wr" = "remove_workspace_folder";
|
||||
# "<space>wl" = "list_workspace_folder";
|
||||
# TODO Full thing was function() print(vim.inspect(vim.lsp.buf.list_workspace_folder())) end but not sure I'm ever really using this
|
||||
# Also makes nvim crash like this, so uncommented
|
||||
"<space>D" = "type_definition";
|
||||
"<space>rn" = "rename";
|
||||
"<space>ca" = "code_action"; # Reference has a binding for visual mode, but it doesn't work
|
||||
"<space>ca" = "code_action";
|
||||
"<space>f" = "format";
|
||||
# TODO Full thing was function() vim.lsp.buf.format { async = true } end, so async while this isn't
|
||||
# Maybe replace this with lsp-format?
|
||||
};
|
||||
};
|
||||
};
|
||||
telescope.keymaps = {
|
||||
gr = "lsp_references";
|
||||
ge = "diagnostics";
|
||||
gd = "lsp_definitions";
|
||||
gs = "lsp_document_symbols";
|
||||
};
|
||||
nvim-lightbulb = {
|
||||
# Shows a lightbulb whenever a codeAction is available under the cursor
|
||||
enable = true;
|
||||
|
|
Loading…
Reference in a new issue