From 73e6f8a321a6c15a950a49a7d00093459b12569b Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Sat, 2 Sep 2023 22:34:03 +0300 Subject: [PATCH] feat(nvim): combined and removed plugins --- config/nvim/init.lua | 1 + config/nvim/lazy-lock.json | 10 +- config/nvim/lua/lsp.lua | 1 + config/nvim/lua/options.lua | 34 ++- config/nvim/lua/plugins/lazy.lua | 247 ++++++++++-------- config/nvim/lua/plugins/legendary.lua | 20 -- config/nvim/lua/plugins/neo-tree.lua | 147 +++++++---- config/nvim/lua/plugins/nvim-cmp.lua | 4 +- config/nvim/lua/plugins/nvim-dap.lua | 9 +- config/nvim/lua/plugins/nvim-surround.lua | 17 -- .../lua/plugins/nvim-treesitter-context.lua | 9 - config/nvim/lua/plugins/nvim-treesitter.lua | 217 ++++++++------- config/nvim/lua/plugins/telescope-nvim.lua | 98 ++++--- config/nvim/lua/plugins/trouble.lua | 114 +++++--- config/nvim/lua/plugins/twilight.lua | 4 +- config/nvim/lua/plugins/vim-hexokinase.lua | 54 ---- 16 files changed, 529 insertions(+), 457 deletions(-) delete mode 100644 config/nvim/lua/plugins/legendary.lua delete mode 100644 config/nvim/lua/plugins/nvim-surround.lua delete mode 100644 config/nvim/lua/plugins/nvim-treesitter-context.lua delete mode 100644 config/nvim/lua/plugins/vim-hexokinase.lua diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 33bd240..8ae75a4 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -1,3 +1,4 @@ +-- luacheck: globals vim local key = vim.api.nvim_set_keymap local remap = { noremap = true, silent = true } diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index fbdf7b3..ee00107 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -10,6 +10,7 @@ "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, "cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, @@ -21,13 +22,12 @@ "gitsigns.nvim": { "branch": "main", "commit": "d927caa075df63bf301d92f874efb72fd22fd3b4" }, "harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" }, "lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" }, - "legendary.nvim": { "branch": "master", "commit": "3db15cae08d63bab40d0c38474e368f97414f090" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" }, "mason.nvim": { "branch": "main", "commit": "0942198fb9a998b6ccee36fb8dd7495eb8ba659c" }, "mini.nvim": { "branch": "main", "commit": "296ebbbd3e5ba5e43f5125efe18ad76fe3b632cc" }, - "neo-tree.nvim": { "branch": "main", "commit": "71d5559f7fa8e28a51570134e300b62f141a2f34" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, "neodev.nvim": { "branch": "main", "commit": "183f5a7357397260b631d6cccceccc3621b50f78" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, "nui.nvim": { "branch": "main", "commit": "aa1b4c1e05983ff7debd2b4b2788651db099de2f" }, @@ -41,11 +41,10 @@ "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" }, "nvim-regexplainer": { "branch": "main", "commit": "4250c8f3c1307876384e70eeedde5149249e154f" }, "nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" }, - "nvim-treesitter": { "branch": "master", "commit": "e60057b389208518c8737f5a5e5f0cda72249a5e" }, + "nvim-treesitter": { "branch": "master", "commit": "17b943e7c5cc2b2db3ac7b5720fbd42e75a00d8d" }, "nvim-treesitter-context": { "branch": "master", "commit": "31692b26d76ff1f7c6e0ab51814dd55e7417e96c" }, "nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" }, "nvim-window-picker": { "branch": "main", "commit": "1b1bb834b0acb9eebb11a61664efc665757f1ba2" }, - "oxocarbon.nvim": { "branch": "main", "commit": "162a92e2bcca588a01c2f9fd857bdb4dabd8d72c" }, "plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "refactoring.nvim": { "branch": "master", "commit": "2ec9bc0fb5f3c8c6a0f776f0159dd2a3b1663554" }, @@ -53,15 +52,14 @@ "schemastore.nvim": { "branch": "main", "commit": "a6759df4dcfc052246ee7a6cccfdb37d2180d617" }, "smartcolumn.nvim": { "branch": "main", "commit": "4aa00ad766f3c0f0e2561e0eb42df3ea3743c135" }, "stickybuf.nvim": { "branch": "master", "commit": "4c667bc837e5e3fec5a8857ee99f1a229fc76df9" }, + "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, "tabnine": { "branch": "master", "commit": "dcca6d2f9e8bbcde36aab87b9b87890810e4056d" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "ad7b637c72549713b9aaed7c4f9c79c62bcbdff0" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, "telescope.nvim": { "branch": "master", "commit": "2c1ed33a6f6f2db3b69f5421f6b405eda1b07748" }, "trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" }, "twilight.nvim": { "branch": "main", "commit": "a4843e6e67092a1e6fa9666f02bf0ab59174c1df" }, - "vim-hexokinase": { "branch": "master", "commit": "62324b43ea858e268fb70665f7d012ae67690f43" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, - "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, "vim-vsnip": { "branch": "master", "commit": "7753ba9c10429c29d25abfd11b4c60b76718c438" }, "vim-vsnip-integ": { "branch": "master", "commit": "1914e72cf3de70df7f5dde476cd299aba2440aef" }, "vim-wakatime": { "branch": "master", "commit": "0d2efa2daff34b27b0d227d4c3b136811c93db93" }, diff --git a/config/nvim/lua/lsp.lua b/config/nvim/lua/lsp.lua index cf279d0..ed327f4 100644 --- a/config/nvim/lua/lsp.lua +++ b/config/nvim/lua/lsp.lua @@ -1,4 +1,5 @@ -- Completion for snippets. +-- luacheck: globals vim CAPABILITIES CAPABILITIES = vim.lsp.protocol.make_client_capabilities() CAPABILITIES = require("cmp_nvim_lsp").default_capabilities(CAPABILITIES) CAPABILITIES.textDocument.completion.completionItem.snippetSupport = true diff --git a/config/nvim/lua/options.lua b/config/nvim/lua/options.lua index 885ed84..1cf31a8 100644 --- a/config/nvim/lua/options.lua +++ b/config/nvim/lua/options.lua @@ -1,5 +1,4 @@ -local option = vim.api.nvim_set_option -local set = vim.api.nvim_set_var +-- luacheck: globals vim -- Fix moving through lines 'gk' and 'gj' vim.wo.linebreak = true @@ -123,28 +122,37 @@ vim.o.shortmess = vim.o.shortmess .. "c" -- Menu Transparency. vim.go.pumblend = 10 ---------------------Variables----------------- +-- ╭──────────────────────────────────────────────────────────╮ +-- │ Variables │ +-- ╰──────────────────────────────────────────────────────────╯ -set("one_allow_itali:set cursorlinec:set cursorlines", 1) -set("do_filetype_lua", 1) -set("MRU_File", "~/.cache/vim_mru_files") +vim.api.nvim_set_var("one_allow_itali:set cursorlinec:set cursorlines", 1) +vim.api.nvim_set_var("do_filetype_lua", 1) +vim.api.nvim_set_var("MRU_File", "~/.cache/vim_mru_files") ---------------------API------------------------ +-- ╭──────────────────────────────────────────────────────────╮ +-- │ API │ +-- ╰──────────────────────────────────────────────────────────╯ -- Change title accordingly. -option("title", true) +vim.api.nvim_set_option("title", true) -- Set clipboard to be global across the system -option("clipboard", "unnamedplus") +vim.api.nvim_set_option("clipboard", "unnamedplus") -- Basic fold column -option("foldcolumn", "1") +vim.api.nvim_set_option("foldcolumn", "1") -- Set dictionary to language spell -option("dictionary", "/usr/share/dict/words") +vim.api.nvim_set_option("dictionary", "/usr/share/dict/words") -- Wildignore for when opening files :0 -option("wildignore", "*/tmp*/,*/node_modules/*,_site,*/__pycache__/,*/venv/*,*/target/*,*/.vim$,~$,*/.log") +vim.api.nvim_set_option( + "wildignore", + "*/tmp*/,*/node_modules/*,_site,*/__pycache__/,*/venv/*,*/target/*,*/.vim$,~$,*/.log" +) -- Folding -option("foldmethod", "indent") +vim.api.nvim_set_option("foldmethod", "syntax") +vim.api.nvim_set_option('foldenable', false) +vim.api.nvim_set_option('foldminlines', 5) diff --git a/config/nvim/lua/plugins/lazy.lua b/config/nvim/lua/plugins/lazy.lua index 7594b4c..8fdae9e 100644 --- a/config/nvim/lua/plugins/lazy.lua +++ b/config/nvim/lua/plugins/lazy.lua @@ -1,12 +1,109 @@ +-- luacheck: globals vim + return { - -- Plenary is used by many other plugins - { "nvim-lua/plenary.nvim", lazy = true }, + -- plenary: full; complete; entire; absolute; unqualified. + -- All the lua functions I don't want to write twice. + -- https://github.com/nvim-lua/plenary.nvim + { "nvim-lua/plenary.nvim", lazy = true }, - -- Icons on menu - "onsails/lspkind-nvim", + -- lua `fork` of vim-web-devicons for neovim + -- https://github.com/nvim-tree/nvim-web-devicons + { "kyazdani42/nvim-web-devicons" }, - -- Restore folds and cursor position - "senderle/restoreview", + -- The theme of choise, catppuccin + -- https://github.com/catppuccin/nvim + { + "catppuccin/nvim", + name = "catppuccin", + priority = 10000, + enabled = true, + lazy = false, + config = function() vim.cmd.colorscheme("catppuccin") end, + opts = { + flavour = "mocha", + transparent_background = true, + dim_inactive = { + enabled = true, + shade = "dark", + percentage = 0.15, + }, + integrations = { + aerial = true, + barbecue = { + -- directory name is dimmed by default + dim_dirname = true, + bold_basename = true, + dim_context = false, + alt_background = false, + }, + cmp = true, + dap = { enabled = true, enable_ui = true }, + gitsigns = true, + harpoon = true, + indent_blankline = { + enabled = true, + colored_indent_levels = false, + }, + mason = true, + neotree = true, + notify = true, + native_lsp = { + enabled = true, + virtual_text = { + errors = { "italic" }, + hints = { "italic" }, + warnings = { "italic" }, + information = { "italic" }, + }, + underlines = { + errors = { "underline" }, + hints = { "underline" }, + warnings = { "underline" }, + information = { "underline" }, + }, + inlay_hints = { + background = true, + }, + }, + semantic_tokens = true, + symbols_outline = true, + telescope = { + enabled = true, + style = "catppuccin", + }, + treesitter = true, + lsp_trouble = true, + which_key = true, + }, + }, + }, + + -- Notifications as a popup + -- https://github.com/rcarriga/nvim-notify + { + "rcarriga/nvim-notify", + keys = { + { + "un", + function() require("notify").dismiss({ silent = true, pending = true }) end, + desc = "Dismiss all Notifications", + }, + }, + opts = { + timeout = 3000, + max_height = function() return math.floor(vim.o.lines * 0.75) end, + max_width = function() return math.floor(vim.o.columns * 0.75) end, + }, + init = function() vim.notify = require("notify") end, + }, + + -- vscode-like pictograms for neovim lsp completion items + -- https://github.com/onsails/lspkind.nvim + { "onsails/lspkind-nvim" }, + + -- Save and restore Vim views automatically + -- https://github.com/senderle/restoreview + { "senderle/restoreview" }, -- Create key bindings that stick. WhichKey is a lua plugin for Neovim that -- displays a popup with possible keybindings of the command you started typing. @@ -43,100 +140,41 @@ return { end, }, - -- The theme of choise, catppuccin - ---- https://github.com/catppuccin/nvim + -- Add/change/delete surrounding delimiter pairs with ease. + -- https://github.com/kylechui/nvim-surround { - "catppuccin/nvim", - name = "catppuccin", - priority = 10000, - enabled = true, - lazy = false, - config = function() vim.cmd.colorscheme("catppuccin") end, + --[[ + Old text Command New text + ------------------------------------------------------------------ + surround_words ysiw) (surround_words) + make strings ys$" "make strings" + [delete ar*ound me!] ds] delete around me! + "change quot*es" cs'" "change quotes" + or tag* types csth1

or tag types

+ delete(functi*on calls) dsf function calls + ]] + "kylechui/nvim-surround", + version = "*", -- Use for stability; omit to use `main` branch for the latest features + event = "VeryLazy", + config = function() + require("nvim-surround").setup() + end, + }, + + -- A tree like view for symbols in Neovim using the LSP. + -- https://github.com/simrat39/symbols-outline.nvim + { + "simrat39/symbols-outline.nvim", + cmd = "SymbolsOutline", + keys = { { "bs", "SymbolsOutline", desc = "Symbols Outline" } }, opts = { - flavour = "mocha", - transparent_background = true, - dim_inactive = { - enabled = true, - shade = "dark", - percentage = 0.15, - }, - integrations = { - aerial = true, - barbecue = { - dim_dirname = true, -- directory name is dimmed by default - bold_basename = true, - dim_context = false, - alt_background = false, - }, - cmp = true, - dap = { enabled = true, enable_ui = true }, - gitsigns = true, - harpoon = true, - indent_blankline = { - enabled = true, - colored_indent_levels = false, - }, - mason = true, - neotree = true, - notify = true, - nvimtree = false, - native_lsp = { - enabled = true, - virtual_text = { - errors = { "italic" }, - hints = { "italic" }, - warnings = { "italic" }, - information = { "italic" }, - }, - underlines = { - errors = { "underline" }, - hints = { "underline" }, - warnings = { "underline" }, - information = { "underline" }, - }, - inlay_hints = { - background = true, - }, - }, - semantic_tokens = true, - symbols_outline = true, - telescope = { - enabled = true, - style = "catppuccin", - }, - ts_rainbow = true, - treesitter = true, - lsp_trouble = true, - which_key = true, - }, + -- add your options that should be passed to the setup() function here + position = "right", }, }, - -- Notifications as a popup - -- https://github.com/rcarriga/nvim-notify - { - "rcarriga/nvim-notify", - keys = { - { - "un", - function() require("notify").dismiss({ silent = true, pending = true }) end, - desc = "Dismiss all Notifications", - }, - }, - opts = { - timeout = 3000, - max_height = function() return math.floor(vim.o.lines * 0.75) end, - max_width = function() return math.floor(vim.o.columns * 0.75) end, - }, - init = function() vim.notify = require("notify") end, - }, - - { - "dstein64/vim-startuptime", - cmd = "StartupTime", - config = function() vim.g.startuptime_tries = 10 end, - }, - + -- Getting you where you want with the fewest keystrokes. + -- https://github.com/ThePrimeagen/harpoon { "ThePrimeagen/harpoon" }, -- A Neovim plugin hiding your colorcolumn when unneeded. @@ -150,27 +188,28 @@ return { }, -- Status information for LSP. - "j-hui/fidget.nvim", + -- https://github.com/j-hui/fidget.nvim + { "j-hui/fidget.nvim" }, -- Close buffer without messing up with the window. - "famiu/bufdelete.nvim", + -- https://github.com/famiu/bufdelete.nvim + { "famiu/bufdelete.nvim" }, -- Delete multiple vim buffers based on different conditions -- https://github.com/kazhala/close-buffers.nvim - "kazhala/close-buffers.nvim", - - "nyoom-engineering/oxocarbon.nvim", + { "kazhala/close-buffers.nvim" }, -- JSONLS - "b0o/schemastore.nvim", + -- https://github.com/b0o/schemastore.nvim + { "b0o/schemastore.nvim" }, -- sleuth.vim: Heuristically set buffer options -- https://github.com/tpope/vim-sleuth - "tpope/vim-sleuth", + { "tpope/vim-sleuth" }, -- Neovim plugin for locking a buffer to a window -- https://github.com/stevearc/stickybuf.nvim - { "stevearc/stickybuf.nvim", opts = {} }, + { "stevearc/stickybuf.nvim", opts = {} }, -- Describe the regexp under the cursor -- https://github.com/bennypowers/nvim-regexplainer @@ -190,6 +229,8 @@ return { -- https://github.com/LudoPinelli/comment-box.nvim { "LudoPinelli/comment-box.nvim", opts = {} }, + -- Tabnine Client for Neovim + -- https://github.com/codota/tabnine-nvim { "codota/tabnine-nvim", name = "tabnine", diff --git a/config/nvim/lua/plugins/legendary.lua b/config/nvim/lua/plugins/legendary.lua deleted file mode 100644 index 796b121..0000000 --- a/config/nvim/lua/plugins/legendary.lua +++ /dev/null @@ -1,20 +0,0 @@ --- 🗺️ A legend for your keymaps, commands, and autocmds, with which-key.nvim integration --- https://github.com/mrjones2014/legendary.nvim -return { - "mrjones2014/legendary.nvim", - version = "*", - -- since legendary.nvim handles all your keymaps/commands, - -- its recommended to load legendary.nvim before other plugins - priority = 10000, - lazy = false, - -- sqlite is only needed if you want to use frecency sorting - -- dependencies = { 'kkharji/sqlite.lua' } - opts = { - lazy_nvim = { - auto_register = true, - }, - which_key = { - auto_register = true, - }, - }, -} diff --git a/config/nvim/lua/plugins/neo-tree.lua b/config/nvim/lua/plugins/neo-tree.lua index e2c8415..ad5bb72 100644 --- a/config/nvim/lua/plugins/neo-tree.lua +++ b/config/nvim/lua/plugins/neo-tree.lua @@ -1,4 +1,6 @@ -- File-tree manager. +-- https://github.com/nvim-neo-tree/neo-tree.nvim +-- luacheck: globals vim -- Unless you are still migrating, remove the deprecated commands from v1.x vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) @@ -7,7 +9,7 @@ return { "nvim-neo-tree/neo-tree.nvim", dependencies = { "nvim-lua/plenary.nvim", - "kyazdani42/nvim-web-devicons", -- not strictly required, but recommended + "kyazdani42/nvim-web-devicons", "MunifTanjim/nui.nvim", { -- only needed if you want to use the commands with "_with_window_picker" suffix @@ -39,13 +41,17 @@ return { vim.fn.sign_define("DiagnosticSignHint", { text = "󰌵", texthl = "DiagnosticSignHint" }) require("neo-tree").setup({ - close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab - popup_border_style = "rounded", -- "double", "none", "rounded", "shadow", "single" or "solid" + -- Close Neo-tree if it is the last window left in the tab + close_if_last_window = true, + -- "double", "none", "rounded", "shadow", "single" or "solid" + popup_border_style = "rounded", enable_git_status = true, enable_diagnostics = true, - enable_normal_mode_for_inputs = false, -- Enable normal mode for input dialogs. + -- Enable normal mode for input dialogs. + enable_normal_mode_for_inputs = false, - open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes + -- when opening files, do not use windows containing these filetypes or buftypes + open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- popup_border_style is for input and confirmation dialogs. -- Configurtaion of floating window is done in the individual source sections. @@ -53,13 +59,20 @@ return { close_floats_on_escape_key = true, default_source = "filesystem", git_status_async = true, - log_level = "info", -- "trace", "debug", "info", "warn", "error", "fatal" - log_to_file = false, -- true, false, "/path/to/file.log", use :NeoTreeLogs to show the file - open_files_in_last_window = true, -- false = open files in top left window - resize_timer_interval = 100, -- in ms, needed for containers to redraw right aligned and faded content - sort_case_insensitive = true, -- used when sorting files and directories in the tree - use_popups_for_input = false, -- If false, inputs will use vim.ui.input() instead of custom floats. - sort_function = nil, -- use a custom function for sorting files and directories in the tree + -- "trace", "debug", "info", "warn", "error", "fatal" + log_level = "info", + -- true, false, "/path/to/file.log", use :NeoTreeLogs to show the file + log_to_file = false, + -- false = open files in top left window + open_files_in_last_window = true, + -- in ms, needed for containers to redraw right aligned and faded content + resize_timer_interval = 100, + -- used when sorting files and directories in the tree + sort_case_insensitive = true, + -- If false, inputs will use vim.ui.input() instead of custom floats. + use_popups_for_input = false, + -- use a custom function for sorting files and directories in the tree + sort_function = nil, event_handlers = { -- { @@ -121,14 +134,16 @@ return { }, indent = { indent_size = 2, - padding = 1, -- extra padding on left hand side + -- extra padding on left hand side + padding = 1, -- indent guides with_markers = true, indent_marker = "│", last_indent_marker = "└", highlight = "NeoTreeIndentMarker", -- expander config, needed for nesting files - with_expanders = true, -- if nil and file nesting is enabled, will enable expanders + -- if nil and file nesting is enabled, will enable expanders + with_expanders = true, expander_collapsed = "", expander_expanded = "", expander_highlight = "NeoTreeExpander", @@ -155,10 +170,10 @@ return { git_status = { symbols = { -- Change type - added = "˖", -- or "✚", but this is redundant info if you use git_status_colors on the name - modified = "±", -- or "", but this is redundant info if you use git_status_colors on the name - deleted = "✕", -- this can only be used in the git_status source - renamed = "↪", -- this can only be used in the git_status source + added = "˖", + modified = "±", + deleted = "✕", + renamed = "↪", -- Status type untracked = "?", ignored = "⍨", @@ -223,15 +238,20 @@ return { -- that will be available in all sources (if not overridden in `opts[source_name].commands`) -- see `:h neo-tree-custom-commands-global` commands = {}, - window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for + window = { + -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for -- possible options. These can also be functions that return these options. - position = "left", -- left, right, float, current - width = 40, -- applies to left and right positions + + -- left, right, float, current + position = "left", + -- applies to left and right positions + width = 40, mapping_options = { noremap = true, nowait = true, }, - popup = { -- settings that apply to float position only + -- settings that apply to float position only + popup = { size = { height = "80%", width = "50%", @@ -245,11 +265,14 @@ return { mappings = { [""] = { "toggle_node", - nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use + -- disable `nowait` if you have existing combos + -- starting with this char that you want to use + nowait = false, }, ["<2-LeftMouse>"] = "open", [""] = "open", - [""] = "cancel", -- close preview or floating neo-tree window + -- close preview or floating neo-tree window + [""] = "cancel", ["P"] = { "toggle_preview", config = { use_float = true } }, ["l"] = "focus_preview", ["S"] = "open_split", @@ -260,33 +283,41 @@ return { -- [""] = "open_drop", -- ["t"] = "open_tab_drop", ["w"] = "open_with_window_picker", - --["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing + -- -- enter preview mode, which shows the current node without focusing + --["P"] = "toggle_preview", ["C"] = "close_node", -- ['C'] = 'close_all_subnodes', ["z"] = "close_all_nodes", --["Z"] = "expand_all_nodes", ["a"] = { "add", - -- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details - -- some commands may take optional config options, see `:h neo-tree-mappings` for details + -- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). + -- see `:h neo-tree-file-actions` for details + -- some commands may take optional config options, + -- see `:h neo-tree-mappings` for details config = { - show_path = "none", -- "none", "relative", "absolute" + -- "none", "relative", "absolute" + show_path = "relative", }, }, - ["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion. + -- also accepts the optional config.show_path option like "add". + -- this also supports BASH style brace expansion. + ["A"] = "add_directory", ["d"] = "delete", ["r"] = "rename", ["y"] = "copy_to_clipboard", ["x"] = "cut_to_clipboard", ["p"] = "paste_from_clipboard", - ["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add": + -- takes text input for destination, also accepts the optional config.show_path option like "add": -- ["c"] = { -- "copy", -- config = { -- show_path = "none" -- "none", "relative", "absolute" -- } --} - ["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add". + ["c"] = "copy", + -- takes text input for destination, also accepts the optional config.show_path option like "add". + ["m"] = "move", ["q"] = "close_window", ["R"] = "refresh", ["?"] = "show_help", @@ -296,9 +327,10 @@ return { }, nesting_rules = {}, filesystem = { - commands = {}, -- Add a custom command or override a global one using the same function name + -- Add a custom command or override a global one using the same function name + commands = {}, components = { - harpoon_index = function(config, node, state) + harpoon_index = function(config, node, _) local Marked = require("harpoon.mark") local path = node:get_id() local succuss, index = pcall(Marked.get_index_of, path) @@ -313,10 +345,12 @@ return { end, }, filtered_items = { - visible = false, -- when true, they will just be displayed differently than normal items + -- when true, they will just be displayed differently than normal items + visible = false, hide_dotfiles = false, hide_gitignored = false, - hide_hidden = true, -- only works on Windows for hidden files/directories + -- only works on Windows for hidden files/directories + hide_hidden = true, hide_by_name = { ".git", ".DS_Store", @@ -325,7 +359,8 @@ return { ".mypy_cache", "node_modules", }, - hide_by_pattern = { -- uses glob style patterns + -- uses glob style patterns + hide_by_pattern = { --"*.meta", --"*/src/*/tsconfig.json", "*-cache", @@ -342,26 +377,34 @@ return { }, }, find_by_full_path_words = true, - group_empty_dirs = false, -- when true, empty folders will be grouped together - bind_to_cwd = false, -- true creates a 2-way binding between vim's cwd and neo-tree's root - search_limit = 50, -- max number of search results when using filters + -- when true, empty folders will be grouped together + group_empty_dirs = false, + -- true creates a 2-way binding between vim's cwd and neo-tree's root + bind_to_cwd = false, + -- max number of search results when using filters + search_limit = 50, follow_current_file = { - enabled = false, -- This will find and focus the file in the active buffer every time - -- -- the current file is changed while the tree is open. - leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` + -- This will find and focus the file in the active buffer every time + -- the current file is changed while the tree is open. + enabled = false, + -- `false` closes auto expanded dirs, such as with `:Neotree reveal` + leave_dirs_open = false, }, - hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree + -- netrw disabled, opening a directory opens neo-tree -- in whatever position is specified in window.position -- "open_current", -- netrw disabled, opening a directory opens within the -- window like netrw would, regardless of window.position -- "disabled", -- netrw left alone, neo-tree does not handle opening dirs - use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes + hijack_netrw_behavior = "open_default", + -- This will use the OS level file watchers to detect changes -- instead of relying on nvim autocmd events. + use_libuv_file_watcher = true, window = { mappings = { ["."] = "set_root", ["/"] = "fuzzy_finder", - ["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm + -- fuzzy sorting using the fzy algorithm + ["#"] = "fuzzy_sorter", [""] = "navigate_up", [""] = "navigate_up", [""] = "clear_filter", @@ -371,7 +414,8 @@ return { ["gp"] = "prev_git_modified", ["H"] = "toggle_hidden", }, - fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode + -- define keymaps for filter popup window in fuzzy_finder_mode + fuzzy_finder_mappings = { [""] = "move_cursor_down", [""] = "move_cursor_down", [""] = "move_cursor_up", @@ -381,11 +425,14 @@ return { }, buffers = { follow_current_file = { - enabled = true, -- This will find and focus the file in the active buffer every time - -- -- the current file is changed while the tree is open. - leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` + -- This will find and focus the file in the active buffer every time + -- the current file is changed while the tree is open. + enabled = true, + -- `false` closes auto expanded dirs, such as with `:Neotree reveal` + leave_dirs_open = true, }, - group_empty_dirs = true, -- when true, empty folders will be grouped together + -- when true, empty folders will be grouped together + group_empty_dirs = true, show_unloaded = true, window = { mappings = { diff --git a/config/nvim/lua/plugins/nvim-cmp.lua b/config/nvim/lua/plugins/nvim-cmp.lua index e075af1..35c8902 100644 --- a/config/nvim/lua/plugins/nvim-cmp.lua +++ b/config/nvim/lua/plugins/nvim-cmp.lua @@ -1,3 +1,4 @@ +-- luacheck: globals vim -- Completion menu. -- Icons to display. @@ -140,6 +141,7 @@ return { -- Formatting the menu display. formatting = { + expandable_indicator = true, fields = { "kind", "abbr", "menu" }, format = function(_, vim_item) vim_item.menu = vim_item.kind @@ -202,7 +204,7 @@ return { { name = "nvim_lsp", priority = 11, - --max_item_count = 10, + max_item_count = 10, }, -- Snippets in general to facilitate life. diff --git a/config/nvim/lua/plugins/nvim-dap.lua b/config/nvim/lua/plugins/nvim-dap.lua index 2a91cc6..094cecf 100644 --- a/config/nvim/lua/plugins/nvim-dap.lua +++ b/config/nvim/lua/plugins/nvim-dap.lua @@ -1,10 +1,8 @@ -- -- Shows how to use the DAP plugin to debug your code. -- --- Primarily focused on configuring the debugger for Go, but can --- be extended to other languages as well. That's why it's called --- kickstart.nvim and not kitchen-sink.nvim ;) - +-- https://github.com/mfussenegger/nvim-dap +-- luacheck: globals vim return { "mfussenegger/nvim-dap", dependencies = { @@ -30,7 +28,7 @@ return { -- You can provide additional configuration to the handlers, -- see mason-nvim-dap README for more information - handlers = {}, + -- handlers = {}, -- You'll need to check that you have the required things installed -- online, please don't ask me how to install them :) @@ -39,6 +37,7 @@ return { "bash", "delve", "js", + "lua", "php", "python", }, diff --git a/config/nvim/lua/plugins/nvim-surround.lua b/config/nvim/lua/plugins/nvim-surround.lua deleted file mode 100644 index 130c9ef..0000000 --- a/config/nvim/lua/plugins/nvim-surround.lua +++ /dev/null @@ -1,17 +0,0 @@ ---[[ - Old text Command New text --------------------------------------------------------------------------------- - surround_words ysiw) (surround_words) - make strings ys$" "make strings" - [delete ar*ound me!] ds] delete around me! - "change quot*es" cs'" "change quotes" - or tag* types csth1

