English is a programming language, fight me

This commit is contained in:
Geoffrey Frogeye 2024-01-19 22:50:01 +01:00
parent eac22be095
commit 55756e4ae7
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
9 changed files with 165 additions and 62 deletions

View file

@ -4,6 +4,7 @@
./common.nix
./go.nix
./node.nix
./prose.nix
./python.nix
];
}

23
hm/dev/prose.nix Normal file
View file

@ -0,0 +1,23 @@
# Prose is a programming language, fight me
{ pkgs, lib, config, ... }:
{
config = lib.mkIf config.frogeye.dev.prose {
home = {
packages = with pkgs; [
hunspell
hunspellDicts.en_GB-ize
hunspellDicts.en_US
hunspellDicts.fr-moderne
hunspellDicts.nl_NL
# TODO libreoffice-extension-languagetool or libreoffice-extension-grammalecte-fr
];
};
programs.nixvim.plugins.none-ls = {
enable = true;
sources = {
code_actions.ltrs.enable = true;
diagnostics.ltrs.enable = true;
};
};
};
}

View file

@ -34,12 +34,6 @@
# TODO Convert existing LaTeX documents into using Nix build system
# texlive is big and not that much used, sooo
pdftk
hunspell
hunspellDicts.en_GB-ize
hunspellDicts.en_US
hunspellDicts.fr-moderne
hunspellDicts.nl_NL
# TODO libreoffice-extension-languagetool or libreoffice-extension-grammalecte-fr
] ++ lib.optionals config.frogeye.desktop.xorg [

View file

@ -91,8 +91,6 @@
# Language-specific
tcomment_vim # Language-aware (un)commenting
] ++ lib.optionals config.frogeye.extra [
vim-LanguageTool # Check grammar for human languages
] ++ lib.optionals config.programs.pandoc.enable [
vim-pandoc # Pandoc-specific stuff because there's no LSP for it
vim-pandoc-syntax
@ -100,7 +98,6 @@
ansible-vim
# Doesn't generate snippets, but those are for UltiSnip anyways
];
extraConfigLua = builtins.readFile ./symbols-outline-nvim.lua;
extraConfigVim = ''
" GENERAL
@ -110,11 +107,6 @@
command Reload source $MYVIMRC
" PLUGINS
'' + lib.optionalString config.frogeye.extra ''
" languagetool
let g:languagetool_cmd = "${pkgs.languagetool}/bin/languagetool-commandline"
" TODO Doesn't work
'' + lib.optionalString config.programs.pandoc.enable ''
" vim-pandox
let g:pandoc#modules#disabled = ["folding"]
@ -153,9 +145,6 @@
# PLUGINS
# symbols-outline-nvim
{ key = "<Space>s"; action = "<Cmd>SymbolsOutline<CR>"; options = { silent = true; }; }
# undotree
{ key = "<Space>u"; action = "<Cmd>UndotreeToggle<CR>"; options = { silent = true; }; }

View file

@ -12,25 +12,6 @@
lsp_signature-nvim # Show argument definition when typing a function
];
keymaps = [
# barbar
{ key = "<C-H>"; action = "<Cmd>BufferPrevious<CR>"; options = { silent = true; }; }
{ key = "<C-L>"; action = "<Cmd>BufferNext<CR>"; options = { silent = true; }; }
# TODO https://www.reddit.com/r/neovim/comments/mbj8m5/how_to_setup_ctrlshiftkey_mappings_in_neovim_and/
{ key = "<Space><C-H>"; action = "<Cmd>BufferMovePrevious<CR>"; options = { silent = true; }; }
{ key = "<Space><C-L>"; action = "<Cmd>BufferMoveNext<CR>"; options = { silent = true; }; }
# TODO gotos don't work
{ key = "<C-1>"; action = "<Cmd>BufferGoto 1<CR>"; options = { silent = true; }; }
{ key = "<C-2>"; action = "<Cmd>BufferGoto 2<CR>"; options = { silent = true; }; }
{ key = "<C-3>"; action = "<Cmd>BufferGoto 3<CR>"; options = { silent = true; }; }
{ key = "<C-4>"; action = "<Cmd>BufferGoto 4<CR>"; options = { silent = true; }; }
{ key = "<C-5>"; action = "<Cmd>BufferGoto 5<CR>"; options = { silent = true; }; }
{ key = "<C-6>"; action = "<Cmd>BufferGoto 6<CR>"; options = { silent = true; }; }
{ key = "<C-7>"; action = "<Cmd>BufferGoto 7<CR>"; options = { silent = true; }; }
{ key = "<C-8>"; action = "<Cmd>BufferGoto 8<CR>"; options = { silent = true; }; }
{ key = "<C-9>"; action = "<Cmd>BufferGoto 9<CR>"; options = { silent = true; }; }
{ key = "<C-0>"; action = "<Cmd>BufferLast<CR>"; options = { silent = true; }; }
{ key = "gb"; action = "<Cmd>BufferPick<CR>"; options = { silent = true; }; }
# TODO Other useful options?
];
plugins = {
# Language Server
@ -44,6 +25,7 @@
"]e" = "goto_next";
};
lspBuf = {
# TODO Include the Telescope ones in this file
"gD" = "declaration";
"K" = "hover";
"gi" = "implementation";
@ -55,6 +37,7 @@
# Also makes nvim crash like this, so uncommented
"<space>D" = "type_definition";
"<space>rn" = "rename";
"<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?

View file

@ -1,19 +0,0 @@
vim.g.symbols_outline = {
highlight_hovered_item = true,
show_guides = true,
auto_preview = true,
position = 'right',
show_numbers = false,
show_relative_numbers = false,
show_symbol_details = true,
keymaps = {
close = "<Esc>",
goto_location = "<Cr>",
focus_location = "o",
hover_symbol = "<C-space>",
rename_symbol = "r",
code_actions = "a",
},
lsp_blacklist = {},
}
-- TODO Should be hierarchical, doesn't seem to be :/