diff --git a/config/nvim/.editorconfig b/config/nvim/.editorconfig index 13c20c5..6b3fcae 100644 --- a/config/nvim/.editorconfig +++ b/config/nvim/.editorconfig @@ -9,3 +9,9 @@ insert_final_newline = true charset = utf-8 indent_style = space indent_size = 2 +max_line_length = 100 +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/config/nvim/.luarc.json b/config/nvim/.luarc.json deleted file mode 100644 index 1e1765c..0000000 --- a/config/nvim/.luarc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "diagnostics.globals": [ - "vim" - ] -} \ No newline at end of file diff --git a/config/nvim/.neoconf.json b/config/nvim/.neoconf.json index aea72e4..ba9cf17 100644 --- a/config/nvim/.neoconf.json +++ b/config/nvim/.neoconf.json @@ -5,7 +5,7 @@ "plugins": [ "nvim-lspconfig", "lsp", - "completion", + "completion" ] } }, @@ -13,12 +13,12 @@ "plugins": { "lua_ls": { "enabled": true - }, + } } }, "lspconfig": { "lua_ls": { - "Lua.completion.callSnippet": "Replace", - }, + "Lua.completion.callSnippet": "Replace" + } } } diff --git a/config/nvim/init.lua b/config/nvim/init.lua index fab758f..1067693 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -1,6 +1,8 @@ --- vim: ts=2 sts=2 sw=2 et +-- ╭─────────────────────────────────────────────────────────╮ +-- │ ivuorinen's Neovim configuration │ +-- ╰─────────────────────────────────────────────────────────╯ --- Install lazylazy +-- ── Install lazylazy ──────────────────────────────────────────────── -- https://github.com/folke/lazy.nvim local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' if not (vim.uv or vim.loop).fs_stat(lazypath) then @@ -18,29 +20,32 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) --- Add ~/.local/bin to the PATH +-- ── Add ~/.local/bin to the PATH ──────────────────────────────────── vim.fn.setenv('PATH', vim.fn.expand '$HOME/.local/bin' .. ':' .. vim.fn.expand '$PATH') require 'options' +require 'autogroups' -require('lazy').setup('plugins', { - checker = { - -- Automatically check for updates - enabled = true, - nofity = false, - }, - change_detection = { - notify = false, - }, -}) +-- ── Load plugins ──────────────────────────────────────────────────── +require('lazy').setup( + -- Automatically load plugins from lua/plugins + 'plugins', + -- Lazy Configuration + { + checker = { + -- Automatically check for updates + enabled = true, + -- We don't want to be notified about updates + nofity = false, + }, + change_detection = { + -- No need to notify about changes + notify = false, + }, + install = { + colorscheme = { vim.g.colors_theme }, + }, + } +) --- [[ Highlight on yank ]] --- See `:help vim.highlight.on_yank()` -local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) -vim.api.nvim_create_autocmd('TextYankPost', { - callback = function() - vim.highlight.on_yank() - end, - group = highlight_group, - pattern = '*', -}) +-- vim: ts=2 sts=2 sw=2 et diff --git a/config/nvim/lua/autogroups.lua b/config/nvim/lua/autogroups.lua new file mode 100644 index 0000000..dd30e95 --- /dev/null +++ b/config/nvim/lua/autogroups.lua @@ -0,0 +1,34 @@ +-- ╭─────────────────────────────────────────────────────────╮ +-- │ Autogroups │ +-- ╰─────────────────────────────────────────────────────────╯ + +local augroup = vim.api.nvim_create_augroup -- Create/get autocommand group +local autocmd = vim.api.nvim_create_autocmd -- Create autocommand + +-- ── Highlight on yank ─────────────────────────────────────────────── +-- See `:help vim.highlight.on_yank()` +local highlight_group = augroup('YankHighlight', { clear = true }) +autocmd('TextYankPost', { + callback = function() + vim.highlight.on_yank() + end, + group = highlight_group, + pattern = '*', +}) + +-- ── Windows to close with "q" ─────────────────────────────────────── +autocmd('FileType', { + callback = function() + vim.keymap.set('n', '', ':bd', { buffer = true, silent = true }) + end, + pattern = { + 'help', + 'startuptime', + 'qf', + 'lspinfo', + 'man', + 'checkhealth', + }, +}) + +-- vim: ts=2 sts=2 sw=2 et diff --git a/config/nvim/lua/options.lua b/config/nvim/lua/options.lua index 796fc17..fd695cc 100644 --- a/config/nvim/lua/options.lua +++ b/config/nvim/lua/options.lua @@ -1,16 +1,21 @@ +-- ╭─────────────────────────────────────────────────────────╮ +-- │ neovim configuration options │ +-- ╰─────────────────────────────────────────────────────────╯ +-- See `:help vim.opt` +-- For more options, you can see `:help option-list` + vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' --- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = true +-- Set the colorscheme and variants +vim.g.colors_theme = 'tokyonight' +vim.g.colors_variant_light = 'tokyonight-day' +vim.g.colors_variant_dark = 'tokyonight-storm' -- Make sure editorconfig support is enabled vim.g.editorconfig = true --- [[ Setting options ]] --- See `:help vim.opt` --- For more options, you can see `:help option-list` - +-- Enable line numbers and relative line numbers vim.opt.number = true vim.opt.relativenumber = true @@ -22,7 +27,6 @@ vim.opt.showmode = false -- Sync clipboard between OS and Neovim. -- Schedule the setting after `UiEnter` because it can increase startup-time. --- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` vim.schedule(function() vim.opt.clipboard = 'unnamedplus' @@ -34,7 +38,8 @@ vim.opt.smartindent = true -- Insert indents automatically -- Save undo history vim.opt.undofile = true --- Case-insensitive searching UNLESS \C or one or more capital letters in the search term +-- Case-insensitive searching UNLESS \C or one or +-- more capital letters in the search term vim.opt.ignorecase = true vim.opt.smartcase = true @@ -47,7 +52,7 @@ vim.wo.signcolumn = 'yes' -- Decrease mapped sequence wait time -- Displays which-key popup sooner -vim.opt.timeoutlen = 300 +vim.opt.timeoutlen = 250 -- Configure how new splits should be opened vim.opt.splitright = true @@ -66,7 +71,7 @@ vim.opt.inccommand = 'split' vim.opt.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. -vim.opt.scrolloff = 10 +vim.opt.scrolloff = 15 -- Enable break indent vim.o.breakindent = true @@ -76,6 +81,7 @@ vim.o.undofile = true -- Set completeopt to have a better completion experience vim.o.completeopt = 'menuone,noselect' + -- Fixes Notify opacity issues vim.o.termguicolors = true @@ -83,9 +89,18 @@ vim.o.termguicolors = true vim.o.spell = true vim.o.spelllang = 'en_us' +-- Tree-sitter settings vim.g.loaded_perl_provider = 0 +vim.g.loaded_ruby_provider = 0 + +-- anuvyklack/windows.nvim settings +vim.o.winwidth = 15 +vim.o.winminwidth = 10 +vim.o.equalalways = false -- ── Deal with word wrap ─────────────────────────────────────────────────────── local m = vim.api.nvim_set_keymap m('n', 'k', "v:count == 0 ? 'gk' : 'k'", { desc = 'Move up', noremap = true, expr = true }) m('n', 'j', "v:count == 0 ? 'gj' : 'j'", { desc = 'Move down', noremap = true, expr = true }) + +-- vim: ts=2 sts=2 sw=2 et diff --git a/config/nvim/lua/plugins/cmp.lua b/config/nvim/lua/plugins/cmp.lua index b78aa77..874ccf1 100644 --- a/config/nvim/lua/plugins/cmp.lua +++ b/config/nvim/lua/plugins/cmp.lua @@ -1,22 +1,39 @@ return { - -- Autocompletion + -- Auto completion -- https://github.com/hrsh7th/nvim-cmp { 'hrsh7th/nvim-cmp', + lazy = false, event = 'InsertEnter', dependencies = { 'hrsh7th/cmp-nvim-lsp', - 'L3MON4D3/LuaSnip', - 'saadparwaiz1/cmp_luasnip', - -- Adds other completion capabilities. - -- nvim-cmp does not ship with all sources by default. They are split - -- into multiple repos for maintenance purposes. - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-path', - 'onsails/lspkind.nvim', + -- ── LuaSnip Dependencies ──────────────────────────────────────────── + -- Snippet Engine for Neovim written in Lua. + -- https://github.com/L3MON4D3/LuaSnip + { 'L3MON4D3/LuaSnip', build = 'make install_jsregexp' }, + -- luasnip completion source for nvim-cmp + -- https://github.com/saadparwaiz1/cmp_luasnip + { 'saadparwaiz1/cmp_luasnip' }, + -- ── Adds other completion capabilities. ───────────────────────────── + -- ── nvim-cmp does not ship with all sources by default. + -- ── They are split into multiple repos for maintenance purposes. + { 'hrsh7th/cmp-nvim-lsp' }, + { 'hrsh7th/cmp-buffer' }, + { 'hrsh7th/cmp-path' }, + -- https://github.com/SergioRibera/cmp-dotenv + { 'SergioRibera/cmp-dotenv' }, + -- ── Other deps ────────────────────────────────────────────────────── + -- vscode-like pictograms for neovim lsp completion items + -- https://github.com/onsails/lspkind.nvim + { 'onsails/lspkind.nvim' }, + -- Lua plugin to turn github copilot into a cmp source + -- https://github.com/zbirenbaum/copilot-cmp { 'zbirenbaum/copilot-cmp', dependencies = { + -- Fully featured & enhanced replacement for copilot.vim complete + -- with API for interacting with Github Copilot + -- https://github.com/zbirenbaum/copilot.lua { 'zbirenbaum/copilot.lua', cmd = 'Copilot', @@ -43,20 +60,37 @@ return { local luasnip = require 'luasnip' local lspkind = require 'lspkind' luasnip.config.setup {} + require('copilot_cmp').setup() + + local has_words_before = function() + if vim.api.nvim_buf_get_option(0, 'buftype') == 'prompt' then + return false + end + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_text(0, line - 1, 0, line - 1, col, {})[1]:match '^%s*$' == nil + end cmp.setup { formatting = { format = lspkind.cmp_format { mode = 'symbol', - min_width = 40, - max_width = 100, + max_width = function() + return math.floor(0.45 * vim.o.columns) + end, + show_labelDetails = true, symbol_map = { Copilot = '', }, }, }, view = { - entries = 'native', + width = function(_, _) + return math.min(80, vim.o.columns) + end, + entries = { + name = 'custom', + selection_order = 'near_cursor', + }, }, snippet = { expand = function(args) @@ -69,14 +103,14 @@ return { -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display -- completions whenever it has completion options available. - [''] = cmp.mapping.complete(), + [''] = cmp.mapping.complete(), [''] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = true, }, [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() + if cmp.visible() and has_words_before() then + cmp.select_next_item { behavior = cmp.SelectBehavior.Select } elseif luasnip.expand_or_jumpable() then luasnip.expand_or_jump() else @@ -100,6 +134,26 @@ return { { name = 'nvim_lsp', group_index = 2 }, { name = 'path', group_index = 2 }, { name = 'luasnip', group_index = 2 }, + { name = 'buffer', group_index = 2 }, + { name = 'dotenv', group_index = 2 }, + }, + sorting = { + priority_weight = 2, + comparators = { + require('copilot_cmp.comparators').prioritize, + + -- Below is the default comparitor list and order for nvim-cmp + cmp.config.compare.offset, + -- cmp.config.compare.scopes, --this is commented in nvim-cmp too + cmp.config.compare.exact, + cmp.config.compare.score, + cmp.config.compare.recently_used, + cmp.config.compare.locality, + cmp.config.compare.kind, + cmp.config.compare.sort_text, + cmp.config.compare.length, + cmp.config.compare.order, + }, }, } end, diff --git a/config/nvim/lua/plugins/dap.lua b/config/nvim/lua/plugins/dap.lua index e44652e..63ff977 100644 --- a/config/nvim/lua/plugins/dap.lua +++ b/config/nvim/lua/plugins/dap.lua @@ -9,22 +9,17 @@ return { 'ray-x/guihua.lua', 'leoluz/nvim-dap-go', }, - keys = { - { 'dt', 'DapUiToggle', desc = 'DAP: Toggle UI' }, - { 'db', 'DapToggleBreakpoint', desc = 'DAP: Toggle Breakpoint' }, - { 'dc', 'DapContinue', desc = 'DAP: Continue' }, - { 'dr', ":lua require('dapui').open({reset = true})", desc = 'DAP: Reset' }, - { 'ht', ":lua require('harpoon.ui').toggle_quick_menu()", desc = 'DAP: Harpoon UI' }, - }, setup = function() require('dapui').setup() require('dap-go').setup() - require('nvim-dap-virtual-text').setup() + require('nvim-dap-virtual-text').setup {} - vim.fn.sign_define( - 'DapBreakpoint', - { text = '🔴', texthl = 'DapBreakpoint', linehl = 'DapBreakpoint', numhl = 'DapBreakpoint' } - ) + vim.fn.sign_define('DapBreakpoint', { + text = '🔴', + texthl = 'DapBreakpoint', + linehl = 'DapBreakpoint', + numhl = 'DapBreakpoint', + }) end, }, } diff --git a/config/nvim/lua/plugins/fzf.lua b/config/nvim/lua/plugins/fzf.lua deleted file mode 100644 index 2f7258e..0000000 --- a/config/nvim/lua/plugins/fzf.lua +++ /dev/null @@ -1,32 +0,0 @@ -return { - -- fzf <3 vim - -- https://github.com/junegunn/fzf.vim - 'junegunn/fzf.vim', - dependencies = { - { 'junegunn/fzf', run = ':call fzf#install()' }, - }, - keys = { - -- Stolen from https://github.com/erikw/dotfiles/blob/d68d6274d67ac47afa20b9a0b9f3b0fa54bcdaf3/.config/nvim/lua/plugins.lua - -- Search for files in given path. - { 'zf', ':FZF', desc = 'FZF: search for files in given path.' }, - -- Sublime-like shortcut 'go to file' ctrl+p. - { '', ':Files', desc = 'FZF: search for files starting at current directory.' }, - { 'zc', ':Commands', desc = 'FZF: search commands.' }, - { 'zt', ':Tags', desc = 'FZF: search in tags file' }, - { 'zb', ':Buffers', desc = 'FZF: search open buffers.' }, - -- Ref: https://medium.com/@paulodiovani/vim-buffers-windows-and-tabs-an-overview-8e2a57c57afa - { 'zt', ':Windows', desc = 'FZF: search open tabs.' }, - { 'zh', ':History', desc = 'FZF: search history of opened files' }, - { 'zm', ':Maps', desc = 'FZF: search mappings.' }, - { 'zg', ':Rg', desc = 'FZF: search with rg (aka live grep).' }, - }, - config = function() - -- To ignore a certain path in a git project from both RG and FD used by FZF, - -- the eaiest way is to create ignore files and exclude the in local git clone. - -- Ref: https://stackoverflow.com/a/1753078/265508 - -- $ cd git_proj/ - -- $ echo "path/to/exclude" > .rgignore - -- $ echo "path/to/exclude" > .fdignore - -- $ printf ".rgignore\n.fdignore" >> .git/info/exclude - end, -} diff --git a/config/nvim/lua/plugins/git.lua b/config/nvim/lua/plugins/git.lua deleted file mode 100644 index 0cf27e7..0000000 --- a/config/nvim/lua/plugins/git.lua +++ /dev/null @@ -1,50 +0,0 @@ -return { - -- Git integration for buffers - -- https://github.com/lewis6991/gitsigns.nvim - { - 'lewis6991/gitsigns.nvim', - lazy = false, - config = function() - require('gitsigns').setup { - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - current_line_blame = false, - on_attach = function(bufnr) - local gs = require 'gitsigns' - - local function map(mode, l, r, opts) - opts = opts or {} - opts.buffer = bufnr - vim.keymap.set(mode, l, r, opts) - end - - -- Navigation - map('n', 'gn', function() - if vim.wo.diff then - return ']c' - end - vim.schedule(function() - gs.next_hunk() - end) - return '' - end, { expr = true }) - - map('n', 'gp', function() - if vim.wo.diff then - return '[c' - end - vim.schedule(function() - gs.prev_hunk() - end) - return '' - end, { expr = true }) - end, - } - end, - }, -} diff --git a/config/nvim/lua/plugins/goto-preview.lua b/config/nvim/lua/plugins/goto-preview.lua index 3eeed00..c37aa67 100644 --- a/config/nvim/lua/plugins/goto-preview.lua +++ b/config/nvim/lua/plugins/goto-preview.lua @@ -5,34 +5,26 @@ return { dependencies = { { 'nvim-telescope/telescope.nvim' }, }, - keys = { - { 'n', 'gp', group = 'Goto Preview' }, - { 'n', 'gpd', 'lua require("goto-preview").goto_preview_definition()' }, - { 'n', 'gpi', 'lua require("goto-preview").goto_preview_implementation()' }, - { 'n', 'gpP', 'lua require("goto-preview").close_all_windows()' }, - }, - config = function() - require('goto-preview').setup { - width = 120, -- Width of the floating window - height = 15, -- Height of the floating window - border = { '↖', '─', '┐', '│', '┘', '─', '└', '│' }, -- Border characters of the floating window - default_mappings = true, - debug = false, -- Print debug information - opacity = nil, -- 0-100 opacity level of the floating window where 100 is fully transparent. - resizing_mappings = false, -- Binds arrow keys to resizing the floating window. - post_open_hook = nil, -- A function taking two arguments, a buffer and a window to be ran as a hook. - references = { -- Configure the telescope UI for slowing the references cycling window. - telescope = require('telescope.themes').get_dropdown { - hide_preview = false, - }, + opts = { + width = 120, -- Width of the floating window + height = 15, -- Height of the floating window + border = { '↖', '─', '┐', '│', '┘', '─', '└', '│' }, -- Border characters of the floating window + default_mappings = true, + debug = false, -- Print debug information + opacity = nil, -- 0-100 opacity level of the floating window where 100 is fully transparent. + resizing_mappings = false, -- Binds arrow keys to resizing the floating window. + post_open_hook = nil, -- A function taking two arguments, a buffer and a window to be ran as a hook. + references = { -- Configure the telescope UI for slowing the references cycling window. + telescope = require('telescope.themes').get_dropdown { + hide_preview = false, }, - -- These two configs can also be passed down to the goto-preview definition and implementation calls for one off "peak" functionality. - focus_on_open = true, -- Focus the floating window when opening it. - dismiss_on_move = false, -- Dismiss the floating window when moving the cursor. - force_close = true, -- passed into vim.api.nvim_win_close's second argument. See :h nvim_win_close - bufhidden = 'wipe', -- the bufhidden option to set on the floating window. See :h bufhidden - stack_floating_preview_windows = true, -- Whether to nest floating windows - preview_window_title = { enable = true, position = 'left' }, - } - end, + }, + -- These two configs can also be passed down to the goto-preview definition and implementation calls for one off "peak" functionality. + focus_on_open = true, -- Focus the floating window when opening it. + dismiss_on_move = false, -- Dismiss the floating window when moving the cursor. + force_close = true, -- passed into vim.api.nvim_win_close's second argument. See :h nvim_win_close + bufhidden = 'wipe', -- the bufhidden option to set on the floating window. See :h bufhidden + stack_floating_preview_windows = true, -- Whether to nest floating windows + preview_window_title = { enable = true, position = 'left' }, + }, } diff --git a/config/nvim/lua/plugins/harpoon.lua b/config/nvim/lua/plugins/harpoon.lua index fd19e79..d46ac67 100644 --- a/config/nvim/lua/plugins/harpoon.lua +++ b/config/nvim/lua/plugins/harpoon.lua @@ -10,13 +10,8 @@ return { }, config = function() local harpoon = require 'harpoon' - harpoon:setup {} - vim.keymap.set('n', 'ht', function() - harpoon.ui:toggle_quick_menu(harpoon:list()) - end, { desc = 'Open Harpoon Quick menu' }) - -- basic telescope configuration local conf = require('telescope.config').values local function toggle_telescope(harpoon_files) @@ -40,64 +35,9 @@ return { vim.keymap.set('n', 'hw', function() toggle_telescope(harpoon:list()) end, { desc = 'Open harpoon window with telescope' }) + vim.keymap.set('n', 'ht', function() + harpoon.ui:toggle_quick_menu(harpoon:list()) + end, { desc = 'Open Harpoon Quick menu' }) end, - keys = { - { - 'ha', - function() - require('harpoon'):list():add() - end, - desc = 'harpoon file', - }, - { - 'hp', - function() - require('harpoon'):list():prev() - end, - desc = 'harpoon to previous file', - }, - { - 'hn', - function() - require('harpoon'):list():next() - end, - desc = 'harpoon to next file', - }, - { - '1', - function() - require('harpoon'):list():select(1) - end, - desc = 'harpoon to file 1', - }, - { - '2', - function() - require('harpoon'):list():select(2) - end, - desc = 'harpoon to file 2', - }, - { - '3', - function() - require('harpoon'):list():select(3) - end, - desc = 'harpoon to file 3', - }, - { - '4', - function() - require('harpoon'):list():select(4) - end, - desc = 'harpoon to file 4', - }, - { - '5', - function() - require('harpoon'):list():select(5) - end, - desc = 'harpoon to file 5', - }, - }, }, } diff --git a/config/nvim/lua/plugins/lazy.lua b/config/nvim/lua/plugins/lazy.lua index 7e299ad..c587307 100644 --- a/config/nvim/lua/plugins/lazy.lua +++ b/config/nvim/lua/plugins/lazy.lua @@ -5,44 +5,101 @@ return { { 'danymat/neogen', version = '*', - keys = { - { - 'cg', - 'lua require("neogen").generate()', - desc = 'Generate annotations', - }, + opts = { + enabled = true, + snippet_engine = 'luasnip', + }, + }, + + -- The Refactoring library based off the Refactoring book by Martin Fowler + -- https://github.com/ThePrimeagen/refactoring.nvim + { + 'ThePrimeagen/refactoring.nvim', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-treesitter/nvim-treesitter', }, config = function() - require('neogen').setup { - enabled = true, - snippet_engine = 'luasnip', - } + require('refactoring').setup() + + local r = require 'refactoring' + + vim.keymap.set('x', 're', function() + r.refactor 'Extract Function' + end) + vim.keymap.set('x', 'rf', function() + r.refactor 'Extract Function To File' + end) + -- Extract function supports only visual mode + vim.keymap.set('x', 'rv', function() + r.refactor 'Extract Variable' + end) + -- Extract variable supports only visual mode + vim.keymap.set('n', 'rI', function() + r.refactor 'Inline Function' + end) + -- Inline func supports only normal + vim.keymap.set({ 'n', 'x' }, 'ri', function() + r.refactor 'Inline Variable' + end) + -- Inline var supports both normal and visual mode + + vim.keymap.set('n', 'rb', function() + r.refactor 'Extract Block' + end) + vim.keymap.set('n', 'rbf', function() + r.refactor 'Extract Block To File' + end) + -- Extract block supports only normal mode end, }, - -- Rethinking Vim as a tool for writing - -- https://github.com/preservim/vim-pencil - { 'preservim/vim-pencil' }, + -- All the npm/yarn/pnpm commands I don't want to type + -- https://github.com/vuki656/package-info.nvim + { + 'vuki656/package-info.nvim', + dependencies = { 'MunifTanjim/nui.nvim' }, + }, - -- surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease - -- https://github.com/tpope/vim-surround - { 'tpope/vim-surround' }, + -- Add/change/delete surrounding delimiter pairs with ease. Written with ❤️ in Lua. + -- https://github.com/kylechui/nvim-surround + { + 'kylechui/nvim-surround', + version = '*', -- Use for stability; omit to use `main` branch for the latest features + event = 'VeryLazy', + }, + + -- fzf <3 vim + -- https://github.com/junegunn/fzf.vim + { + 'junegunn/fzf.vim', + dependencies = { + { 'junegunn/fzf', run = ':call fzf#install()' }, + }, + config = function() + require('fzf').setup { + winopts = { + win_height = 0.85, + win_width = 0.85, + }, + } + end, + opts = { + -- To ignore a certain path in a git project from both RG and FD used by FZF, + -- the eaiest way is to create ignore files and exclude the in local git clone. + -- Ref: https://stackoverflow.com/a/1753078/265508 + -- $ cd git_proj/ + -- $ echo "path/to/exclude" > .rgignore + -- $ echo "path/to/exclude" > .fdignore + -- $ printf ".rgignore\n.fdignore" >> .git/info/exclude + }, + }, -- Highlight, list and search todo comments in your projects -- https://github.com/folke/todo-comments.nvim { 'folke/todo-comments.nvim', dependencies = 'nvim-lua/plenary.nvim', - config = function() - require('todo-comments').setup {} - end, - }, - - -- Indent guides for Neovim - -- https://github.com/lukas-reineke/indent-blankline.nvim - { - 'lukas-reineke/indent-blankline.nvim', - main = 'ibl', opts = {}, }, @@ -51,9 +108,7 @@ return { { 'numToStr/Comment.nvim', -- "gc" to comment visual regions/lines event = { 'BufRead', 'BufNewFile' }, - config = function() - require('Comment').setup() - end, + opts = {}, }, -- Detect tabstop and shiftwidth automatically diff --git a/config/nvim/lua/plugins/lint.lua b/config/nvim/lua/plugins/lint.lua deleted file mode 100644 index ca9bc23..0000000 --- a/config/nvim/lua/plugins/lint.lua +++ /dev/null @@ -1,55 +0,0 @@ -return { - - { -- Linting - 'mfussenegger/nvim-lint', - event = { 'BufReadPre', 'BufNewFile' }, - config = function() - local lint = require 'lint' - lint.linters_by_ft = { - markdown = { 'markdownlint' }, - } - - -- To allow other plugins to add linters to require('lint').linters_by_ft, - -- instead set linters_by_ft like this: - -- lint.linters_by_ft = lint.linters_by_ft or {} - -- lint.linters_by_ft['markdown'] = { 'markdownlint' } - -- - -- However, note that this will enable a set of default linters, - -- which will cause errors unless these tools are available: - -- { - -- clojure = { "clj-kondo" }, - -- dockerfile = { "hadolint" }, - -- inko = { "inko" }, - -- janet = { "janet" }, - -- json = { "jsonlint" }, - -- markdown = { "vale" }, - -- rst = { "vale" }, - -- ruby = { "ruby" }, - -- terraform = { "tflint" }, - -- text = { "vale" } - -- } - -- - -- You can disable the default linters by setting their filetypes to nil: - -- lint.linters_by_ft['clojure'] = nil - -- lint.linters_by_ft['dockerfile'] = nil - -- lint.linters_by_ft['inko'] = nil - -- lint.linters_by_ft['janet'] = nil - -- lint.linters_by_ft['json'] = nil - -- lint.linters_by_ft['markdown'] = nil - -- lint.linters_by_ft['rst'] = nil - -- lint.linters_by_ft['ruby'] = nil - -- lint.linters_by_ft['terraform'] = nil - -- lint.linters_by_ft['text'] = nil - - -- Create autocommand which carries out the actual linting - -- on the specified events. - local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true }) - vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { - group = lint_augroup, - callback = function() - lint.try_lint() - end, - }) - end, - }, -} diff --git a/config/nvim/lua/plugins/lsp.lua b/config/nvim/lua/plugins/lsp.lua index b7d1316..e3bbf5f 100644 --- a/config/nvim/lua/plugins/lsp.lua +++ b/config/nvim/lua/plugins/lsp.lua @@ -8,56 +8,83 @@ return { -- Neovim plugin to manage global and project-local settings -- Should be included before LSP Config -- https://github.com/folke/neoconf.nvim + { 'folke/neoconf.nvim', opts = {} }, + + -- Garbage collector that stops inactive LSP clients to free RAM + -- https://github.com/Zeioth/garbage-day.nvim { - 'folke/neoconf.nvim', - lazy = false, - keys = { - { '?c', 'Neoconf', desc = 'Neoconf: Open' }, - { '?g', 'Neoconf global', desc = 'Neoconf: Global' }, - { '?l', 'Neoconf local', desc = 'Neoconf: Local' }, - { '?m', 'Neoconf lsp', desc = 'Neoconf: Show merged LSP config' }, - { '?s', 'Neoconf show', desc = 'Neoconf: Show merged config' }, + 'zeioth/garbage-day.nvim', + dependencies = 'neovim/nvim-lspconfig', + event = 'VeryLazy', + opts = {}, + }, + + -- improve neovim lsp experience + -- https://github.com/nvimdev/lspsaga.nvim + { + 'nvimdev/lspsaga.nvim', + dependencies = { + 'nvim-treesitter/nvim-treesitter', -- optional + 'nvim-tree/nvim-web-devicons', -- optional + }, + opts = { + code_action = { + show_server_name = true, + }, + diagnostic = { + keys = { + quit = { 'q', '' }, + }, + }, }, - config = function() - require('neoconf').setup() - end, }, + + -- ── Mason and LSPConfig integration ───────────────────────────────── -- Automatically install LSPs to stdpath for neovim + + -- Portable package manager for Neovim that runs everywhere Neovim runs. + -- Easily install and manage LSP servers, DAP servers, linters, + -- and formatters. + -- https://github.com/williamboman/mason.nvim + { 'williamboman/mason.nvim', opts = {} }, + { 'williamboman/mason-lspconfig.nvim', opts = {} }, + { 'WhoIsSethDaniel/mason-tool-installer.nvim', opts = {} }, + + -- ── Linting ───────────────────────────────────────────────────────── + -- An asynchronous linter plugin for Neovim complementary to the + -- built-in Language Server Protocol support. + -- https://github.com/mfussenegger/nvim-lint { - 'williamboman/mason.nvim', - lazy = false, - run = ':call MasonUpdate', + 'mfussenegger/nvim-lint', + event = { 'BufReadPre', 'BufNewFile' }, }, - 'williamboman/mason-lspconfig.nvim', - 'WhoIsSethDaniel/mason-tool-installer.nvim', - 'b0o/schemastore.nvim', + -- Extension to mason.nvim that makes it + -- easier to use nvim-lint with mason.nvim + -- https://github.com/rshkarin/mason-nvim-lint + { 'rshkarin/mason-nvim-lint' }, + + -- ── Misc ──────────────────────────────────────────────────────────── -- vscode-like pictograms for neovim lsp completion items -- https://github.com/onsails/lspkind-nvim { 'onsails/lspkind.nvim' }, - }, - keys = { - { 'do', 'lua vim.diagnostic.open_float()', desc = 'Diagnostic: Open float' }, - { 'dq', 'lua vim.diagnostic.setloclist()', desc = 'Diagnostic: Set loc list' }, - { 'dn', 'lua vim.diagnostic.goto_next()', desc = 'Diagnostic: Goto Next' }, - { 'dp', 'lua vim.diagnostic.goto_prev()', desc = 'Diagnostic: Goto Prev' }, - { 'cr', 'lua vim.lsp.buf.rename()', desc = 'LSP: Rename' }, - { 'ca', 'lua vim.lsp.buf.code_action()', desc = 'LSP: Code Action' }, - { 'gd', 'lua vim.lsp.buf.definition()', desc = 'LSP: Goto Definition' }, - { 'gr', 'lua require("telescope.builtin").lsp_references()', desc = 'LSP: Goto References' }, - { 'gI', 'lua vim.lsp.buf.implementation()', desc = 'LSP: Goto Implementation' }, - { 'D', 'lua vim.lsp.buf.type_definition()', desc = 'LSP: Type Definition' }, - { 'ds', 'lua require("telescope.builtin").lsp_document_symbols()', desc = 'LSP: Document Symbols' }, - { 'ws', 'lua require("telescope.builtin").lsp_dynamic_workspace_symbols()', desc = 'LSP: Workspace Symbols' }, - { 'K', 'lua vim.lsp.buf.hover()', desc = 'LSP: Hover Documentation' }, - { '', 'lua vim.lsp.buf.signature_help()', desc = 'LSP: Signature Documentation' }, - { 'gD', 'lua vim.lsp.buf.declaration()', desc = 'LSP: Goto Declaration' }, - { 'wa', 'lua vim.lsp.buf.add_workspace_folder()', desc = 'LSP: Workspace Add Folder' }, - { 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', desc = 'LSP: Workspace Remove Folder' }, - { 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', desc = 'LSP: Workspace List Folders' }, + -- JSON schemas for Neovim + -- https://github.com/b0o/SchemaStore.nvim + { 'b0o/schemastore.nvim' }, }, config = function() - -- LSP settings. + -- ── LSP settings. ─────────────────────────────────────────────────── -- This function gets run when an LSP connects to a particular buffer. + + -- Make runtime files discoverable to the server + local runtime_path = vim.split(package.path, ';') + table.insert(runtime_path, 'lua/?.lua') + table.insert(runtime_path, 'lua/?/init.lua') + + -- Generate a command `:Format` local to the LSP buffer + -- + ---@param _ nil Skipped + ---@param bufnr number Buffer number + ---@output nil local on_attach = function(_, bufnr) -- Create a command `:Format` local to the LSP buffer vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_) @@ -69,18 +96,18 @@ return { end, { desc = 'Format current buffer with LSP' }) end - -- Setup mason so it can manage external tooling + -- ── Setup mason so it can manage external tooling ─────────────────── require('mason').setup() - -- Enable the following language servers - -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. + -- ── Enable the following language servers ─────────────────────────── + -- :help lspconfig-all for all pre-configured LSPs local servers = { - -- :help lspconfig-all for all pre-configured LSPs ast_grep = {}, actionlint = {}, -- GitHub Actions ansiblels = {}, -- Ansible bashls = {}, -- Bash + -- csharp_ls = {}, -- C#, requires dotnet executable css_variables = {}, -- CSS cssls = {}, -- CSS docker_compose_language_service = {}, -- Docker compose @@ -110,11 +137,29 @@ return { lua_ls = { settings = { Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT) + version = 'LuaJIT', + -- Setup your lua path + path = runtime_path, + }, + diagnostics = { + globals = { 'vim' }, + disable = { + -- Ignore Lua_LS's noisy `missing-fields` warnings + 'missing-fields', + }, + }, + workspace = { + library = vim.api.nvim_get_runtime_file('', true), + checkThirdParty = false, + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { enable = false }, + completion = { callSnippet = 'Replace', }, - -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - diagnostics = { disable = { 'missing-fields' } }, }, }, }, @@ -133,18 +178,21 @@ return { url = '', }, schemas = require('schemastore').yaml.schemas(), + validate = { enable = true }, }, }, }, } - local ensure_installed = vim.tbl_keys(servers or {}) - vim.list_extend(ensure_installed, { + -- Mason servers should be it's own variable for mason-nvim-lint + -- See: https://mason-registry.dev/registry/list + local mason_servers = { 'actionlint', 'ansible-language-server', 'ansible-lint', 'bash-language-server', 'blade-formatter', + 'clang-format', 'commitlint', 'diagnostic-languageserver', 'docker-compose-language-service', @@ -164,14 +212,19 @@ return { 'shfmt', 'stylelint', 'stylua', + 'vue-language-server', 'yamllint', - }) + } + local ensure_installed = vim.tbl_keys(servers or {}) + vim.list_extend(ensure_installed, mason_servers) + + -- ── Automagically install tools ───────────────────────────────────── require('mason-tool-installer').setup { ensure_installed = ensure_installed, auto_update = true, } - -- Ensure the servers above are installed + -- ── Ensure the servers above are installed ────────────────────────── require('mason-lspconfig').setup { automatic_installation = true, ensure_installed = servers, @@ -181,6 +234,20 @@ return { local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + require('mason-lspconfig').setup_handlers { + -- The first entry (without a key) will be the default handler + -- and will be called for each installed server that doesn't have + -- a dedicated handler. + function(server_name) -- default handler (optional) + require('lspconfig')[server_name].setup {} + end, + -- Next, you can provide a dedicated handler for specific servers. + -- For example, a handler override for the `rust_analyzer`: + -- ['rust_analyzer'] = function() + -- require('rust-tools').setup {} + -- end, + } + for _, lsp in ipairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, @@ -188,37 +255,11 @@ return { } end - -- Turn on lsp status information - -- require('fidget').setup() - - -- Example custom configuration for lua - -- - -- Make runtime files discoverable to the server - local runtime_path = vim.split(package.path, ';') - table.insert(runtime_path, 'lua/?.lua') - table.insert(runtime_path, 'lua/?/init.lua') - require('lspconfig').lua_ls.setup { on_attach = on_attach, capabilities = capabilities, settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT) - version = 'LuaJIT', - -- Setup your lua path - path = runtime_path, - }, - diagnostics = { - globals = { 'vim' }, - }, - workspace = { - library = vim.api.nvim_get_runtime_file('', true), - checkThirdParty = false, - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { enable = false }, - }, + Lua = servers.lua_ls.settings.Lua, }, } @@ -231,6 +272,20 @@ return { } end, }) + + -- ── Setup linting ─────────────────────────────────────────────────── + require('mason-nvim-lint').setup { + ensure_installed = mason_servers or {}, + quiet_mode = true, + } + local lint = require 'lint' + local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true }) + vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { + group = lint_augroup, + callback = function() + lint.try_lint() + end, + }) end, }, } diff --git a/config/nvim/lua/plugins/lualine.lua b/config/nvim/lua/plugins/lualine.lua index 91a94ca..e99f26a 100644 --- a/config/nvim/lua/plugins/lualine.lua +++ b/config/nvim/lua/plugins/lualine.lua @@ -6,32 +6,35 @@ return { 'kyazdani42/nvim-web-devicons', 'folke/noice.nvim', }, - config = function() - require('lualine').setup { - options = { - icons_enabled = true, - component_separators = '|', - section_separators = '', - }, - sections = { - lualine_x = { - { - require('noice').api.statusline.mode.get, - cond = require('noice').api.statusline.mode.has, - -- color = { fg = '#ff9e64' }, - }, - { - require('noice').api.status.command.get, - cond = require('noice').api.status.command.has, - -- color = { fg = '#ff9e64' }, - }, - }, - lualine_a = { - { - 'buffers', - }, + opts = { + options = { + icons_enabled = true, + component_separators = '|', + section_separators = '', + }, + -- Sections + -- +-------------------------------------------------+ + -- | A | B | C X | Y | Z | + -- +-------------------------------------------------+ + sections = { + lualine_b = { + { + 'buffers', }, }, - } - end, + + lualine_x = { + { + require('noice').api.statusline.mode.get, + cond = require('noice').api.statusline.mode.has, + -- color = { fg = '#ff9e64' }, + }, + { + require('noice').api.status.command.get, + cond = require('noice').api.status.command.has, + -- color = { fg = '#ff9e64' }, + }, + }, + }, + }, } diff --git a/config/nvim/lua/plugins/neotree.lua b/config/nvim/lua/plugins/neotree.lua index 695c9b6..d47315f 100644 --- a/config/nvim/lua/plugins/neotree.lua +++ b/config/nvim/lua/plugins/neotree.lua @@ -1,6 +1,5 @@ -- Neo-tree is a Neovim plugin to browse the file system -- https://github.com/nvim-neo-tree/neo-tree.nvim - return { 'nvim-neo-tree/neo-tree.nvim', version = '*', @@ -11,27 +10,22 @@ return { { 's1n7ax/nvim-window-picker', version = '2.*', - config = function() - require('window-picker').setup { - filter_rules = { - include_current_win = false, - autoselect_one = true, - -- filter using buffer options - bo = { - -- if the file type is one of following, the window will be ignored - filetype = { 'neo-tree', 'neo-tree-popup', 'notify' }, - -- if the buffer type is one of following, the window will be ignored - buftype = { 'terminal', 'quickfix' }, - }, + opts = { + filter_rules = { + include_current_win = false, + autoselect_one = true, + -- filter using buffer options + bo = { + -- if the file type is one of following, the window will be ignored + filetype = { 'neo-tree', 'neo-tree-popup', 'notify' }, + -- if the buffer type is one of following, the window will be ignored + buftype = { 'terminal', 'quickfix' }, }, - } - end, + }, + }, }, }, cmd = 'Neotree', - keys = { - { 'e', ':Neotree reveal', desc = 'NeoTree reveal' }, - }, opts = { close_if_last_window = true, filesystem = { diff --git a/config/nvim/lua/plugins/noice.lua b/config/nvim/lua/plugins/noice.lua index eab0457..c4fddc1 100644 --- a/config/nvim/lua/plugins/noice.lua +++ b/config/nvim/lua/plugins/noice.lua @@ -1,7 +1,15 @@ +-- Highly experimental plugin that completely replaces the UI +-- for messages, cmdline and the popupmenu. +-- https://github.com/folke/noice.nvim + +vim.g.noice_ignored_filetypes = { + 'fugitiveblame', + 'fugitive', + 'gitcommit', + 'noice', +} + return { - -- Highly experimental plugin that completely replaces the UI - -- for messages, cmdline and the popupmenu. - -- https://github.com/folke/noice.nvim 'folke/noice.nvim', lazy = false, enabled = true, @@ -12,73 +20,67 @@ return { 'rcarriga/nvim-notify', 'hrsh7th/nvim-cmp', }, - keys = { - { 'n', 'tn', ':Noice dismiss', desc = 'Noice dismiss' }, + opts = { + lsp = { + -- override markdown rendering so that **cmp** and other plugins use **Treesitter** + override = { + ['vim.lsp.util.convert_input_to_markdown_lines'] = true, + ['vim.lsp.util.stylize_markdown'] = true, + ['cmp.entry.get_documentation'] = true, -- requires hrsh7th/nvim-cmp + }, + }, + -- you can enable a preset for easier configuration + presets = { + bottom_search = false, -- use a classic bottom cmdline for search + command_palette = true, -- position the cmdline and popupmenu together + long_message_to_split = true, -- long messages will be sent to a split + inc_rename = false, -- enables an input dialog for inc-rename.nvim + lsp_doc_border = false, -- add a border to hover docs and signature help + }, + routes = { + { + filter = { + event = 'msg_show', + any = { + { find = '%d+L, %d+B' }, + { find = '; after #%d+' }, + { find = '; before #%d+' }, + { find = '%d fewer lines' }, + { find = '%d more lines' }, + }, + }, + opts = { skip = true }, + }, + }, + views = { + cmdline_popup = { + position = { + row = 5, + col = '50%', + }, + size = { + width = 60, + height = 'auto', + }, + }, + popupmenu = { + relative = 'editor', + position = { + row = 8, + col = '50%', + }, + size = { + width = 60, + height = 10, + }, + border = { + style = 'rounded', + padding = { 0, 1 }, + }, + win_options = { + winhighlight = { Normal = 'Normal', FloatBorder = 'DiagnosticInfo' }, + }, + }, + }, }, - config = function() - vim.g.noice_ignored_filetypes = { 'fugitiveblame', 'fugitive', 'gitcommit', 'noice' } - require('noice').setup { - lsp = { - -- override markdown rendering so that **cmp** and other plugins use **Treesitter** - override = { - ['vim.lsp.util.convert_input_to_markdown_lines'] = true, - ['vim.lsp.util.stylize_markdown'] = true, - ['cmp.entry.get_documentation'] = true, -- requires hrsh7th/nvim-cmp - }, - }, - -- you can enable a preset for easier configuration - presets = { - bottom_search = false, -- use a classic bottom cmdline for search - command_palette = true, -- position the cmdline and popupmenu together - long_message_to_split = true, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help - }, - routes = { - { - filter = { - event = 'msg_show', - any = { - { find = '%d+L, %d+B' }, - { find = '; after #%d+' }, - { find = '; before #%d+' }, - { find = '%d fewer lines' }, - { find = '%d more lines' }, - }, - }, - opts = { skip = true }, - }, - }, - views = { - cmdline_popup = { - position = { - row = 5, - col = '50%', - }, - size = { - width = 60, - height = 'auto', - }, - }, - popupmenu = { - relative = 'editor', - position = { - row = 8, - col = '50%', - }, - size = { - width = 60, - height = 10, - }, - border = { - style = 'rounded', - padding = { 0, 1 }, - }, - win_options = { - winhighlight = { Normal = 'Normal', FloatBorder = 'DiagnosticInfo' }, - }, - }, - }, - } - end, } diff --git a/config/nvim/lua/plugins/treesitter.lua b/config/nvim/lua/plugins/treesitter.lua index 9ebc8f4..66d3e5d 100644 --- a/config/nvim/lua/plugins/treesitter.lua +++ b/config/nvim/lua/plugins/treesitter.lua @@ -1,6 +1,6 @@ +-- Highlight, edit, and navigate code +-- https://github.com/nvim-treesitter/nvim-treesitter return { - -- Highlight, edit, and navigate code - -- https://github.com/nvim-treesitter/nvim-treesitter 'nvim-treesitter/nvim-treesitter', build = function() pcall(require('nvim-treesitter.install').update { with_sync = true }) diff --git a/config/nvim/lua/plugins/trouble.lua b/config/nvim/lua/plugins/trouble.lua index 190a624..5dcedeb 100644 --- a/config/nvim/lua/plugins/trouble.lua +++ b/config/nvim/lua/plugins/trouble.lua @@ -1,34 +1,15 @@ +-- A pretty diagnostics, references, telescope results, +-- quickfix and location list to help you solve all the +-- trouble your code is causing. +-- https://github.com/folke/trouble.nvim return { 'folke/trouble.nvim', lazy = false, - dependencies = 'nvim-tree/nvim-web-devicons', - keys = { - { 'xx', 'Trouble', desc = 'Toggle Trouble' }, - { 'xw', 'Trouble workspace_diagnostics', desc = 'Toggle Workspace Diagnostics' }, - { 'xd', 'Trouble document_diagnostics', desc = 'Toggle Document Diagnostics' }, - { 'xl', 'Trouble loclist', desc = 'Toggle Loclist' }, - { 'xq', 'Trouble quickfix', desc = 'Toggle Quickfix' }, - { 'gR', 'Trouble lsp_references', desc = 'Toggle LSP References' }, + dependencies = { 'nvim-tree/nvim-web-devicons' }, + opts = { + auto_preview = false, + auto_fold = true, + auto_close = true, + use_lsp_diagnostic_signs = true, }, - config = function() - require('trouble').setup { - auto_preview = false, - auto_fold = true, - auto_close = true, - use_lsp_diagnostic_signs = true, - } - - -- Diagnostic signs - -- https://github.com/folke/trouble.nvim/issues/52 - local signs = { - Error = ' ', - Warning = ' ', - Hint = ' ', - Information = ' ', - } - for type, icon in pairs(signs) do - local hl = 'DiagnosticSign' .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) - end - end, } diff --git a/config/nvim/lua/plugins/ufo.lua b/config/nvim/lua/plugins/ufo.lua index ce10f94..8fe77d3 100644 --- a/config/nvim/lua/plugins/ufo.lua +++ b/config/nvim/lua/plugins/ufo.lua @@ -1,72 +1,18 @@ -- Not UFO in the sky, but an ultra fold in Neovim. -- https://github.com/kevinhwang91/nvim-ufo/ - --- fold_virt_text_handler --- This handler is called when the fold text is too long to fit in the window. --- It is expected to truncate the text and return a new list of virtual text. --- The handler is called with the following arguments: --- virtText: The current virtual text list. --- lnum: The line number of the first line in the fold. --- endLnum: The line number of the last line in the fold. --- width: The width of the window. --- ---@type function ---@param virtText ---@param lnum ---@param endLnum ---@param width ---@param truncate ---@return table -local handler = function(virtText, lnum, endLnum, width, truncate) - local newVirtText = {} - local suffix = (' 󰁂 %d '):format(endLnum - lnum) - local sufWidth = vim.fn.strdisplaywidth(suffix) - local targetWidth = width - sufWidth - local curWidth = 0 - for _, chunk in ipairs(virtText) do - local chunkText = chunk[1] - local chunkWidth = vim.fn.strdisplaywidth(chunkText) - if targetWidth > curWidth + chunkWidth then - table.insert(newVirtText, chunk) - else - chunkText = truncate(chunkText, targetWidth - curWidth) - local hlGroup = chunk[2] - table.insert(newVirtText, { chunkText, hlGroup }) - chunkWidth = vim.fn.strdisplaywidth(chunkText) - -- str width returned from truncate() may less than 2nd argument, need padding - if curWidth + chunkWidth < targetWidth then - suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth) - end - break - end - curWidth = curWidth + chunkWidth - end - table.insert(newVirtText, { suffix, 'MoreMsg' }) - return newVirtText -end - return { { 'kevinhwang91/nvim-ufo', - lazy = false, - enabled = true, version = '*', dependencies = { - 'kevinhwang91/promise-async', + { 'kevinhwang91/promise-async' }, { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }, { + -- Status column plugin that provides a configurable + -- 'statuscolumn' and click handlers. + -- https://github.com/luukvbaal/statuscol.nvim 'luukvbaal/statuscol.nvim', - config = function() - local builtin = require 'statuscol.builtin' - require('statuscol').setup { - relculright = true, - segments = { - { text = { builtin.foldfunc }, click = 'v:lua.ScFa' }, - { text = { '%s' }, click = 'v:lua.ScSa' }, - { text = { builtin.lnumfunc, ' ' }, click = 'v:lua.ScLa' }, - }, - } - end, + opts = {}, }, }, init = function() @@ -95,7 +41,44 @@ return { provider_selector = function(_, _, _) -- bufnr, filetype, buftype return { 'treesitter', 'indent' } end, - fold_virt_text_handler = handler, + -- fold_virt_text_handler + -- + -- This handler is called when the fold text is too long to fit in the window. + -- It is expected to truncate the text and return a new list of virtual text. + -- + ---@param virtText table The current virtual text list. + ---@param lnum number The line number of the first line in the fold. + ---@param endLnum number The line number of the last line in the fold. + ---@param width number The width of the window. + ---@param truncate function Truncate function + ---@return table + fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate) + local newVirtText = {} + local suffix = (' 󰁂 %d '):format(endLnum - lnum) + local sufWidth = vim.fn.strdisplaywidth(suffix) + local targetWidth = width - sufWidth + local curWidth = 0 + for _, chunk in ipairs(virtText) do + local chunkText = chunk[1] + local chunkWidth = vim.fn.strdisplaywidth(chunkText) + if targetWidth > curWidth + chunkWidth then + table.insert(newVirtText, chunk) + else + chunkText = truncate(chunkText, targetWidth - curWidth) + local hlGroup = chunk[2] + table.insert(newVirtText, { chunkText, hlGroup }) + chunkWidth = vim.fn.strdisplaywidth(chunkText) + -- str width returned from truncate() may less than 2nd argument, need padding + if curWidth + chunkWidth < targetWidth then + suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth) + end + break + end + curWidth = curWidth + chunkWidth + end + table.insert(newVirtText, { suffix, 'MoreMsg' }) + return newVirtText + end, }, }, } diff --git a/config/nvim/lua/plugins/ui.lua b/config/nvim/lua/plugins/ui.lua index a1a7ab7..a3b6cdb 100644 --- a/config/nvim/lua/plugins/ui.lua +++ b/config/nvim/lua/plugins/ui.lua @@ -5,7 +5,7 @@ return { 'folke/tokyonight.nvim', priority = 1000, -- Make sure to load this before all the other start plugins. init = function() - vim.cmd.colorscheme 'tokyonight' + vim.cmd.colorscheme(vim.g.colors_theme) end, opts = { transparent = true, @@ -20,27 +20,72 @@ return { update_interval = 1000, set_dark_mode = function() vim.api.nvim_set_option_value('background', 'dark', {}) - vim.cmd 'colorscheme tokyonight-storm' + vim.cmd.colorscheme(vim.g.colors_variant_dark) end, set_light_mode = function() vim.api.nvim_set_option_value('background', 'light', {}) - vim.cmd 'colorscheme tokyonight-day' + vim.cmd.colorscheme(vim.g.colors_variant_light) end, }, }, -- Remove all background colors to make nvim transparent -- https://github.com/xiyaowong/nvim-transparent - { 'xiyaowong/nvim-transparent' }, + { 'xiyaowong/nvim-transparent', opts = {} }, -- Twilight is a Lua plugin for Neovim 0.5 that dims inactive -- portions of the code you're editing using TreeSitter. -- https://github.com/folke/twilight.nvim + { 'folke/twilight.nvim', opts = {} }, + + -- Indent guides for Neovim + -- https://github.com/lukas-reineke/indent-blankline.nvim + { 'lukas-reineke/indent-blankline.nvim', main = 'ibl', opts = {} }, + + -- Git integration for buffers + -- https://github.com/lewis6991/gitsigns.nvim { - 'folke/twilight.nvim', - ft = 'markdown', -- Highlight markdown files - keys = { - { 'n', 'tw', 'Twilight', desc = 'Twilight' }, + 'lewis6991/gitsigns.nvim', + lazy = false, + opts = { + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + current_line_blame = false, + on_attach = function(bufnr) + local gs = require 'gitsigns' + + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end + + -- Navigation + map('n', 'gn', function() + if vim.wo.diff then + return ']c' + end + vim.schedule(function() + gs.next_hunk() + end) + return '' + end, { expr = true }) + + map('n', 'gp', function() + if vim.wo.diff then + return '[c' + end + vim.schedule(function() + gs.prev_hunk() + end) + return '' + end, { expr = true }) + end, }, }, @@ -48,8 +93,6 @@ return { -- https://github.com/christoomey/vim-tmux-navigator { 'christoomey/vim-tmux-navigator', - lazy = false, - enabled = true, cmd = { 'TmuxNavigateLeft', 'TmuxNavigateDown', @@ -57,60 +100,49 @@ return { 'TmuxNavigateRight', 'TmuxNavigatePrevious', }, - keys = { - { '', 'TmuxNavigateLeft', desc = 'tmux: Navigate Left' }, - { '', 'TmuxNavigateDown', desc = 'tmux: Navigate Down' }, - { '', 'TmuxNavigateUp', desc = 'tmux: Navigate Up' }, - { '', 'TmuxNavigateRight', desc = 'tmux: Navigate Right' }, - { '', 'TmuxNavigatePrevious', desc = 'tmux: Navigate Previous' }, - }, }, + -- Cloak allows you to overlay *'s over defined patterns in defined files. -- https://github.com/laytan/cloak.nvim { 'laytan/cloak.nvim', - enabled = true, - lazy = false, version = '*', - keys = { - { 'tc', 'CloakToggle', desc = '[tc] Toggle Cloak' }, - }, - config = function() - require('cloak').setup { - enabled = true, - cloak_character = '*', - -- The applied highlight group (colors) on the cloaking, see `:h highlight`. - highlight_group = 'Comment', - patterns = { - { - -- Match any file starting with ".env". - -- This can be a table to match multiple file patterns. - file_pattern = { - '.env*', - 'wrangler.toml', - '.dev.vars', - }, - -- Match an equals sign and any character after it. - -- This can also be a table of patterns to cloak, - -- example: cloak_pattern = { ":.+", "-.+" } for yaml files. - cloak_pattern = '=.+', + opts = { + enabled = true, + cloak_character = '*', + -- The applied highlight group (colors) on the cloaking, see `:h highlight`. + highlight_group = 'Comment', + patterns = { + { + -- Match any file starting with ".env". + -- This can be a table to match multiple file patterns. + file_pattern = { + '.env*', + 'wrangler.toml', + '.dev.vars', }, + -- Match an equals sign and any character after it. + -- This can also be a table of patterns to cloak, + -- example: cloak_pattern = { ":.+", "-.+" } for yaml files. + cloak_pattern = '=.+', }, - } - end, + }, + }, }, -- Close buffer without messing up with the window. -- https://github.com/famiu/bufdelete.nvim { 'famiu/bufdelete.nvim' }, + -- Neovim plugin for locking a buffer to a window -- https://github.com/stevearc/stickybuf.nvim { 'stevearc/stickybuf.nvim', opts = {} }, + -- Describe the regexp under the cursor -- https://github.com/bennypowers/nvim-regexplainer { 'bennypowers/nvim-regexplainer', + event = 'BufEnter', lazy = false, - enabled = true, dependencies = { 'nvim-treesitter/nvim-treesitter', 'MunifTanjim/nui.nvim', @@ -120,12 +152,11 @@ return { auto = true, }, }, + -- Clarify and beautify your comments using boxes and lines. -- https://github.com/LudoPinelli/comment-box.nvim - { - 'LudoPinelli/comment-box.nvim', - opts = {}, - }, + { 'LudoPinelli/comment-box.nvim', opts = {} }, + -- Automatically expand width of the current window. -- Maximizes and restore it. And all this with nice animations! -- https://github.com/anuvyklack/windows.nvim @@ -135,11 +166,6 @@ return { 'anuvyklack/middleclass', 'anuvyklack/animation.nvim', }, - config = function() - vim.o.winwidth = 15 - vim.o.winminwidth = 10 - vim.o.equalalways = false - require('windows').setup() - end, + opts = {}, }, } diff --git a/config/nvim/lua/plugins/which-key.lua b/config/nvim/lua/plugins/which-key.lua index 9ea35af..a235b19 100644 --- a/config/nvim/lua/plugins/which-key.lua +++ b/config/nvim/lua/plugins/which-key.lua @@ -14,9 +14,6 @@ return { wk.setup() wk.add { - -- Better default experience - { '', '', mode = { 'n', 'v' } }, - -- ╭─────────────────────────────────────────────────────────╮ -- │ With leader │ -- ╰─────────────────────────────────────────────────────────╯ @@ -38,6 +35,10 @@ return { -- ── Code ──────────────────────────────────────────────────────────── { 'c', group = '[c] Code' }, + { 'ca', 'lua vim.lsp.buf.code_action()', desc = 'LSP: Code Action' }, + { 'cr', 'lua vim.lsp.buf.rename()', desc = 'LSP: Rename' }, + { 'cg', 'lua require("neogen").generate()', desc = 'Generate annotations' }, + -- ── Code: CommentBox ──────────────────────────────────────────────── { 'cb', group = 'CommentBox' }, { 'cbb', 'CBccbox', desc = 'CommentBox: Box Title' }, @@ -45,16 +46,51 @@ return { { 'cbl', 'CBline', desc = 'CommentBox: Simple Line' }, { 'cbm', 'CBllbox14', desc = 'CommentBox: Marked' }, { 'cbt', 'CBllline', desc = 'CommentBox: Titled Line' }, + -- Code: package.json control + -- See: lua/plugins/lazy.lua + { 'cn', group = 'package.json control' }, + { 'cnd', 'lua require("package-info").delete()', desc = 'Delete package' }, + { 'cni', 'lua require("package-info").install()', desc = 'Install package' }, + { 'cns', 'lua require("package-info").show({ force = true })', desc = 'Show package info' }, + { 'cnu', 'lua require("package-info").change_version()', desc = 'Change version' }, + -- Code: LSPSaga + -- See: lua/plugins/lsp.lua + { '', 'Lspsaga term_toggle', desc = 'LSPSaga: Open Floaterm' }, + { 'ca', 'Lspsaga code_action', desc = 'LSPSaga: Code Actions' }, + { 'cci', 'Lspsaga incoming_calls', desc = 'LSPSaga: Incoming Calls' }, + { 'cco', 'Lspsaga outgoing_calls', desc = 'LSPSaga: Outgoing Calls' }, + { 'cd', 'Lspsaga show_line_diagnostics', desc = 'LSPSaga: Show Line Diagnostics' }, + { 'cf', 'Lspsaga lsp_finder', desc = 'LSPSaga: LSP Finder' }, + { 'ci', 'Lspsaga implement', desc = 'LSPSaga: Implementations' }, + { 'cl', 'Lspsaga show_cursor_diagnostics', desc = 'LSPSaga: Show Cursor Diagnostics' }, + { 'cp', 'Lspsaga peek_definition', desc = 'LSPSaga: Peek Definition' }, + { 'cr', 'Lspsaga rename', desc = 'LSPSaga: Rename' }, + { 'cR', 'Lspsaga rename ++project', desc = 'LSPSaga: Rename Project wide' }, + { 'cs', 'Lspsaga signature_help', desc = 'LSPSaga: Signature Documentation' }, + { 'ct', 'Lspsaga peek_type_definition', desc = 'LSPSaga: Peek Type Definition' }, + { 'cu', 'Lspsaga preview_definition', desc = 'LSPSaga: Preview Definition' }, + { 'cv', 'Lspsaga diagnostic_jump_prev', desc = 'LSPSaga: Diagnostic Jump Prev' }, + { 'cw', 'Lspsaga diagnostic_jump_next', desc = 'LSPSaga: Diagnostic Jump Next' }, + -- ── DAP ───────────────────────────────────────────────────────────── { 'd', group = '[d] DAP' }, - -- See: lua/plugins/dap.lua - - { 'g', group = '[g] Git' }, - -- See: lua/plugins/git.lua + { 'db', 'DapToggleBreakpoint', desc = 'DAP: Toggle Breakpoint' }, + { 'dc', 'DapContinue', desc = 'DAP: Continue' }, + { 'do', 'lua vim.diagnostic.open_float()', desc = 'Diagnostic: Open float' }, + { 'dq', 'lua vim.diagnostic.setloclist()', desc = 'Diagnostic: Set loc list' }, + { 'dr', ":lua require('dapui').open({reset = true})", desc = 'DAP: Reset' }, + { 'ds', 'lua require("telescope.builtin").lsp_document_symbols()', desc = 'LSP: Document Symbols' }, + { 'dt', 'DapUiToggle', desc = 'DAP: Toggle UI' }, + -- ── Harpoon ───────────────────────────────────────────────────────── { 'h', group = '[h] Harpoon' }, -- See: lua/plugins/harpoon.lua + { 'ha', 'lua require("harpoon"):list():add()', desc = 'harpoon file' }, + { 'hn', 'lua require("harpoon"):list():next()', desc = 'harpoon to next file' }, + { 'hp', 'lua require("harpoon"):list():prev()', desc = 'harpoon to previous file' }, + { 'ht', ":lua require('harpoon.ui').toggle_quick_menu()", desc = 'DAP: Harpoon UI' }, + -- ── LSP ───────────────────────────────────────────────────────────── { 'l', group = '[l] LSP' }, -- See: lua/plugins/lsp.lua @@ -64,33 +100,81 @@ return { { 'qq', ':wq!', desc = 'Quit with force saving' }, { 'qw', ':wq', desc = 'Write and quit' }, + -- ── Search ────────────────────────────────────────────────────────── { 's', group = '[s] Search' }, -- See: lua/plugins/telescope.lua -- ── Toggle ────────────────────────────────────────────────────────── { 't', group = '[t] Toggle' }, - { 'tt', ':TransparentToggle', desc = 'Toggle Transparency' }, + { 'tc', 'CloakToggle', desc = 'Toggle Cloak' }, + { 'tn', ':Noice dismiss', desc = 'Noice dismiss' }, { 'ts', ':noh', desc = 'Toggle Search Highlighting' }, + { 'tt', ':TransparentToggle', desc = 'Toggle Transparency' }, + { 'tw', 'Twilight', desc = 'Toggle Twilight' }, + -- ── Workspace ─────────────────────────────────────────────────────── { 'w', group = '[w] Workspace' }, - { 'x', group = '[x] Trouble' }, - { 'z', group = '[z] FZF' }, + { 'wa', 'lua vim.lsp.buf.add_workspace_folder()', desc = 'LSP: Workspace Add Folder' }, + { 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', desc = 'LSP: Workspace List Folders' }, + { 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', desc = 'LSP: Workspace Remove Folder' }, + { 'ws', 'lua require("telescope.builtin").lsp_dynamic_workspace_symbols()', desc = 'LSP: Workspace Symbols' }, - -- ── Help ──────────────────────────────────────────────────────────── - { '?', group = '[?] Help' }, - { - '?w', - function() - wk.show { global = false } - end, - desc = 'Buffer Local Keymaps (which-key)', - }, + -- Trouble + { 'x', group = '[x] Trouble' }, + { 'xx', 'Trouble', desc = 'Toggle Trouble' }, + { 'xw', 'Trouble workspace_diagnostics', desc = 'Toggle Workspace Diagnostics' }, + { 'xd', 'Trouble document_diagnostics', desc = 'Toggle Document Diagnostics' }, + { 'xl', 'Trouble loclist', desc = 'Toggle Loclist' }, + { 'xq', 'Trouble quickfix', desc = 'Toggle Quickfix' }, + + -- ── FZF ───────────────────────────────────────────────────────────── + { 'z', group = '[z] FZF' }, + -- Stolen from https://github.com/erikw/dotfiles/blob/d68d6274d67ac47afa20b9a0b9f3b0fa54bcdaf3/.config/nvim/lua/plugins.lua + { 'zf', ':FZF', desc = 'FZF: search for files in given path.' }, + { 'zc', ':Commands', desc = 'FZF: search commands.' }, + { 'zt', ':Tags', desc = 'FZF: search in tags file' }, + { 'zb', ':Buffers', desc = 'FZF: search open buffers.' }, + -- Ref: https://medium.com/@paulodiovani/vim-buffers-windows-and-tabs-an-overview-8e2a57c57afa + { 'zt', ':Windows', desc = 'FZF: search open tabs.' }, + { 'zh', ':History', desc = 'FZF: search history of opened files' }, + { 'zm', ':Maps', desc = 'FZF: search mappings.' }, + { 'zg', ':Rg', desc = 'FZF: search with rg (aka live grep).' }, + + -- ── Help & Neoconf ────────────────────────────────────────────────── + { '?', group = '[?] Help & neoconf' }, + { '?c', 'Neoconf', desc = 'Neoconf: Open' }, + { '?g', 'Neoconf global', desc = 'Neoconf: Global' }, + { '?l', 'Neoconf local', desc = 'Neoconf: Local' }, + { '?m', 'Neoconf lsp', desc = 'Neoconf: Show merged LSP config' }, + { '?s', 'Neoconf show', desc = 'Neoconf: Show merged config' }, + { '?w', 'lua require("which-key").show({global = false})', desc = 'Buffer Local Keymaps (which-key)' }, + + -- ── Misc ──────────────────────────────────────────────────────────── + { '1', 'lua require("harpoon"):list():select(1)', desc = 'harpoon to file 1' }, + { '2', 'lua require("harpoon"):list():select(2)', desc = 'harpoon to file 2' }, + { '3', 'lua require("harpoon"):list():select(3)', desc = 'harpoon to file 3' }, + { '4', 'lua require("harpoon"):list():select(4)', desc = 'harpoon to file 4' }, + { '5', 'lua require("harpoon"):list():select(5)', desc = 'harpoon to file 5' }, + { 'D', 'lua vim.lsp.buf.type_definition()', desc = 'LSP: Type Definition' }, + { 'e', ':Neotree reveal', desc = 'NeoTree reveal' }, -- ╭─────────────────────────────────────────────────────────╮ -- │ Without leader │ -- ╰─────────────────────────────────────────────────────────╯ { 'y', group = 'Yank & Surround' }, + { 'gp', group = 'Goto Preview' }, + { 'gpd', 'lua require("goto-preview").goto_preview_definition()' }, + { 'gpi', 'lua require("goto-preview").goto_preview_implementation()' }, + { 'gpP', 'lua require("goto-preview").close_all_windows()' }, + + -- ── tmux navigation ───────────────────────────────────────────────── + { '', 'TmuxNavigateLeft', desc = 'tmux: Navigate Left' }, + { '', 'TmuxNavigateDown', desc = 'tmux: Navigate Down' }, + { '', 'TmuxNavigateUp', desc = 'tmux: Navigate Up' }, + { '', 'TmuxNavigateRight', desc = 'tmux: Navigate Right' }, + { '', 'TmuxNavigatePrevious', desc = 'tmux: Navigate Previous' }, + -- ── Old habits ────────────────────────────────────────────────────── { '', ':w', desc = 'Save file' }, @@ -100,7 +184,20 @@ return { { 'J', ":m '>+1gv=gv", desc = 'Move Block Down', mode = 'v' }, { 'K', ":m '<-2gv=gv", desc = 'Move Block Up', mode = 'v' }, + -- ── LSP ───────────────────────────────────────────────────────────── + { '', 'lua vim.lsp.buf.signature_help()', desc = 'LSP: Signature Documentation' }, + { 'K', 'Lspsaga hover_doc', desc = 'LSPSaga: Hover Documentation' }, + { 'dn', 'lua vim.diagnostic.goto_next()', desc = 'Diagnostic: Goto Next' }, + { 'dp', 'lua vim.diagnostic.goto_prev()', desc = 'Diagnostic: Goto Prev' }, + { 'gD', 'lua vim.lsp.buf.declaration()', desc = 'LSP: Goto Declaration' }, + { 'gI', 'lua vim.lsp.buf.implementation()', desc = 'LSP: Goto Implementation' }, + { 'gR', 'Trouble lsp_references', desc = 'Toggle LSP References' }, + { 'gd', 'lua vim.lsp.buf.definition()', desc = 'LSP: Goto Definition' }, + { 'gr', 'lua require("telescope.builtin").lsp_references()', desc = 'LSP: Goto References' }, + -- ── Misc keybinds ─────────────────────────────────────────────────── + -- Sublime-like shortcut 'go to file' ctrl+p. + { '', ':Files', desc = 'FZF: search for files starting at current directory.' }, { 'QQ', ':q!', desc = 'Quit without saving' }, { 'WW', ':w!', desc = 'Force write to file' }, { 'ss', ':noh', desc = 'Clear Search Highlighting' }, diff --git a/config/nvim/spell/en.utf-8.add b/config/nvim/spell/en.utf-8.add index 30b33b5..9bc4fb4 100644 --- a/config/nvim/spell/en.utf-8.add +++ b/config/nvim/spell/en.utf-8.add @@ -11,3 +11,103 @@ good #rd/! #rd wrd/! +neovim +github +folke +nvim +keybinds +https +CommentBox +lua +dap +lsp +wincmd +CTRL +hjkl +resizing +noh +UiEnter +signcolumn +popup +whitespace +listchars +completeopt +Autoformat +stevearc +isort +formatters +formatter +hrsh7th +cmp +repos +editorconfig +rmagatti +goto +UI +api +configs +bufhidden +ThePrimeagen +preservim +tpope +todo +lukas +reineke +blankline +tabstop +shiftwidth +wakatime +numToStr +zbirenbaum +onsails +lspkind +pictograms +vscode +SergioRibera +dotenv +config +schemaStore +TypeError +dev +Automagically +runtime +discoverable +lspconfig +pre +LSPs +Stylelint +CSS +PHP +GitLab +ESLint +Ansible +Terraform +TypeScript +JS +Vue +YAML +LSPSaga +luasnip +saadparwaiz1 +LuaSnip +L3MON4D3 +jumplist +textobjects +scm +textobj +treesitter +statusline +lualine +ivuorinen's +lazylazy +cmdline +popupmenu +noice +statuscolumn +TreeSitter +ivuorinen +github +github +Tampere +Logrotate +sysvinit diff --git a/config/nvim/spell/en.utf-8.add.spl b/config/nvim/spell/en.utf-8.add.spl new file mode 100644 index 0000000..28e7192 Binary files /dev/null and b/config/nvim/spell/en.utf-8.add.spl differ