diff --git a/common/themes/default.nix b/common/themes/default.nix index 6647618..699d329 100644 --- a/common/themes/default.nix +++ b/common/themes/default.nix @@ -1,8 +1,8 @@ { # Select your current theme here! imports = [ - # ./rose-pine-dawn.nix - ./ai.nix + ./rose-pine-dawn.nix + # ./ai.nix ]; # Requires me to manually turn targets on! diff --git a/dotfiles/neovim/.neoconf.json b/dotfiles/neovim/.neoconf.json index a0d5a68..172eae5 100644 --- a/dotfiles/neovim/.neoconf.json +++ b/dotfiles/neovim/.neoconf.json @@ -10,7 +10,9 @@ "library": { "enabled": true, "types": true, - "plugins": false, + "plugins": [ + "scrap" + ], "runtime": true } } diff --git a/dotfiles/neovim/README.md b/dotfiles/neovim/README.md index 818970d..20d17d0 100644 --- a/dotfiles/neovim/README.md +++ b/dotfiles/neovim/README.md @@ -8,121 +8,219 @@ ## Keybinds -Table of my own keybinds. Here as documentation for myself. I am yet to include any of the keybinds for cmp here. +I feel like macro recording is a rare thing, so I moved it to `yq/yQ`. This frees up `q` as a "namespace" of sorts for other default vim keybinds I want to move out. For example, I use `J` for diagnostics, so I moved the default action from `J` to `qj`. > Things written using italics are chords > (aka all the keys need to be pressed at the same time) -| Keybind | Description | Plugins | -| ------------ | ----------------------------------- | ------------------ | -| _vs_ | Create vertical split | | -| _cp_ | Use system clipboard | | -| _jl_ | Save | | -| _jk_ | Exit insert mode | | -| _rw_ | Rename word under cursor | | -| _\k_ | Insert digraph | | -| _\a_ | Swap last 2 used buffers | | -| C-n | Open tree | nvim-tree | -| _vc_ | Clear vimux window | vimux | -| _vl_ | Rerun last vimux command | vimux | -| _vp_ | Run command in another tmux pane | vimux | -| C-hjkl | Navigation between vim & tmux panes | vim-tmux-navigator | -| J | Show line diagnostics | lspconfig | -| K | Show hover info | lspconfig | -| L | Signature help (?) | lspconfig | -| gD | Go to declaration | lspconfig | -| gd | Go to definition | lspconfig | -| gi | Go to implementation | lspconfig | -| \rn | Rename | lspconfig | -| \f | format | lspconfig | -| \ca | code actions | lspconfig | +### Base + +| Keybind | Description | Plugins | +| ----------- | ------------------------------------------------ | ------- | +| \a | [A]lternate file | | +| \rw | [R]eplace [w]ord under cursor in the entire file | | +| Q | [Q]uit all buffers | | +| [d | Previous [d]iagnostic | | +| d] | Next [d]iagnostic | | +| J | Hover over diagnostic | | +| qJ | Merge with next line | | +| \D | [D]iagnostic loclist | | +| _jk_ | Exit insert mode | | +| _jo_ | Save file | | +| S-Enter | Newline without continuing comment | | + +### Textobjects + +| Keybinds | Description | Plugins | +| -------- | -------------------------- | ------- | +| aq | [A]round [q]uotes | | +| iq | [I]nside [q]uotes | | +| aa | [A]round [a]phostrophes | | +| ia | [I]nside [a]phostrophes | | +| ar | [A]round squa[r]e brackets | | +| ir | [I]nside squa[r]e brackets | | + +### Treesitter + +| Keybinds | Description | +| -------- | ------------------------------- | +| ]f | Go to next [f]unction start | +| ]F | Go to next [f]unction end | +| [f | Go to previous [f]unction start | +| [F | Go to previous [f]unction end | +| ]c | Go to next [c]lass start | +| ]C | Go to next [c]lass end | +| [c | Go to previous [c]lass start | +| [C | Go to previous [c]lass end | + +#### Textobjects + +| Keybinds | Description | +| -------- | ------------------- | +| af | [A]round [f]unction | +| if | [I]nside [f]unction | +| ac | [A]round [c]lass | +| ic | [I]nside [c]lass | ### Telescope -| Keybind | Description | Plugins | -| ----------- | ------------------------------ | ---------------------- | -| Ctrl-P | Find files | | -| Ctrl-F | Grep in project | | -| \d | Diagnostics | lspconfig | -| \ca | Code actions | lspconfig | -| \t | Show builtin pickers | | -| \s | Show symbols using tree-sitter | | -| \gj | List git commits | | -| \gk | List git branches | | -| _jp_ | Interactive file broswer | telescope-file-browser | -| _ui_ | Insert unicode char | | +The `f` workspace contains keybinds which search for a specific filetype. -### Idris +| Keybind | Description | Plugins | +| ----------- | ------------------------ | ---------------------- | +| C-p | Find files | | +| C-f | Grep in project | | +| C-F | Interactive file broswer | telescope-file-browser | +| \d | Diagnostics | lspconfig | +| \t | Show builtin pickers | | +| \ft | Typescript Files | | +| \fl | Latex Files | | +| \fp | Purescript Files | | -> The idris and arpeggio plugins are implicit here +### Cmp -| Keybind | Description | -| ------- | ------------------- | -| _isc_ | Case split | -| _imc_ | Make case | -| _iml_ | Make lemma | -| _ies_ | Expression search | -| _igd_ | Generate definition | -| _irh_ | Refine hole | -| _iac_ | Add clause | +| Keybind | Description | +| ------- | ------------------------ | +| C-d | Scroll completion up | +| C-s | Scroll completion down | +| Enter | Accept current competion | -### Purescript +### Lsp -| Keybind | Description | -| ------- | ------------------------------------------- | -| _vb_ | Make tmux run spago build in sepearate pane | -| _vt_ | Make tmux run spago test in separate pane | +The lsp configuration introduces the namespace `w` used for workspace manipulation. -### Nix +| Keybind | Description | +| ----------- | --------------------------- | +| gd | [G]o to [d]efinition | +| gr | [G]o to [r]eferences | +| gi | [G]o to [i]mplementation | +| K | Hover | +| L | Signature help | +| \c | [C]ode actions | +| \F | [F]ormat file | +| \li | [l]sp [i]nfo | +| \rn | [R]e[n]ame | +| \wa | [W]orkspace [a]dd folder | +| \wr | [W]orkspace [r]emove folder | +| \wl | [W]orkspace [l]ist folders | -| Keybind | Description | -| ------- | ------------------------------------ | -| _ug_ | Run nix-fetchgit on the current file | +### Vimux -### Lean +Vimux keybinds live in the `v` namespace. Most vimux keybinds are filetype specific. -- Extra brackets: ⟨⟩ +| Keybind | Description | +| ----------- | -------------------------- | +| \vc | [V]imux clear | +| \vl | [V]imux rerun last | +| \vp | [V]imux prompt for command | -## Some cool vim keybinds I sometimes forget about +### Luasnip -Documentation for myself +| Keybind | Description | +| ----------- | ---------------------------- | +| Tab | Jump to next placeholder | +| S-Tab | Jump to previous placeholder | +| \rs | [R]eload [s]nippets | -| Keybind | Description | Plugins | -| ------- | ----------------------- | ------- | -| zz | Center the current line | | +### Filetypes -## Important plugins I use the default mappins of +General filetype local keybinds reside inside the `l` namespace. -- paperplanes +#### Purescript -| Keybind | Description | -| ------- | ------------------------- | -| :PP | Create pastebin-like link | +| Keybind | Description | +| ----------- | ------------------------- | +| \vb | [V]imux run spago [b]uild | +| \vt | [V]imux run spago [t]est | -- nvim-comment +#### Nix -| Keybind | Description | -| ------- | ----------------- | -| gcc | Comment line | -| gc | Comment selection | +| Keybind | Description | +| ----------- | ------------------------ | +| \lg | Update [g]it fetch calls | -- neogit +#### Idris -| Keybind | Description | -| ------- | ----------- | -| C-g | Open neogit | +Idris keybinds live in the `I` namespace. -- gitlinker +| Keybind | Description | +| ----------- | ------------------- | +| \IC | Make [c]ase | +| \IL | Make [l]emma | +| \Ic | Add [c]lause | +| \Ie | [E]xpression search | +| \Id | Generate [d]ef | +| \Is | [S]plit case | +| \Ih | Refine [h]ole | -| Keybind | Description | -| ---------- | ------------------ | -| gy | Create remote link | +#### Lua -- nvim-surround +| Keybind | Description | +| ----------- | --------------------------------- | +| \lf | Run [f]ile | +| \ls | Import [f]ile and call .[s]etup() | -| Keybind | Description | Mode | -| -------- | ----------------------------------- | ---- | -| cs[a][b] | Change surrounding pair from a to b | n | -| ds[a] | Delete surrounding pair of a | n | -| ys[m][a] | Surround the motion m with a | n | -| S[a] | Surround selected code with a | v | +### Hydra + +| Keybind | Description | +| ---------- | ------------------- | +| C-w | Enter [w]indow mode | +| \v | Enter [v]enn mode | + +#### Window mode + +| Keybind | Description | +| --------- | ---------------------------------------- | +| h/j/k/l | Move cursor by window in given direction | +| H/J/K/L | Move window in given direction | +| C-h/j/k/l | Resize window in given direction | +| = | Equalize | +| s | Split horizontally | +| v | Split vertically | +| o | Close all other | +| q | Close window | +| w/Esc | Exit window mode | + +#### Venn mode + +| Keybind | Description | +| ------- | --------------------------------- | +| H/J/K/L | Continue arrow in given direction | +| f | Surround selected region with box | + +### Firenvim + +The following keybinds are available only when running inside firenvim: + +| Keybind | Description | +| ------- | ------------- | +| C-z | Expand window | + +### Small plugin keybinds + +| Keybind | Description | Plugins | +| ----------- | ----------------------------------- | -------------------- | +| gcc | Comment line | nvim-comment | +| gc | Comment selection | nvim-comment | +| C-g | Open neo[g]it | neogit | +| \yg | [Y]ank remote [g]it url | gitlinker | +| cs[a][b] | Change surrounding pair from a to b | vim-surround | +| ds[a] | Delete surrounding pair of a | vim-surround | +| ys[m][a] | Surround the motion m with a | vim-surround | +| S[a] | Surround selected code with a | vim-surround | +| s | Initialize forward [s]earch | leap | +| S | Initialize backwards [s]earch | leap | +| gs | Initialize other window [s]earch | leap | +| C-n | Open filetree | nvim-tree | +| \p | [P]aste imge from clipboard | clipboard-image.nvim | +| C-h/j/k/l | Navigate panes | vim-tmux-navigator | + +### Undocumented + +#### Iron.nvim + +Iron.nvim commands rest in the `i` namespace. There is a lot of them, and I rarely use this plugin, so I won't document them here just yet. + +#### Magma + +Magma commands live under the namespace `M`. I barely use this plugin, so I won't document my keybinds just yet. diff --git a/dotfiles/neovim/ftplugin/purescript.lua b/dotfiles/neovim/ftplugin/purescript.lua index 62dcb94..5d9cba8 100644 --- a/dotfiles/neovim/ftplugin/purescript.lua +++ b/dotfiles/neovim/ftplugin/purescript.lua @@ -15,3 +15,5 @@ vim.keymap.set( ) vim.opt.expandtab = true -- Use spaces for the tab char + +require("my.abbreviations.fp") diff --git a/dotfiles/neovim/ftplugin/tex.lua b/dotfiles/neovim/ftplugin/tex.lua index 4f49cfa..f7380b4 100644 --- a/dotfiles/neovim/ftplugin/tex.lua +++ b/dotfiles/neovim/ftplugin/tex.lua @@ -93,12 +93,8 @@ local abbreviations = { { "rref", "reduced row echalon form" }, } ----@type ExpansionOptions -local no_capitalization = { capitalized = false } - -- Todo: convert exponents and subscripts -- to use this more concise notation. ----@type ExpansionInput[] local abolishAbbreviations = { -- General phrases { "thrf", "therefore" }, @@ -153,7 +149,7 @@ local abolishAbbreviations = { { "gt{{e,E,v,V,L},k,a,w,d,md{,e},c{,e}{,l}}{,s,h,x,y}{,a,1,2}", "{{},\\kappa,\\alpha,\\omega,\\Delta,\\delta{,'},\\chi{,'}{,_l}}({G,S,H,X,Y}{,',_1,_2})", - options = no_capitalization, + options = A.no_capitalization, }, -- My own operator syntax: @@ -164,7 +160,7 @@ local abolishAbbreviations = { { "{cr,a,}{eq,neq,leq,geq,lt,gt}", "{\\\\\\&,&,}{=,\\neq,\\leq,\\geq,<,>}", - options = no_capitalization, + options = A.no_capitalization, }, -- Exponents and subscripts: @@ -179,7 +175,7 @@ local abolishAbbreviations = { { "{e,s}{{0,1,2,3,4,5,6,7,8,9,n,i,t,k},t{i,m,p}}", "{^,_}{{},{\\{-1\\},-,+}}", - options = no_capitalization, + options = A.no_capitalization, }, -- Set symbols @@ -194,7 +190,7 @@ local abolishAbbreviations = { { "{nats,ints,rats,irats,rrea,comp,ppri,ffie}", "\\mathbb\\{{N,Z,Q,I,R,C,P,F}\\}", - options = no_capitalization, + options = A.no_capitalization, }, -- Function calls: diff --git a/dotfiles/neovim/lua/my/abbreviations/fp.lua b/dotfiles/neovim/lua/my/abbreviations/fp.lua new file mode 100644 index 0000000..e70b18f --- /dev/null +++ b/dotfiles/neovim/lua/my/abbreviations/fp.lua @@ -0,0 +1,31 @@ +local A = require("my.abbreviations") +local scrap = require("scrap") +local M = {} + +M.symols = { + { "mto", ">>=" }, -- [M]onadic [t]o + { "oalt", "<\\|>" }, -- [O]peration [A]lternative + { "omono", "<>" }, -- [O]peration [M]onoid +} + +M.types = { + { "tarr", "Array" }, + { "tlis", "List" }, + { "tmay", "Maybe" }, + { "teff", "Effect" }, + { "taff", "Aff" }, + { "tnea", "NonEmptyArray" }, +} + +M.functions = { + { "tfold", "toUnfoldable" }, -- [T]o [f]oldable + { "ffold", "fromFoldable" }, -- [F]rom un[f]oldable +} + +function M.setup() + A.manyGlobalAbbr(scrap.expand_many(M.types, A.no_capitalization)) + A.manyGlobalAbbr(scrap.expand_many(M.symols, A.no_capitalization)) + A.manyGlobalAbbr(scrap.expand_many(M.functions, A.no_capitalization)) +end + +return M diff --git a/dotfiles/neovim/lua/my/abbreviations/global.lua b/dotfiles/neovim/lua/my/abbreviations/global.lua index 2405591..bcd3c0c 100644 --- a/dotfiles/neovim/lua/my/abbreviations/global.lua +++ b/dotfiles/neovim/lua/my/abbreviations/global.lua @@ -6,7 +6,7 @@ M.symols = { -- Unicode: { "iin", "∈" }, -- [I]ncluded [i][n] { "mfrl", "∀" }, -- [M]ath [f]o[r]al[l] - { "eps", "ε" }, -- Epsilon + { "eps", "ε" }, -- [E]psilon -- Ascii stuff: { "tto", "->" }, -- [t]o @@ -16,7 +16,7 @@ M.symols = { { "leq", "<=" }, -- [l]ess than or [e][q]ual { "geq", ">=" }, -- [g]reater than or [e][q]ual - { "eq", "=" }, -- [e][q]ual + { "seq", "=" }, -- [s]ingle [e][q]ual { "deq", "==" }, -- [d]ouble [e][q]ual { "land", "/\\" }, -- [l]ogial [a][n][d] { "lor", "\\/" }, -- [l]ogial [o][r] diff --git a/dotfiles/neovim/lua/my/abbreviations/init.lua b/dotfiles/neovim/lua/my/abbreviations/init.lua index 5e5e2ae..6a9e4ec 100644 --- a/dotfiles/neovim/lua/my/abbreviations/init.lua +++ b/dotfiles/neovim/lua/my/abbreviations/init.lua @@ -1,5 +1,7 @@ local M = {} +M.no_capitalization = { capitalized = false } + function M.localAbbr(lhs, rhs) -- Create abbreviation vim.cmd(":iabbrev " .. lhs .. " " .. rhs) diff --git a/dotfiles/neovim/lua/my/keymaps.lua b/dotfiles/neovim/lua/my/keymaps.lua index 10cb79d..0da9c20 100644 --- a/dotfiles/neovim/lua/my/keymaps.lua +++ b/dotfiles/neovim/lua/my/keymaps.lua @@ -48,18 +48,7 @@ function M.setup() -- {{{ Easier access to M.move("", "a", { desc = "[A]lternate file" }) -- }}} - -- {{{ Quit current buffer / all buffers - vim.keymap.set({ "n", "v" }, "q", function() - local buf = vim.api.nvim_win_get_buf(0) - - -- Only save if file is writable - if vim.bo[buf].modifiable and not vim.bo[buf].readonly then - vim.cmd([[write]]) - end - - vim.cmd("q") - end, { desc = "[Q]uit current buffer" }) - + -- {{{ Quit all buffers M.nmap("Q", ":wqa", "Save all files and [q]uit") -- }}} -- {{{ Replace word in file @@ -73,6 +62,7 @@ function M.setup() -- {{{Diagnostic keymaps M.nmap("[d", vim.diagnostic.goto_prev, "Goto previous [d]iagnostic") M.nmap("]d", vim.diagnostic.goto_next, "Goto next [d]iagnostic") + M.move("J", "qj") M.nmap("J", vim.diagnostic.open_float, "Open current diagnostic") M.nmap("D", vim.diagnostic.setloclist, "[D]iagnostic loclist") -- }}} @@ -83,6 +73,12 @@ function M.setup() vim.keymap.set({ "n", "v" }, "", '"+', { desc = "Use global clipboard" }) -- Use global clipboard with *cp* M.nmap("", ":silent write", "Save current file") -- Save using *ji* -- }}} + -- {{{ Shift-Enter for not continuing the current comment + -- This does not preserve intendation. Not sure what a better solution would look like. + vim.keymap.set("i", "", function() + vim.paste({ "", "" }, -1) + end, { desc = "Insert newline without continuing the current comment" }) + -- }}} -- {{{ Allow quiting basic buffers with "q" vim.api.nvim_create_autocmd("FileType", { pattern = { "help" }, @@ -97,12 +93,6 @@ function M.setup() end, }) -- }}} - -- {{{ Shift-Enter for not continuing the current comment - -- This does not preserve intendation. Not sure what a better solution would look like. - vim.keymap.set("i", "", function() - vim.paste({ "", "" }, -1) - end, { desc = "Insert newline without continuing the current comment" }) - -- }}} return M end diff --git a/dotfiles/neovim/lua/my/options.lua b/dotfiles/neovim/lua/my/options.lua index e4915d1..82c9c77 100644 --- a/dotfiles/neovim/lua/my/options.lua +++ b/dotfiles/neovim/lua/my/options.lua @@ -14,18 +14,17 @@ function M.setup() vim.opt.number = true -- Show line numbers vim.opt.relativenumber = true -- Relative line numbers - -- TODO: only do this for specific filestypes vim.opt.expandtab = true -- Use spaces for the tab char - - vim.opt.scrolloff = 4 -- Lines of context - vim.opt.shiftround = true -- Round indent vim.opt.shiftwidth = 2 -- Size of an indent + vim.opt.shiftround = true -- When using < or >, rounds to closest multiple of shiftwidth + vim.opt.smartindent = true -- Insert indents automatically + + vim.opt.scrolloff = 4 -- Starts scrolling 4 lines from the edge of the screen vim.opt.termguicolors = true -- True color support vim.opt.ignorecase = true -- Ignore case vim.opt.smartcase = true -- Do not ignore case with capitals - vim.opt.smartindent = true -- Insert indents automatically vim.opt.splitbelow = true -- Put new windows below current vim.opt.splitright = true -- Put new windows right of current diff --git a/dotfiles/neovim/lua/my/plugins/hydra.lua b/dotfiles/neovim/lua/my/plugins/hydra.lua index 151df7d..adae89d 100644 --- a/dotfiles/neovim/lua/my/plugins/hydra.lua +++ b/dotfiles/neovim/lua/my/plugins/hydra.lua @@ -6,6 +6,7 @@ local M = { "mrjones2014/smart-splits.nvim", -- the name says it all }, keys = { "", "v" }, + event = "VeryLazy", } local venn_hint = [[ diff --git a/dotfiles/neovim/lua/my/plugins/idris.lua b/dotfiles/neovim/lua/my/plugins/idris.lua index ad566e6..ba490dc 100644 --- a/dotfiles/neovim/lua/my/plugins/idris.lua +++ b/dotfiles/neovim/lua/my/plugins/idris.lua @@ -22,10 +22,10 @@ function M.config() end, { desc = desc, bufnr = true }) end - nmap("C", "make_case", "Make [c]plit") + nmap("C", "make_case", "Make [c]ase") nmap("L", "make_lemma", "Make [l]emma") nmap("c", "add_clause", "Add [c]lause") - nmap("s", "expr_search", "Expression [s]earch") + nmap("e", "expr_search", "[E]xpression search") nmap("d", "generate_def", "Generate [d]efinition") nmap("s", "case_split", "Case [s]plit") nmap("h", "refine_hole", "Refine [h]ole") diff --git a/dotfiles/neovim/lua/my/plugins/init.lua b/dotfiles/neovim/lua/my/plugins/init.lua index 5e6e27d..f535d81 100644 --- a/dotfiles/neovim/lua/my/plugins/init.lua +++ b/dotfiles/neovim/lua/my/plugins/init.lua @@ -119,14 +119,6 @@ return { event = "VeryLazy", }, - { - -- show context on closing parenthesis - -- TODO: move this to treesitter file - "haringsrob/nvim_context_vt", - event = "BufReadPost", - cond = env.vscode.not_active(), - }, - { -- show progress for lsp stuff "j-hui/fidget.nvim", diff --git a/dotfiles/neovim/lua/my/plugins/lspconfig.lua b/dotfiles/neovim/lua/my/plugins/lspconfig.lua index 4ba6886..e65b5b3 100644 --- a/dotfiles/neovim/lua/my/plugins/lspconfig.lua +++ b/dotfiles/neovim/lua/my/plugins/lspconfig.lua @@ -53,7 +53,7 @@ function M.on_attach(client, bufnr) vim.keymap.set("n", from, to, opts(desc)) end -- }}} - -- {{{ Go to declaration / definition / implementation + -- {{{ Go to declaration / references / implementation nmap("gd", vim.lsp.buf.definition, "[G]o to [d]efinition") nmap("gi", vim.lsp.buf.implementation, "[G]o to [i]mplementation") nmap("gr", vim.lsp.buf.references, "[G]o to [r]eferences") diff --git a/dotfiles/neovim/lua/my/plugins/treesitter.lua b/dotfiles/neovim/lua/my/plugins/treesitter.lua index 5215980..88e1d11 100644 --- a/dotfiles/neovim/lua/my/plugins/treesitter.lua +++ b/dotfiles/neovim/lua/my/plugins/treesitter.lua @@ -1,105 +1,95 @@ +local env = require("my.helpers.env") + local M = { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - event = "BufReadPost", - dependencies = { - "nvim-treesitter/nvim-treesitter-textobjects", + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + event = "BufReadPost", + dependencies = { + "nvim-treesitter/nvim-treesitter-textobjects", + }, + config = function() + require("nvim-treesitter.configs").setup({ + --{{{Languages + ensure_installed = { + "bash", + "javascript", + "typescript", + "c", + "cpp", + "css", + "dockerfile", + "elixir", + "fish", + "html", + "json", + "jsonc", + "latex", + "python", + "rust", + "scss", + "toml", + "tsx", + "vim", + "yaml", + "nix", + }, + sync_install = false, + --}}} + --{{{ Highlighting + highlight = { + enable = true, + disable = { "kotlin" }, + additional_vim_regex_highlighting = false, + }, + --}}} + textobjects = { + --{{{ Select + select = { + enable = true, + lookahead = true, + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + }, + --}}} + --{{{ Move + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + goto_next_start = { + ["]f"] = "@function.outer", + ["]c"] = "@class.outer", + }, + goto_next_end = { + ["]F"] = "@function.outer", + ["]C"] = "@class.outer", + }, + goto_previous_start = { + ["[f"] = "@function.outer", + ["[c"] = "@class.outer", + }, + goto_previous_end = { + ["[F"] = "@function.outer", + ["[C"] = "@class.outer", + }, + }, + --}}} + }, + indent = { enable = true }, + }) + end, + }, + { + -- show context on closing parenthesis + "haringsrob/nvim_context_vt", + event = "BufReadPost", + cond = env.vscode.not_active(), }, - config = function() - require("nvim-treesitter.configs").setup({ - --{{{Languages - ensure_installed = { - "bash", - "javascript", - "typescript", - "c", - "cpp", - "css", - "dockerfile", - "elixir", - "fish", - "html", - "json", - "jsonc", - "latex", - "python", - "rust", - "scss", - "toml", - "tsx", - "vim", - "yaml", - "nix", - }, - sync_install = false, - --}}} - --{{{ Highlighting - highlight = { - enable = true, - disable = { "kotlin" }, - additional_vim_regex_highlighting = false, - }, - --}}} - --{{{ Incremental selection - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = "", - node_decremental = "", - }, - }, - --}}} - --{{{ Textsubjects - textsubjects = { - enable = true, - keymaps = { - ["."] = "textsubjects-smart", - [";"] = "textsubjects-container-outer", - }, - }, - --}}} - textobjects = { - --{{{ Select - select = { - enable = true, - lookahead = true, - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - }, - }, - --}}} - --{{{ Move - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - ["]f"] = "@function.outer", - ["]c"] = "@class.outer", - }, - goto_next_end = { - ["]F"] = "@function.outer", - ["]C"] = "@class.outer", - }, - goto_previous_start = { - ["[f"] = "@function.outer", - ["[c"] = "@class.outer", - }, - goto_previous_end = { - ["[F"] = "@function.outer", - ["[C"] = "@class.outer", - }, - }, - --}}} - }, - indent = { enable = true }, - }) - end, } return M diff --git a/home/adrielus/features/desktop/common/firefox.nix b/home/adrielus/features/desktop/common/firefox.nix index 5a47b4e..87aaafd 100644 --- a/home/adrielus/features/desktop/common/firefox.nix +++ b/home/adrielus/features/desktop/common/firefox.nix @@ -40,21 +40,31 @@ in search.default = "Google"; extensions = with inputs.firefox-addons.packages.${pkgs.system}; [ + buster-captcha-solver bypass-paywalls-clean clearurls # removes ugly args from urls + don-t-fuck-with-paste # disallows certain websites from disabling pasting firenvim # summon a nvim instance inside the browser gesturefy # mouse gestures + i-dont-care-about-cookies localcdn # caches libraries locally lovely-forks # displays forks on github octolinker # github import to link thingy octotree # github file tree privacy-badger # blocks some trackers privacy-pass # captcha stuff + refined-github # a bunch of github modifications return-youtube-dislikes - ublock-origin # ad blocker - vimium-c # vim keybinds + steam-database # adds info from steamdb on storepages sponsorblock # skip youtube sponsors + skip-redirect # attempts to skip to the final reddirect for certain urls + terms-of-service-didnt-read translate-web-pages + ublock-origin + unpaywall + user-agent-string-switcher + vimium-c # vim keybinds + youtube-shorts-block ]; # Specify custom search engines diff --git a/home/adrielus/tethys.nix b/home/adrielus/tethys.nix index df60557..3952039 100644 --- a/home/adrielus/tethys.nix +++ b/home/adrielus/tethys.nix @@ -18,6 +18,7 @@ gimp # Image editing libreoffice # Free office suite lmms # Music software + kicad # PCB editing # obs-studio # video recorder # Clis