diff --git a/README.md b/README.md index a804cec..ca0660d 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,21 @@ This repository contains my NeoVim configs, including some of my snippets. It uses Lazy.nvim as the plugin manager, lspconfig for the language server configuration, none-ls for formatting, telescope, tree-sitter and many other plugins. Partially documented and fairly well organized + +## Update +A new version of these configs is in the works, removing many plugins that are now all consolidated in Snacks +Lazy.nvim might be replaced with NeoVim's native 0.12+ package manager + + ## Linter configs You may find the linter configs and setup-scripts for some linters that require some extra setup [here](https://git.janishutz.com/janishutz/dotfiles/) + # Lua notes To get your luarocks packages to be picked up by the language server, it is currently configured to only look at the `cwd` that nvim is open in. I may expand that in the future to do a proper search for all open buffers, but that would require a language server restart to apply on every buffer add + # Issues with jdtls Ensure you have jdk21-opnejdk or newer installed. On Arch (and derivatives) you can switch the preferred java version using `archlinux-java set ` diff --git a/nvim/lua/keybinds.lua b/nvim/lua/keybinds.lua index b87a08e..c0f3850 100755 --- a/nvim/lua/keybinds.lua +++ b/nvim/lua/keybinds.lua @@ -124,8 +124,6 @@ keymap.set({ "n", "v" }, "P", '"+P', opts("PASTE from system clipboard") keymap.set({ "n", "v" }, "d", '"+d', opts("yank to system clipboard and delete")) keymap.set({ "n", "v" }, "D", '"+D', opts("YANK to system clipboard and DELETE")) -keymap.set("n", "wk", ":WhichKey", opts("Toggle WhichKey")) - -- Toggle relative line numbers keymap.set( "n", diff --git a/nvim/lua/plugins/nav/neotree.lua b/nvim/lua/plugins/nav/neotree.lua deleted file mode 100755 index 8da9b02..0000000 --- a/nvim/lua/plugins/nav/neotree.lua +++ /dev/null @@ -1,333 +0,0 @@ -return { - "nvim-neo-tree/neo-tree.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", - -- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information - }, - keys = { - { "e", "Neotree", desc = "Open Neotree" }, - { - "gg", - "Neotree source=git_status position=float", - desc = "Open git view", - }, - }, - opts = { - close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab - popup_border_style = "rounded", - enable_git_status = true, - enable_diagnostics = true, - use_default_mappings = false, - open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes - open_files_using_relative_paths = false, - sort_case_insensitive = false, -- used when sorting files and directories in the tree - -- sort_function = nil, -- use a custom function for sorting files and directories in the tree - sort_function = function(a, b) -- natural sort - if a.type == b.type then - local ap = a.path:lower() - local bp = b.path:lower() - - if ap == bp then - return false - end - - for i = 1, math.max(string.len(ap), string.len(bp)), 1 do - local l = string.sub(ap, i, -1) - local r = string.sub(bp, i, -1) - - if - type(tonumber(string.sub(l, 1, 1))) == "number" - and type(tonumber(string.sub(r, 1, 1))) == "number" - then - local l_number = tonumber(string.match(l, "^[0-9]+")) - local r_number = tonumber(string.match(r, "^[0-9]+")) - - if l_number ~= r_number then - return l_number < r_number - end - elseif string.sub(l, 1, 1) ~= string.sub(r, 1, 1) then - return l < r - end - end - else - return a.type < b.type - end - end, - default_component_configs = { - container = { - enable_character_fade = true, - }, - indent = { - indent_size = 2, - padding = 1, -- extra padding on left hand side - -- indent guides - with_markers = true, - indent_marker = "│", - last_indent_marker = "└", - highlight = "NeoTreeIndentMarker", - -- expander config, needed for nesting files - with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders - expander_collapsed = "", - expander_expanded = "", - expander_highlight = "NeoTreeExpander", - }, - icon = { - folder_closed = "", - folder_open = "", - folder_empty = "󰜌", - provider = function(icon, node, state) -- default icon provider utilizes nvim-web-devicons if available - if node.type == "file" or node.type == "terminal" then - local success, web_devicons = pcall(require, "nvim-web-devicons") - local name = node.type == "terminal" and "terminal" or node.name - if success then - local devicon, hl = web_devicons.get_icon(name) - icon.text = devicon or icon.text - icon.highlight = hl or icon.highlight - end - end - end, - -- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there - -- then these will never be used. - default = "*", - highlight = "NeoTreeFileIcon", - }, - modified = { - symbol = "[+]", - highlight = "NeoTreeModified", - }, - name = { - trailing_slash = true, - use_git_status_colors = true, - highlight = "NeoTreeFileName", - }, - 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 - -- Status type - untracked = "", - ignored = "", - unstaged = "󰄱", - staged = "", - conflict = "", - }, - }, - -- If you don't want to use these columns, you can set `enabled = false` for each of them individually - file_size = { - enabled = true, - width = 12, -- width of the column - required_width = 64, -- min width of window required to show this column - }, - type = { - enabled = true, - width = 10, -- width of the column - required_width = 122, -- min width of window required to show this column - }, - last_modified = { - enabled = true, - width = 20, -- width of the column - required_width = 88, -- min width of window required to show this column - }, - created = { - enabled = true, - width = 20, -- width of the column - required_width = 110, -- min width of window required to show this column - }, - symlink_target = { - enabled = false, - }, - }, - -- A list of functions, each representing a global custom command - -- that will be available in all sources (if not overridden in `opts[source_name].commands`) - -- see `:h neo-tree-custom-commands-global` - commands = {}, - window = { - position = "left", - width = 40, - mapping_options = { - noremap = true, - nowait = true, - }, - mappings = { - ["<2-LeftMouse>"] = "open", - [""] = "open", - ["o"] = "open", - [""] = "cancel", -- close preview or floating neo-tree window - ["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } }, - -- Read `# Preview Mode` for more information - ["l"] = "focus_preview", - ["S"] = "open_split", - ["v"] = "open_vsplit", - ["t"] = "open_tabnew", - ["w"] = "open_with_window_picker", - ["C"] = "close_node", - -- ['C'] = 'close_all_subnodes', - ["z"] = "close_all_nodes", - --["Z"] = "expand_all_nodes", - ["q"] = "close_window", - ["R"] = "refresh", - ["?"] = "show_help", - ["<"] = "prev_source", - [">"] = "next_source", - ["i"] = "show_file_details", - }, - }, - nesting_rules = {}, - filesystem = { - scan_mode = "deep", - filtered_items = { - visible = false, -- when true, they will just be displayed differently than normal items - hide_dotfiles = true, - hide_gitignored = true, - hide_ignored = true, - hide_hidden = true, -- only works on Windows for hidden files/directories - hide_by_name = { - --"node_modules" - }, - hide_by_pattern = { -- uses glob style patterns - --"*.meta", - --"*/src/*/tsconfig.json", - }, - always_show = { -- remains visible even if other settings would normally hide it - --".gitignored", - }, - always_show_by_pattern = { -- uses glob style patterns - --".env*", - }, - never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show - --".DS_Store", - --"thumbs.db" - }, - never_show_by_pattern = { -- uses glob style patterns - --".null-ls_*", - }, - }, - 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 = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` - }, - group_empty_dirs = true, -- when true, empty folders will be grouped together - hijack_netrw_behavior = "open_default", -- 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 = true, -- This will use the OS level file watchers to detect changes - -- instead of relying on nvim autocmd events. - window = { - mappings = { - ["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 - config = { - show_path = "none", -- "none", "relative", "absolute" - }, - }, - ["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion. - ["d"] = "delete", - ["r"] = "rename", - ["b"] = "rename_basename", - ["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": - ["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add". - [""] = "navigate_up", - ["."] = "set_root", - ["H"] = "toggle_hidden", - ["/"] = "fuzzy_finder", - ["D"] = "fuzzy_finder_directory", - ["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm - -- ["D"] = "fuzzy_sorter_directory", - ["f"] = "filter_on_submit", - [""] = "clear_filter", - ["[g"] = "prev_git_modified", - ["]g"] = "next_git_modified", - ["s"] = { - "show_help", - nowait = false, - config = { title = "Order by", prefix_key = "s" }, - }, - ["sc"] = { "order_by_created", nowait = false }, - ["sd"] = { "order_by_diagnostics", nowait = false }, - ["sg"] = { "order_by_git_status", nowait = false }, - ["sm"] = { "order_by_modified", nowait = false }, - ["sn"] = { "order_by_name", nowait = false }, - ["ss"] = { "order_by_size", nowait = false }, - ["st"] = { "order_by_type", nowait = false }, - -- [''] = function(state) ... end, - }, - fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode - [""] = "move_cursor_down", - [""] = "move_cursor_down", - [""] = "move_cursor_up", - [""] = "move_cursor_up", - [""] = "close", - -- [''] = function(state, scroll_padding) ... end, - }, - }, - - commands = {}, -- Add a custom command or override a global one using the same function name - }, - 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 = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` - }, - group_empty_dirs = true, -- when true, empty folders will be grouped together - show_unloaded = true, - window = { - mappings = { - ["d"] = "buffer_delete", - ["bd"] = "buffer_delete", - [""] = "navigate_up", - ["."] = "set_root", - ["s"] = { - "show_help", - nowait = false, - config = { title = "Order by", prefix_key = "s" }, - }, - ["sc"] = { "order_by_created", nowait = false }, - ["sd"] = { "order_by_diagnostics", nowait = false }, - ["sm"] = { "order_by_modified", nowait = false }, - ["sn"] = { "order_by_name", nowait = false }, - ["ss"] = { "order_by_size", nowait = false }, - ["st"] = { "order_by_type", nowait = false }, - }, - }, - }, - git_status = { - window = { - position = "float", - mappings = { - ["A"] = "git_add_all", - ["u"] = "git_unstage_file", - ["a"] = "git_add_file", - ["r"] = "git_revert_file", - ["c"] = "git_commit", - ["p"] = "git_push", - ["g"] = "git_commit_and_push", - ["s"] = { - "show_help", - nowait = false, - config = { title = "Order by", prefix_key = "s" }, - }, - ["sc"] = { "order_by_created", nowait = false }, - ["sd"] = { "order_by_diagnostics", nowait = false }, - ["sm"] = { "order_by_modified", nowait = false }, - ["sn"] = { "order_by_name", nowait = false }, - ["ss"] = { "order_by_size", nowait = false }, - ["st"] = { "order_by_type", nowait = false }, - }, - }, - }, - }, -} diff --git a/nvim/lua/plugins/nav/telescope.lua b/nvim/lua/plugins/nav/telescope.lua deleted file mode 100755 index 8cf09fc..0000000 --- a/nvim/lua/plugins/nav/telescope.lua +++ /dev/null @@ -1,157 +0,0 @@ -return { - -- fuzzy finder - "nvim-telescope/telescope.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - { - "nvim-telescope/telescope-live-grep-args.nvim", - -- This will not install any breaking changes. - -- For major updates, this must be adjusted manually. - version = "^1.0.0", - }, - }, - event = { "LspAttach" }, - keys = { - { - "ff", - function() - require("telescope.builtin").find_files() - end, - desc = "Telescope find files", - }, - - { - "fu", - function() - require("telescope.builtin").lsp_references() - end, - desc = "Telescope Usage (references)", - }, - - { - "flg", - function() - require("telescope.builtin").live_grep() - end, - desc = "Telescope live grep", - }, - - { - "fg", - function() - require("telescope").extensions.live_grep_args.live_grep_args() - end, - desc = "Telescope live grep args", - }, - - { - "fb", - function() - require("telescope.builtin").buffers() - end, - desc = "Telescope buffers", - }, - - { - "fh", - function() - require("telescope.builtin").help_tags() - end, - desc = "Telescope nvim functions", - }, - - { "ft", ":TodoTelescope", desc = "Telescope TODOs" }, - - -- Git - { - "fld", - function() - require("telescope.builtin").git_status() - end, - desc = "Telescope git diff", - }, - - { - "flc", - function() - require("telescope.builtin").git_commits() - end, - desc = "Telescope git commits", - }, - - { - "flf", - function() - require("telescope.builtin").git_files() - end, - desc = "Telescope git files", - }, - - -- Recent Commands - { "foc", ":Telescope command_history", desc = "Telescope recent commands" }, - - -- Recent Searches - { "fos", ":Telescope search_history", desc = "Telescope recent searches" }, - - -- Old Files - { - "fr", - function() - require("telescope.builtin").oldfiles() - end, - desc = "Telescope recent files", - }, - - -- Quickfix Items - { "fq", ":Telescope quickfix", desc = "Telescope quickfix items" }, - - -- Spell Suggestions - { "fs", ":Telescope spell_suggest", desc = "Telescope spellsuggestions" }, - - -- Diagnostics - { "fd", ":Telescope diagnostics", desc = "Telescope Diagnostics" }, - - -- Notifications - { "fn", ":Telescope notify", desc = "Telescope Notifications" }, - - -- Implementations - { "fi", ":Telescope lsp_implementations", desc = "Telescope lsp implementations" }, - - -- References - { - "fu", - function() - require("telescope.builtin").lsp_references() - end, - desc = "Telescope Usage (references)", - }, - }, - config = function() - local actions = require("telescope.actions") - local telescope = require("telescope") - local lga_actions = require("telescope-live-grep-args.actions") - - telescope.setup({ - defaults = { - mappings = { - i = { - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - [""] = actions.smart_add_to_qflist, - [""] = actions.smart_send_to_qflist, - [""] = lga_actions.quote_prompt(), - }, - }, - path_display = { "truncate" }, - }, - extensions = { - frecency = { - db_safe_mode = false, - matcher = "fuzzy", - }, - }, - }) - - telescope.load_extension("live_grep_args") - end, -} diff --git a/nvim/lua/plugins/nav/toggleterm.lua b/nvim/lua/plugins/nav/toggleterm.lua deleted file mode 100755 index da507dd..0000000 --- a/nvim/lua/plugins/nav/toggleterm.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - -- literally the name, quick term toggle - "akinsho/toggleterm.nvim", - version = "*", - opts = { - insert_mappings = false, - terminal_mappings = false, - open_mapping = "t", - direction = "float", - float_opts = { - border = "curved", - }, - }, - keys = { - { "", "ToggleTerm", desc = "Close Terminal", mode = "t" }, -- close terminal wih esc - { "t", "ToggleTerm", desc = "Open Terminal" }, -- close terminal wih esc - }, -} diff --git a/nvim/lua/plugins/nav/whichkey.lua b/nvim/lua/plugins/nav/whichkey.lua index 3aa1ccd..ca50289 100755 --- a/nvim/lua/plugins/nav/whichkey.lua +++ b/nvim/lua/plugins/nav/whichkey.lua @@ -1,10 +1,22 @@ return { - -- keybinds popup - "folke/which-key.nvim", - event = "VeryLazy", - init = function() - vim.o.timeout = true - vim.o.timeoutlen = 500 - end, - opts = {}, + -- keybinds popup + "folke/which-key.nvim", + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 500 + end, + opts = { + preset = "modern" + }, + keys = { + { + "?", + function() + require("which-key").show({ global = false }) + end, + desc = "Start Which-Key", + mode = "n" + }, + }, } diff --git a/nvim/lua/plugins/snacks/init.lua b/nvim/lua/plugins/snacks/init.lua new file mode 100644 index 0000000..7c61c85 --- /dev/null +++ b/nvim/lua/plugins/snacks/init.lua @@ -0,0 +1,32 @@ +return { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + ---@type snacks.Config + opts = { + animate = { enabled = true }, + bigfile = { enabled = true }, + bufdelete = { enabled = true }, + dashboard = require("plugins.snacks.modules.dashboard"), + indent = { + enabled = true, + indent = { + enabled = true, + priority = 1, + char = "▎", + }, + animate = { + enabled = false, + }, + scope = { + char = "▎", + }, + }, + lazygit = { enabled = true }, + picker = { enabled = true }, + quickfile = { enabled = true }, + statuscolumn = { enabled = true }, + scope = { enabled = true }, + }, + keys = require("plugins.snacks.keys"), +} diff --git a/nvim/lua/plugins/snacks/keys.lua b/nvim/lua/plugins/snacks/keys.lua new file mode 100644 index 0000000..07a030a --- /dev/null +++ b/nvim/lua/plugins/snacks/keys.lua @@ -0,0 +1,231 @@ +return { + -- Git + { + "gl", + function() + Snacks.lazygit() + end, + desc = "Open LazyGit", + mode = "n", + }, + { + "gb", + function() + Snacks.git.blame_line() + end, + desc = "Open Git Blame for this line", + mode = "n", + }, + -- Colours + { + "fcs", + function() + Snacks.picker.highlights({ pattern = "hl_group:^Snacks" }) + end, + desc = "Show Snacks highlights", + mode = "n", + }, + { + "fca", + function() + Snacks.picker.highlights() + end, + desc = "Show highlight groups", + mode = "n", + }, + { + "fci", + function() + Snacks.picker.icons() + end, + desc = "Show icons", + mode = "n" + }, + -- Terminal + { + "t", + function() + Snacks.terminal() + end, + desc = "Open terminal", + }, + -- Tree + { + "e", + function() + Snacks.explorer() + end, + desc = "Open File Tree", + mode = "n" + }, + -- Pickers + { + "ff", + function() + Snacks.picker.files() + end, + desc = "Find file", + mode = "n" + }, + { + "fg", + function() + Snacks.picker.grep() + end, + desc = "Find file content using grep", + mode = "n" + }, + { + "fb", + function() + Snacks.picker.buffers() + end, + desc = "Show all buffers", + mode = "n" + }, + { + "fch", + function() + Snacks.picker.command_history() + end, + desc = "Show command history", + mode = "n" + }, + { + "fd", + function() + Snacks.picker.diagnostics() + end, + desc = "Show diagnostics", + mode = "n" + }, + { + "fm", + function() + Snacks.picker.git_diff() + end, + desc = "Show uncommitted diffs", + mode = "n" + }, + { + "fh", + function() + Snacks.picker.help() + end, + desc = "Show nvim help pages", + mode = "n" + }, + { + "fj", + function() + Snacks.picker.jumps() + end, + desc = "Show available jumps", + mode = "n" + }, + { + "fk", + function() + Snacks.picker.keymaps() + end, + desc = "Show keymaps", + mode = "n" + }, + { + "flc", + function() + Snacks.picker.lsp_config() + end, + desc = "Show LSP configs", + mode = "n" + }, + { + "fld", + function() + Snacks.picker.lsp_definitions() + end, + desc = "Show LSP definitions (alias for gd)", + mode = "n" + }, + { + "fli", + function() + Snacks.picker.lsp_implementations() + end, + desc = "Show LSP implementations (alias for gi)", + mode = "n" + }, + { + "flr", + function() + Snacks.picker.lsp_references() + end, + desc = "Show LSP references (alias for gR)", + mode = "n" + }, + { + "fls", + function() + Snacks.picker.lsp_symbols() + end, + desc = "Show LSP symbols", + mode = "n" + }, + { + "flt", + function() + Snacks.picker.lsp_type_definitions() + end, + desc = "Show LSP type definitions", + mode = "n" + }, + { + "fn", + function() + Snacks.picker.notifications() + end, + desc = "Show notifications", + mode = "n" + }, + { + "fp", + function() + Snacks.picker.projects() + end, + desc = "Show recent projects", + mode = "n" + }, + { + "fr", + function() + Snacks.picker.recent() + end, + desc = "Show recent files", + mode = "n" + }, + { + "fs", + function() + Snacks.picker.spelling() + end, + desc = "Show spelling suggestions", + mode = "n" + }, + { + "fo", + function() + Snacks.picker.treesitter() + end, + desc = "Show treesitter details", + mode = "n" + }, + -- Close buffer + { + "", + function() + Snacks.bufdelete() + end, + desc = "Close buffer", + mode = "n", + }, +} diff --git a/nvim/lua/plugins/snacks/modules/dashboard.lua b/nvim/lua/plugins/snacks/modules/dashboard.lua new file mode 100644 index 0000000..e4cf73f --- /dev/null +++ b/nvim/lua/plugins/snacks/modules/dashboard.lua @@ -0,0 +1,48 @@ +return { + enabled = true, + sections = { + { section = "header", hl = "SnacksDashboardHeader" }, + { + pane = 2, + section = "terminal", + cmd = "colorscript -e square", + height = 5, + padding = 1, + }, + { section = "keys", hl = "SnacksDashboardPrimary", gap = 1, padding = 1 }, + { + pane = 2, + icon = " ", + title = "Recent Files (in project)", + section = "recent_files", + indent = 2, + limit = 5, + padding = 1, + cwd = true, + }, + { + pane = 2, + icon = " ", + title = "Projects", + section = "projects", + indent = 2, + padding = 1, + limit = 4, + }, + { + pane = 2, + icon = " ", + title = "Git Status", + section = "terminal", + enabled = function() + return Snacks.git.get_root() ~= nil + end, + cmd = "git status --short --branch --renames", + height = 5, + padding = 1, + ttl = 5 * 60, + indent = 3, + }, + { section = "startup" }, + }, +} diff --git a/nvim/lua/plugins/snacks/modules/picker.lua b/nvim/lua/plugins/snacks/modules/picker.lua new file mode 100644 index 0000000..5f3ff99 --- /dev/null +++ b/nvim/lua/plugins/snacks/modules/picker.lua @@ -0,0 +1,5 @@ +return { + sources = { + explorer = {} + } +} diff --git a/nvim/lua/plugins/snacks/modules/terminal.lua b/nvim/lua/plugins/snacks/modules/terminal.lua new file mode 100644 index 0000000..180e3a6 --- /dev/null +++ b/nvim/lua/plugins/snacks/modules/terminal.lua @@ -0,0 +1,7 @@ +return { + win = { + style = "terminal", + position = "float", + border = "rounded", + }, +} diff --git a/nvim/lua/plugins/util/context.lua b/nvim/lua/plugins/util/context.lua deleted file mode 100755 index 5d235c2..0000000 --- a/nvim/lua/plugins/util/context.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - -- similar to sticky scroll in vscode - "nvim-treesitter/nvim-treesitter-context", - event = "BufRead", - opts = { - max_lines = 4 - } -} diff --git a/nvim/lua/plugins/util/diff/diffview.lua b/nvim/lua/plugins/util/diff/diffview.lua deleted file mode 100644 index f42022d..0000000 --- a/nvim/lua/plugins/util/diff/diffview.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - -- Diffview - "sindrets/diffview.nvim", - keys = { - { "gd", ":DiffviewOpen", desc = "Open diffview" }, - { "gf", ":DiffviewFileHistory", desc = "View file history" }, - { "gc", ":DiffviewClose", desc = "Close diffview" }, - { "gr", ":DiffviewRefresh", desc = "Refresh diffview" }, - }, -} diff --git a/nvim/lua/plugins/util/diffview.lua b/nvim/lua/plugins/util/diffview.lua new file mode 100644 index 0000000..e9fd802 --- /dev/null +++ b/nvim/lua/plugins/util/diffview.lua @@ -0,0 +1,10 @@ +return { + -- Diffview + "sindrets/diffview.nvim", + keys = { + { "gdd", ":DiffviewOpen", desc = "Open diffview" }, + { "gdh", ":DiffviewFileHistory", desc = "View file history" }, + { "gdc", ":DiffviewClose", desc = "Close diffview" }, + { "gdr", ":DiffviewRefresh", desc = "Refresh diffview" }, + }, +} diff --git a/nvim/lua/plugins/util/multicursors.lua b/nvim/lua/plugins/util/multicursors.lua deleted file mode 100755 index d0682c5..0000000 --- a/nvim/lua/plugins/util/multicursors.lua +++ /dev/null @@ -1,17 +0,0 @@ -local utils = require("utils") -return { - "smoka7/multicursors.nvim", - dependencies = { - "nvimtools/hydra.nvim", - }, - opts = {}, - cmd = { "MCstart", "MCvisual", "MCclear", "MCpattern", "MCvisualPattern", "MCunderCursor" }, - keys = { - { - mode = { "v", "n" }, - "c", - utils.run_vim_cmd("MCstart"), - desc = "Create a selection for selected text or word under the cursor", - }, - }, -} diff --git a/nvim/lua/plugins/util/snacks.lua b/nvim/lua/plugins/util/snacks.lua deleted file mode 100644 index 34eed4b..0000000 --- a/nvim/lua/plugins/util/snacks.lua +++ /dev/null @@ -1,114 +0,0 @@ -return { - "folke/snacks.nvim", - priority = 1000, - lazy = false, - ---@type snacks.Config - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - animate = { enabled = true }, - bigfile = { enabled = true }, - bufdelete = { enabled = true }, - dashboard = { - enabled = true, - sections = { - { section = "header", hl = "SnacksDashboardHeader" }, - { - pane = 2, - section = "terminal", - cmd = "colorscript -e square", - height = 5, - padding = 1, - }, - { section = "keys", hl = "SnacksDashboardPrimary", gap = 1, padding = 1 }, - { - pane = 2, - icon = " ", - title = "Recent Files (in project)", - section = "recent_files", - indent = 2, - limit = 5, - padding = 1, - cwd = true, - }, - { - pane = 2, - icon = " ", - title = "Projects", - section = "projects", - indent = 2, - padding = 1, - limit = 4, - }, - { - pane = 2, - icon = " ", - title = "Git Status", - section = "terminal", - enabled = function() - return Snacks.git.get_root() ~= nil - end, - cmd = "git status --short --branch --renames", - height = 5, - padding = 1, - ttl = 5 * 60, - indent = 3, - }, - { section = "startup" }, - }, - }, - indent = { - enabled = true, - indent = { - enabled = true, - priority = 1, - char = "▎", - }, - animate = { - enabled = false, - }, - scope = { - char = "▎", - }, - }, - lazygit = { enabled = true }, - picker = { enabled = true }, - quickfile = { enabled = true }, - statuscolumn = { enabled = true }, - }, - keys = { - { - "gl", - function() - Snacks.lazygit() - end, - desc = "Open LazyGit", - mode = "n", - }, - { - "fcs", - function() - Snacks.picker.highlights({ pattern = "hl_group:^Snacks" }) - end, - desc = "Show Snacks highlights", - mode = "n", - }, - { - "fca", - function() - Snacks.picker.highlights() - end, - desc = "Show highlight groups", - mode = "n", - }, - { - "", - function() - Snacks.bufdelete() - end, - desc = "Close buffer", - mode = "n", - }, - }, -}