or tag types

- delete(functi*on calls) dsf function calls -]] - -return { - "kylechui/nvim-surround", - version = "*", -- Use for stability; omit to use `main` branch for the latest features - event = "VeryLazy", - config = function() require("nvim-surround").setup() end, -} diff --git a/config/nvim/lua/plugins/nvim-treesitter-context.lua b/config/nvim/lua/plugins/nvim-treesitter-context.lua deleted file mode 100644 index 4a13dd0..0000000 --- a/config/nvim/lua/plugins/nvim-treesitter-context.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter-context", - lazy = false, - enabled = true, - opts = { - enable = true, - mode = "cursor", -- cursor, or topline - }, -} diff --git a/config/nvim/lua/plugins/nvim-treesitter.lua b/config/nvim/lua/plugins/nvim-treesitter.lua index 033f227..3cc8a33 100644 --- a/config/nvim/lua/plugins/nvim-treesitter.lua +++ b/config/nvim/lua/plugins/nvim-treesitter.lua @@ -1,110 +1,133 @@ --- Treesitter (more highlight for syntax_on). - +-- Nvim Treesitter configurations and abstraction layer +-- https://github.com/nvim-treesitter/nvim-treesitter +-- luacheck: globals vim return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function() - require("nvim-treesitter.configs").setup({ - -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { - "bash", - "c", - "cmake", - "comment", - "diff", - "dockerfile", - "gitignore", - "go", - "graphql", - "html", - "javascript", - "json", - "json5", - "latex", - "lua", - "markdown", - "php", - "phpdoc", - "python", - "regex", - "scss", - "terraform", - "todotxt", - "toml", - "tsx", - "typescript", - "vim", - "vimdoc", - "vue", - "yaml", - }, + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + require("nvim-treesitter.configs").setup({ + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, - -- Autoinstall languages that are not installed. - 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, - highlight = { - enable = true, - disable = {}, - --injections = { - -- python = { - -- docstrings: "markdown", - -- }, - --} - }, - indent = { enable = true }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = "", - node_decremental = "", + -- List of parsers to ignore installing (or "all") + ignore_install = {}, + + modules = {}, + + -- Add languages to be installed here that you want installed for treesitter + ensure_installed = { + "bash", + "c", + "cmake", + "comment", + "diff", + "dockerfile", + "gitignore", + "go", + "graphql", + "html", + "javascript", + "json", + "json5", + "latex", + "lua", + "markdown", + "php", + "phpdoc", + "python", + "regex", + "scss", + "terraform", + "todotxt", + "toml", + "tsx", + "typescript", + "vim", + "vimdoc", + "vue", + "yaml", }, - }, - textobjects = { - select = { + + highlight = { + enable = true, + disable = {}, + --injections = { + -- python = { + -- docstrings: "markdown", + -- }, + --} + }, + indent = { enable = true }, + incremental_selection = { enable = true, - lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["aa"] = "@parameter.outer", - ["ia"] = "@parameter.inner", - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", + init_selection = "", + node_incremental = "", + scope_incremental = "", + node_decremental = "", }, }, - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - ["]m"] = "@function.outer", - ["]]"] = "@class.outer", + textobjects = { + select = { + enable = true, + -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["aa"] = "@parameter.outer", + ["ia"] = "@parameter.inner", + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, }, - goto_next_end = { - ["]M"] = "@function.outer", - ["]["] = "@class.outer", + move = { + enable = true, + -- whether to set jumps in the jumplist + set_jumps = true, + goto_next_start = { + ["]m"] = "@function.outer", + ["]]"] = "@class.outer", + }, + goto_next_end = { + ["]M"] = "@function.outer", + ["]["] = "@class.outer", + }, + goto_previous_start = { + ["[m"] = "@function.outer", + ["[["] = "@class.outer", + }, + goto_previous_end = { + ["[M"] = "@function.outer", + ["[]"] = "@class.outer", + }, }, - goto_previous_start = { - ["[m"] = "@function.outer", - ["[["] = "@class.outer", - }, - goto_previous_end = { - ["[M"] = "@function.outer", - ["[]"] = "@class.outer", + swap = { + enable = true, + swap_next = { + ["a"] = "@parameter.inner", + }, + swap_previous = { + ["A"] = "@parameter.inner", + }, }, }, - swap = { - enable = true, - swap_next = { - ["a"] = "@parameter.inner", - }, - swap_previous = { - ["A"] = "@parameter.inner", - }, - }, - }, - }) - end, + }) + end, + }, + { + "nvim-treesitter/nvim-treesitter-context", + lazy = false, + enabled = true, + opts = { + enable = true, + mode = "cursor", -- cursor, or topline + }, + } } diff --git a/config/nvim/lua/plugins/telescope-nvim.lua b/config/nvim/lua/plugins/telescope-nvim.lua index 3185b01..0a2d9d7 100644 --- a/config/nvim/lua/plugins/telescope-nvim.lua +++ b/config/nvim/lua/plugins/telescope-nvim.lua @@ -1,9 +1,11 @@ -- Telescope, a see-all-through file manager. +-- vim: ts=2 sw=2 si et +-- luacheck: globals vim return { "nvim-telescope/telescope.nvim", dependencies = { - { "nvim-lua/popup.nvim" }, { "nvim-lua/plenary.nvim" }, + { "nvim-lua/popup.nvim" }, -- Fuzzy Finder Algorithm which requires local dependencies to be built. -- Only load if `make` is available. Make sure you have the system -- requirements installed. @@ -92,50 +94,62 @@ return { pcall(require("telescope").load_extension, "fzf") pcall(require("telescope").load_extension, "file_browser") + pcall(require("telescope").load_extension, "harpoon") -- See `:help telescope.builtin` - vim.keymap.set("n", "?", require("telescope.builtin").oldfiles, { desc = "[?] Find recently opened files" }) - vim.keymap.set("n", "", require("telescope.builtin").buffers, { desc = "[ ] Find existing buffers" }) - vim.keymap.set("n", "/", function() - -- You can pass additional configuration to telescope to change theme, layout, etc. - require("telescope.builtin").current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ - winblend = 10, - previewer = false, - })) - end, { desc = "[/] Fuzzily search in current buffer" }) + local tbi = require("telescope.builtin") + local wk = require("which-key") + wk.register({ + ["?"] = { + function() tbi.oldfiles() end, + "[?] Find recently opened files", + }, + [""] = { + function() tbi.buffers() end, + "[ ] Find existing buffers", + }, + ["/"] = { + function() + -- You can pass additional configuration to telescope to change theme, layout, etc. + tbi.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ + winblend = 10, + previewer = false, + })) + end, + "[/] Fuzzily search in current buffer", + }, - vim.keymap.set( - "n", - "tg", - require("telescope.builtin").git_files, - { desc = "[T]elescope: Search [G]it files" } - ) - vim.keymap.set("n", "tf", require("telescope.builtin").find_files, { desc = "[T]elescope: Search [F]iles" }) - vim.keymap.set("n", "th", require("telescope.builtin").help_tags, { desc = "[T]elescope: Search [H]elp" }) - vim.keymap.set( - "n", - "tw", - require("telescope.builtin").grep_string, - { desc = "[T]elescope: Search current [W]ord" } - ) - vim.keymap.set( - "n", - "tr", - require("telescope.builtin").live_grep, - { desc = "[T]elescope: Search by G[r]ep" } - ) - vim.keymap.set( - "n", - "td", - require("telescope.builtin").diagnostics, - { desc = "[T]elescope: Search [D]iagnostics" } - ) + t = { + b = { + "Telescope file_browser", + "[T]elescope: File [B]rowser", + }, + d = { + function() tbi.diagnostics() end, + "[T]elescope: Search [D]iagnostics", + }, - vim.keymap.set( - "n", - "tb", - ":Telescope file_browser", - { desc = "[T]elescope: File [B]rowser", noremap = true } - ) + f = { + function() tbi.find_files() end, + "[T]elescope: Search [F]iles", + }, + g = { + function() tbi.git_files() end, + "[T]elescope: Search [G]it files", + }, + h = { + function() tbi.help_tags() end, + "[T]elescope: Search [H]elp", + }, + r = { + function() tbi.live_grep() end, + "[T]elescope: Search by G[r]ep", + }, + w = { + function() tbi.grep_string() end, + "[T]elescope: Search current [W]ord", + }, + }, + }, { prefix = "" }) end, } diff --git a/config/nvim/lua/plugins/trouble.lua b/config/nvim/lua/plugins/trouble.lua index 116ced3..7296c88 100644 --- a/config/nvim/lua/plugins/trouble.lua +++ b/config/nvim/lua/plugins/trouble.lua @@ -1,48 +1,83 @@ --- Trouble for diagnostics of plugins +-- 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", dependencies = "kyazdani42/nvim-web-devicons", config = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - - position = "bottom", -- position of the list can be: bottom, top, left, right - height = 10, -- height of the trouble list when position is top or bottom - width = 50, -- width of the list when position is left or right - icons = true, -- use devicons for filenames - mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist" - fold_open = "", -- icon used for open folds - fold_closed = "", -- icon used for closed folds - group = true, -- group results by file - padding = true, -- add an extra new line on top of the list - action_keys = { -- key mappings for actions in the trouble list + -- position of the list can be: bottom, top, left, right + position = "bottom", + -- height of the trouble list when position is top or bottom + height = 10, + -- width of the list when position is left or right + width = 50, + -- use devicons for filenames + icons = true, + -- "workspace_diagnostics", "document_diagnostics", + -- "quickfix", "lsp_references", "loclist" + mode = "workspace_diagnostics", + -- icon used for open folds + fold_open = "", + -- icon used for closed folds + fold_closed = "", + -- group results by file + group = true, + -- add an extra new line on top of the list + padding = true, + -- key mappings for actions in the trouble list + action_keys = { -- map to {} to remove a mapping, for example: -- close = {}, - close = "q", -- close the list - cancel = "", -- cancel the preview and get back to your last window / buffer / cursor - refresh = "r", -- manually refresh - jump = { "", "" }, -- jump to the diagnostic or open / close folds - open_split = { "" }, -- open buffer in new split - open_vsplit = { "" }, -- open buffer in new vsplit - open_tab = { "" }, -- open buffer in new tab - jump_close = { "o" }, -- jump to the diagnostic and close the list - toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode - toggle_preview = "P", -- toggle auto_preview - hover = "K", -- opens a small popup with the full multiline message - preview = "p", -- preview the diagnostic location - close_folds = { "zM", "zm" }, -- close all folds - open_folds = { "zR", "zr" }, -- open all folds - toggle_fold = { "zA", "za" }, -- toggle fold of current file - previous = "k", -- preview item - next = "j", -- next item + + -- close the list + close = "q", + -- cancel the preview and get back to your last window / buffer / cursor + cancel = "", + -- manually refresh + refresh = "r", + -- jump to the diagnostic or open / close folds + jump = { "", "" }, + -- open buffer in new split + open_split = { "" }, + -- open buffer in new vsplit + open_vsplit = { "" }, + -- open buffer in new tab + open_tab = { "" }, + -- jump to the diagnostic and close the list + jump_close = { "o" }, + -- toggle between "workspace" and "document" diagnostics mode + toggle_mode = "m", + -- toggle auto_preview + toggle_preview = "P", + -- opens a small popup with the full multiline message + hover = "K", + -- preview the diagnostic location + preview = "p", + -- close all folds + close_folds = { "zM", "zm" }, + -- open all folds + open_folds = { "zR", "zr" }, + -- toggle fold of current file + toggle_fold = { "zA", "za" }, + -- preview item + previous = "k", + -- next item + next = "j", }, - indent_lines = true, -- add an indent guide below the fold icons - auto_open = false, -- automatically open the list when you have diagnostics - auto_close = false, -- automatically close the list when you have no diagnostics - auto_preview = true, -- automatically preview the location of the diagnostic. to close preview and go back to last window - auto_fold = false, -- automatically fold a file trouble list at creation - auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result + -- add an indent guide below the fold icons + indent_lines = true, + -- automatically open the list when you have diagnostics + auto_open = true, + -- automatically close the list when you have no diagnostics + auto_close = true, + -- automatically preview the location of the diagnostic. + -- to close preview and go back to last window + auto_preview = true, + -- automatically fold a file trouble list at creation + auto_fold = false, + -- for the given modes, automatically jump if there is only a single result + auto_jump = { "lsp_definitions" }, signs = { -- icons / text used for a diagnostic error = "", @@ -51,6 +86,7 @@ return { information = "", other = "﫠", }, - use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client + -- enabling this will use the signs defined in your lsp client + use_diagnostic_signs = false, }, } diff --git a/config/nvim/lua/plugins/twilight.lua b/config/nvim/lua/plugins/twilight.lua index be8ad2d..c903516 100644 --- a/config/nvim/lua/plugins/twilight.lua +++ b/config/nvim/lua/plugins/twilight.lua @@ -1,4 +1,6 @@ --- Dim +-- Twilight dims inactive portions of the +-- code you're editing using TreeSitter +-- https://github.com/folke/twilight.nvim return { "folke/twilight.nvim", config = { diff --git a/config/nvim/lua/plugins/vim-hexokinase.lua b/config/nvim/lua/plugins/vim-hexokinase.lua deleted file mode 100644 index b7689b6..0000000 --- a/config/nvim/lua/plugins/vim-hexokinase.lua +++ /dev/null @@ -1,54 +0,0 @@ --- Colorizer for strings. - --- Minimise code. -local set = vim.api.nvim_set_var - -return { - "RRethy/vim-hexokinase", - build = "cd ~/.local/share/nvim/lazy/vim-hexokinase && make hexokinase", - init = function() - -- All possible highlighters - set("Hexokinase_highlighters", { - "virtual", - "sign_column", - "background", - "backgroundfull", - -- 'foreground', - -- 'foregroundfull' - }) - - -- Patterns to match for all filetypes - -- Can be a comma separated string or a list of strings - - -- All possible values - set("Hexokinase_optInPatterns", { - "full_hex", - "triple_hex", - "rgb", - "rgba", - "hsl", - "hsla", - "colour_names", - }) - - -- Filetype specific patterns to match - -- entry value must be comma seperated list - set("Hexokinase_ftOptInPatterns", { - css = "full_hex,rgb,rgba,hsl,hsla,colour_names", - html = "full_hex,rgb,rgba,hsl,hsla,colour_names", - }) - - -- Sample value, to keep default behaviour don't define this', variable - set("Hexokinase_ftEnabled", { - "css", - "html", - "javascript", - "scss", - "sass", - "lua", - }) - - -- Turn the colors on. - --vim.cmd('au BufEnter * HexokinaseTurnOn') - end, -}