From 1c134f50b38efcd2018be932a6e9433a0ea89ecd Mon Sep 17 00:00:00 2001 From: Eduardo Cueto-Mendoza Date: Tue, 31 Dec 2024 15:57:36 +0000 Subject: [PATCH] Modified ltex-ls for other file types and other bugs --- .config/fish/conf.d/rustup.fish | 2 +- .config/fish/config.fish | 6 ++ .config/nvim/after/plugin/02_treesitter.lua | 85 ++++++++++++--------- .config/nvim/after/plugin/04_lspconfig.lua | 2 + .config/nvim/after/plugin/05_completion.lua | 1 + .config/nvim/lua/eddie/lazy.lua | 18 ++++- .config/nvim/lua/eddie/options.lua | 20 +++-- .gitconfig | 2 + .gitignore | 8 +- .gnupg/common.conf | 1 + .gnupg/gpg-agent.conf | 15 ++++ .gnupg/gpg.conf | 2 + .gnupg/sshcontrol | 11 +++ .ssh/config | 41 ++++++++++ .ssh/id_rsa_yubikey.pub | 1 + .stow-local-ignore | 11 +++ .wgetrc | 1 + 17 files changed, 177 insertions(+), 50 deletions(-) create mode 100644 .gnupg/common.conf create mode 100644 .gnupg/gpg-agent.conf create mode 100644 .gnupg/gpg.conf create mode 100644 .gnupg/sshcontrol create mode 100644 .ssh/config create mode 100644 .ssh/id_rsa_yubikey.pub create mode 100644 .stow-local-ignore create mode 100644 .wgetrc diff --git a/.config/fish/conf.d/rustup.fish b/.config/fish/conf.d/rustup.fish index 04c4063..053733c 100644 --- a/.config/fish/conf.d/rustup.fish +++ b/.config/fish/conf.d/rustup.fish @@ -5,7 +5,7 @@ switch (uname) #echo Hi Tux! set -x RUSTUP_HOME '/usr/local/share/rustup' case Darwin - echo Hi Hexley! + #echo Hi Hexley! source "$HOME/.cargo/env.fish" case '*' echo Hi, stranger! diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 81b5773..8c5cc26 100755 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -106,6 +106,12 @@ switch (uname) fish_add_path -a /opt/homebrew/bin fish_add_path -a /opt/homebrew/sbin + # Local PATH + fish_add_path -a $HOME/.local/bin + + # Mason PATH + fish_add_path -a $HOME/.local/share/nvim/mason/bin + # Java fish_add_path -a /opt/homebrew/Cellar/openjdk/23.0.1/bin diff --git a/.config/nvim/after/plugin/02_treesitter.lua b/.config/nvim/after/plugin/02_treesitter.lua index 20e9d37..3d02488 100755 --- a/.config/nvim/after/plugin/02_treesitter.lua +++ b/.config/nvim/after/plugin/02_treesitter.lua @@ -1,47 +1,56 @@ local configs = require("nvim-treesitter.configs") -configs.setup({ - -- A list of parser names, or "all" (the listed parsers MUST always be installed) - ensure_installed = { - "bash", - "c", - "lua", - "query", - "markdown", - "markdown_inline", - "rust", - "vim", - "vimdoc", - }, +configs.setup { + -- {{{1 A list of parser names, or "all" (the listed parsers MUST always be installed) + ensure_installed = { + "bash", + "c", + "lua", + "query", + "markdown", + "markdown_inline", + "rust", + "vim", + "vimdoc", + }, +-- }}} + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, + -- List of parsers to ignore installing (or "all") + ignore_install = { "javascript" }, - -- List of parsers to ignore installing (or "all") - ignore_install = { "javascript" }, + ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) + -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) - -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - highlight = { - enable = true, + highlight = { + enable = true, + -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to + -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is + -- the name of the parser) + -- list of language that will be disabled + -- disable = { "c", "rust" }, + -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files + disable = function(lang, buf) + local max_filesize = 100 * 1024 -- 100 KB + local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) + if ok and stats and stats.size > max_filesize then + return true + end + end, - -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to - -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is - -- the name of the parser) - -- list of language that will be disabled - disable = { - "tex", - }, + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -}) + incremental_selection = { enable = true }, + textobjects = { enable = true }, +} diff --git a/.config/nvim/after/plugin/04_lspconfig.lua b/.config/nvim/after/plugin/04_lspconfig.lua index 31ba2eb..7595e63 100644 --- a/.config/nvim/after/plugin/04_lspconfig.lua +++ b/.config/nvim/after/plugin/04_lspconfig.lua @@ -25,12 +25,14 @@ for word in io.open(path, "r"):lines() do end lspconfig.ltex.setup({ + filetypes = { "bib", "gitcommit", "markdown", "org", "norg", "plaintex", "rst", "rnoweb", "tex", "pandoc", "quarto", "rmd", "context", "html", "xhtml", "mail", "text" }, settings = { ltex = { language = "en-GB", dictionary = { ["en-GB"] = words, }, + enabled = { "bibtex", "gitcommit", "markdown", "org", "norg", "tex", "restructuredtext", "rsweave", "latex", "quarto", "rmd", "context", "html", "xhtml", "mail", "plaintext" }, }, }, }) diff --git a/.config/nvim/after/plugin/05_completion.lua b/.config/nvim/after/plugin/05_completion.lua index f27c85d..f9a7c76 100644 --- a/.config/nvim/after/plugin/05_completion.lua +++ b/.config/nvim/after/plugin/05_completion.lua @@ -38,6 +38,7 @@ cmp.setup({ -- { name = 'snippy' }, -- For snippy users. }, { { name = 'buffer' }, + { name = 'path' }, }) }) diff --git a/.config/nvim/lua/eddie/lazy.lua b/.config/nvim/lua/eddie/lazy.lua index 986e59d..f64b5e8 100755 --- a/.config/nvim/lua/eddie/lazy.lua +++ b/.config/nvim/lua/eddie/lazy.lua @@ -185,7 +185,23 @@ local plugins = { "nvim-neorg/neorg", lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default version = "*", -- Pin Neorg to the latest stable release - config = true, + config = function() + require("neorg").setup { + load = { + ["core.defaults"] = {}, + ["core.concealer"] = {}, + ["core.dirman"] = { + config = { + workspaces = { + phd = "~/Work/Organization/2025-1st-Quatrimester/", + regular = "~/Documents/Notes", + }, + default_workspace = "phd", + }, + }, + }, + } + end, }, -- Git signs { 'airblade/vim-gitgutter' }, diff --git a/.config/nvim/lua/eddie/options.lua b/.config/nvim/lua/eddie/options.lua index 6512e4e..c5b67fb 100755 --- a/.config/nvim/lua/eddie/options.lua +++ b/.config/nvim/lua/eddie/options.lua @@ -207,13 +207,19 @@ then -- vim.opt.termguicolors = true -- Folds - vim.opt.foldmethod = "expr" - vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()" - vim.opt.foldcolumn = "0" - vim.opt.foldtext = "" - vim.opt.foldlevel = 99 - vim.opt.foldlevelstart = 1 - vim.opt.foldnestmax = 4 + vim.opt.foldmethod = "marker" + --vim.opt.foldmethod = "expr" + --vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()" + --vim.opt.foldcolumn = "0" + --vim.opt.foldtext = "" + --vim.opt.foldlevel = 99 + --vim.opt.foldlevelstart = 1 + --vim.opt.foldnestmax = 4 + + -- Providers (Not necesary) + vim.g.loaded_ruby_provider = 0 + vim.g.loaded_perl_provider = 0 + vim.g.loaded_node_provider = 0 vim.opt.scrolloff = 8 vim.opt.signcolumn = "yes" diff --git a/.gitconfig b/.gitconfig index a06a16b..8d3a8f5 100644 --- a/.gitconfig +++ b/.gitconfig @@ -2,3 +2,5 @@ signingkey = 5B6FDEEF40B467D5 email = eduardo.cueto@adaptcentre.ie name = Eduardo Cueto-Mendoza +[commit] + gpgsign = true diff --git a/.gitignore b/.gitignore index a0e1004..e900ea4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ ._* -.stow-local-ignore -.gnupg/private-keys-v1.d/* -.gnupg/public-keys.d/* +.gnupg/S.* +.gnupg/trustdb.gpg +.gnupg/private-keys-v1.d/ +.gnupg/public-keys.d/ .gnupg/random_seed .gnupg/reader_0.status .ssh/known_hosts* +.ssh/authorized_keys diff --git a/.gnupg/common.conf b/.gnupg/common.conf new file mode 100644 index 0000000..5add401 --- /dev/null +++ b/.gnupg/common.conf @@ -0,0 +1 @@ +use-keyboxd diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf new file mode 100644 index 0000000..5ba1cb9 --- /dev/null +++ b/.gnupg/gpg-agent.conf @@ -0,0 +1,15 @@ +# https://github.com/drduh/config/blob/master/gpg-agent.conf +# https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html +#pinentry-program /usr/bin/pinentry-gnome3 +#pinentry-program /usr/bin/pinentry-tty +#pinentry-program /usr/bin/pinentry-x11 +#pinentry-program /usr/local/bin/pinentry-curses +#pinentry-program /usr/local/bin/pinentry-mac +#pinentry-program /opt/homebrew/bin/pinentry-mac +pinentry-program /opt/homebrew/bin/pinentry +#pinentry-program /usr/bin/pinentry-curses +enable-ssh-support +ttyname $GPG_TTY +default-cache-ttl 60 +max-cache-ttl 120 +allow-loopback-pinentry diff --git a/.gnupg/gpg.conf b/.gnupg/gpg.conf new file mode 100644 index 0000000..740fb39 --- /dev/null +++ b/.gnupg/gpg.conf @@ -0,0 +1,2 @@ +use-agent +pinentry-mode loopback diff --git a/.gnupg/sshcontrol b/.gnupg/sshcontrol new file mode 100644 index 0000000..c61ee5c --- /dev/null +++ b/.gnupg/sshcontrol @@ -0,0 +1,11 @@ +# List of allowed ssh keys. Only keys present in this file are used +# in the SSH protocol. The ssh-add tool may add new entries to this +# file to enable them; you may also add them manually. Comment +# lines, like this one, as well as empty lines are ignored. Lines do +# have a certain length limit but this is not serious limitation as +# the format of the entries is fixed and checked by gpg-agent. A +# non-comment line starts with optional white spaces, followed by the +# keygrip of the key given as 40 hex digits, optionally followed by a +# caching TTL in seconds, and another optional field for arbitrary +# flags. Prepend the keygrip with an '!' mark to disable it. + diff --git a/.ssh/config b/.ssh/config new file mode 100644 index 0000000..a6bc3d1 --- /dev/null +++ b/.ssh/config @@ -0,0 +1,41 @@ +#Host eduardo-cueto.com +# HostName eduardo-cueto.com +# User deb-ser-adm +# IdentityFile ~/.ssh/id_admin + + #Host bsd-talk.com +# IdentityFile ~/.ssh/id_server + + #Host github.com +# IdentityFile ~/.ssh/id_gittest + + #Host unix-talk.com +# IdentityFile ~/.ssh/id_nitro_1 +# Port 33 + + #Host fd98:f0b:88f:10::1 +# IdentityFile ~/.ssh/id_nitro_1 +# Port 22 + + #Host 2a02:8084:d6be:1298::1 +# IdentityFile ~/.ssh/id_openwrt +# Port 22 + + #Host unix-talk.com + #IdentityFile ~/.ssh/id_secure + + #Host bsd-talk.com + #IdentityFile ~/.ssh/id_local_server_2 + + #Host 216.238.68.117 +# IdentityFile ~/.ssh/id_admin + + Host unix-talk.com + IdentitiesOnly yes + IdentityFile ~/.ssh/id_rsa_yubikey.pub + Port 33 + + Host unix-talk.com + IdentitiesOnly yes + IdentityFile ~/.ssh/id_rsa_yubikey.pub + Port 22 diff --git a/.ssh/id_rsa_yubikey.pub b/.ssh/id_rsa_yubikey.pub new file mode 100644 index 0000000..47660a5 --- /dev/null +++ b/.ssh/id_rsa_yubikey.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCprFFmFGk8tPme6drgEjrC4ZZvhKEM524A82aX+2l+ikWN83++4RLQe5IoOqE8S4J2wBv5JLsds8IJDigwaVPYOaRNse3cRnBId+ESdDsYT4d5hikYv0/JORpooynCX4ortBq0Us++IB3bwyZiRk3uS7SprDmUioTHtup1CO1yEWR9SppZjOOU/YYoeVAuLzLPL4TC64zwrUKrxDq/Q30db30Jt5/4VXoeAfL62LA8sCckEtpyhro5QHagzKypXkkOlp7CUPK1eUmVt1v6SIXMmw7R1X52SvTauMavWgiV1kW7bJlE89PJ5hHoPnfHEHMhIQs5JMvXGkSCwVsaKRcOSg9lII9Py4sCy3ky9l/7Xi/WTfG5xORZ5C3ea9oJcDwP3I5fIJ6cyr7W3R2Q7KhaT4NoNHbuq0kY/EfeQKHkaqWqJPEogg/1SQm6/oPUmg2hPId99+E3H/EAGkwxE8ZkfsAXbPO5mmZlxHKzLtA6MyQ8XKNnVi9rCPyhSbuRhN+HE7QaTvFue5mKtJqgTJfRz3l2IuN6oYXTh5fMnhM7P8BeZulZf2dg7ypKb9nncdjOVCt3sxLBwz2cO2vOVswjaxR/H+tqP+kCpmKtqoYa8PeMCkSvl7kxvdS26vjjfF6pUInb+SXF799IPbYY4vPfLSH1gk7VRa8z/DqvhHPCDw== cardno:000F_63793DE6 diff --git a/.stow-local-ignore b/.stow-local-ignore new file mode 100644 index 0000000..8555d7c --- /dev/null +++ b/.stow-local-ignore @@ -0,0 +1,11 @@ +\.git +\.gitignore +\._* +\.gnupg/S.* +\.gnupg/trustdb.gpg +\.gnupg/private-keys-v1.d +\.gnupg/public-keys.d +\.gnupg/random_seed +\.gnupg/reader_0.status +\.ssh/known_hosts* +\.ssh/authorized_keys diff --git a/.wgetrc b/.wgetrc new file mode 100644 index 0000000..1d41fb5 --- /dev/null +++ b/.wgetrc @@ -0,0 +1 @@ +ca_certificate=/etc/ssl/cert.pem