Compare commits
3 commits
55756e4ae7
...
7cd77af9bf
Author | SHA1 | Date | |
---|---|---|---|
Geoffrey Frogeye | 7cd77af9bf | ||
Geoffrey Frogeye | a57c6527ce | ||
Geoffrey Frogeye | 97a3e5f6e4 |
|
@ -144,6 +144,8 @@ in
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
gnome.gedit
|
gnome.gedit
|
||||||
|
xfce.thunar
|
||||||
|
nomacs
|
||||||
feh
|
feh
|
||||||
zbar
|
zbar
|
||||||
zathura
|
zathura
|
||||||
|
|
|
@ -12,7 +12,21 @@
|
||||||
# TODO libreoffice-extension-languagetool or libreoffice-extension-grammalecte-fr
|
# TODO libreoffice-extension-languagetool or libreoffice-extension-grammalecte-fr
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
programs.nixvim.plugins.none-ls = {
|
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;
|
enable = true;
|
||||||
sources = {
|
sources = {
|
||||||
code_actions.ltrs.enable = true;
|
code_actions.ltrs.enable = true;
|
||||||
|
@ -20,4 +34,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,10 +50,6 @@
|
||||||
gH = "command_history";
|
gH = "command_history";
|
||||||
gS = "search_history";
|
gS = "search_history";
|
||||||
gC = "commands";
|
gC = "commands";
|
||||||
gr = "lsp_references";
|
|
||||||
ge = "diagnostics";
|
|
||||||
gd = "lsp_definitions";
|
|
||||||
gs = "lsp_document_symbols";
|
|
||||||
};
|
};
|
||||||
defaults = {
|
defaults = {
|
||||||
vimgrep_arguments = [
|
vimgrep_arguments = [
|
||||||
|
@ -91,37 +87,18 @@
|
||||||
|
|
||||||
# Language-specific
|
# Language-specific
|
||||||
tcomment_vim # Language-aware (un)commenting
|
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 [
|
] ++ lib.optionals config.frogeye.dev.ansible [
|
||||||
ansible-vim
|
ansible-vim
|
||||||
# Doesn't generate snippets, but those are for UltiSnip anyways
|
# Doesn't generate snippets, but those are for UltiSnip anyways
|
||||||
];
|
];
|
||||||
extraConfigVim = ''
|
extraConfigVim = ''
|
||||||
" GENERAL
|
|
||||||
|
|
||||||
" Avoid showing message extra message when using completion
|
" Avoid showing message extra message when using completion
|
||||||
set shortmess+=c
|
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 = {
|
userCommands = {
|
||||||
# Reload = { command = "source $MYVIRMC"; };
|
Reload = { command = "source ${config.xdg.configHome}/nvim/init.lua"; force = false; };
|
||||||
# TODO Is not working, options is set to nil even though it shouldn't
|
# 24.05 force=false was for https://github.com/nix-community/nixvim/issues/954
|
||||||
};
|
};
|
||||||
|
|
||||||
keymaps = [
|
keymaps = [
|
||||||
|
|
|
@ -12,6 +12,28 @@
|
||||||
lsp_signature-nvim # Show argument definition when typing a function
|
lsp_signature-nvim # Show argument definition when typing a function
|
||||||
];
|
];
|
||||||
keymaps = [
|
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 = {
|
plugins = {
|
||||||
# Language Server
|
# Language Server
|
||||||
|
@ -25,25 +47,24 @@
|
||||||
"]e" = "goto_next";
|
"]e" = "goto_next";
|
||||||
};
|
};
|
||||||
lspBuf = {
|
lspBuf = {
|
||||||
# TODO Include the Telescope ones in this file
|
|
||||||
"gD" = "declaration";
|
"gD" = "declaration";
|
||||||
"K" = "hover";
|
"K" = "hover";
|
||||||
"gi" = "implementation";
|
"gi" = "implementation";
|
||||||
"<C-S-k>" = "signature_help";
|
"<C-S-k>" = "signature_help";
|
||||||
"<space>wa" = "add_workspace_folder";
|
"<space>wa" = "add_workspace_folder";
|
||||||
"<space>wr" = "remove_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>D" = "type_definition";
|
||||||
"<space>rn" = "rename";
|
"<space>rn" = "rename";
|
||||||
"<space>ca" = "code_action";
|
"<space>ca" = "code_action"; # Reference has a binding for visual mode, but it doesn't work
|
||||||
"<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 = {
|
nvim-lightbulb = {
|
||||||
# Shows a lightbulb whenever a codeAction is available under the cursor
|
# Shows a lightbulb whenever a codeAction is available under the cursor
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in a new issue