diff --git a/init.lua b/init.lua index ed50b69d7f3..db0214497de 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,6 @@ +require 'custom.core.options' +require 'custom.core.keymaps' + --[[ ===================================================================== @@ -91,7 +94,7 @@ 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 = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.o` @@ -393,7 +396,18 @@ require('lazy').setup({ -- i = { [''] = 'to_fuzzy_refine' }, -- }, -- }, - -- pickers = {} + pickers = { + live_grep = { + file_ignore_patterns = { 'node_modules', '.git', '.venv' }, + additional_args = function(_) + return { '--hidden' } + end, + }, + find_files = { + file_ignore_patterns = { 'node_modules', '.git', '.venv' }, + hidden = true, + }, + }, extensions = { ['ui-select'] = { require('telescope.themes').get_dropdown() }, }, @@ -614,6 +628,16 @@ require('lazy').setup({ stylua = {}, -- Used to format Lua code -- Special Lua Config, as recommended by neovim help docs + -- + ts_ls = {}, -- tsserver is deprecated + html = { filetypes = { 'html', 'twig', 'hbs' } }, + cssls = {}, + tailwindcss = {}, + dockerls = {}, + sqlls = {}, + terraformls = {}, + jsonls = {}, + yamlls = {}, lua_ls = { on_init = function(client) if client.workspace_folders then @@ -664,6 +688,16 @@ require('lazy').setup({ end, }, + { -- Refactoring (extracting/inlining methods and variables) use :Refactor + 'ThePrimeagen/refactoring.nvim', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-treesitter/nvim-treesitter', + }, + lazy = false, + opts = {}, + }, + { -- Autoformat 'stevearc/conform.nvim', event = { 'BufWritePre' }, @@ -689,8 +723,9 @@ require('lazy').setup({ return nil else return { - timeout_ms = 500, + timeout_ms = 2500, lsp_format = 'fallback', + lsp_fallback = true, } end end, @@ -700,7 +735,13 @@ require('lazy').setup({ -- python = { "isort", "black" }, -- -- You can use 'stop_after_first' to run the first available formatter from the list - -- javascript = { "prettierd", "prettier", stop_after_first = true }, + typescript = { 'prettierd', 'prettier' }, + typescriptreact = { 'prettierd', 'prettier' }, + javascript = { 'prettierd', 'prettier' }, + javascriptreact = { 'prettierd', 'prettier' }, + json = { 'prettierd', 'prettier' }, + html = { 'prettierd', 'prettier' }, + css = { 'prettierd', 'prettier' }, }, }, }, @@ -725,12 +766,12 @@ require('lazy').setup({ -- `friendly-snippets` contains a variety of premade snippets. -- See the README about individual language/framework/plugin snippets: -- https://github.com/rafamadriz/friendly-snippets - -- { - -- 'rafamadriz/friendly-snippets', - -- config = function() - -- require('luasnip.loaders.from_vscode').lazy_load() - -- end, - -- }, + { + 'rafamadriz/friendly-snippets', + config = function() + require('luasnip.loaders.from_vscode').lazy_load() + end, + }, }, opts = {}, }, @@ -847,7 +888,23 @@ require('lazy').setup({ -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren -- - sd' - [S]urround [D]elete [']quotes -- - sr)' - [S]urround [R]eplace [)] ['] - require('mini.surround').setup() + require('mini.surround').setup { + custom_surroundings = { + -- - srTT - [S]urround [R]eplace [T]ag opening [T]ag closing + -- ^ allows to replace the surrounding tag with another one without losing any added attributes + T = { + input = { '<(%w+)[^<>]->.-', '^<()%w+().*$' }, + output = function() + local tag_name = MiniSurround.user_input 'Tag name' + if tag_name == nil then + return nil + end + return { left = tag_name, right = tag_name } + end, + }, + }, + } + require('mini.move').setup() -- Simple and easy statusline. -- You could remove this setup call if you don't like it, @@ -898,6 +955,54 @@ require('lazy').setup({ end, }) end, + main = 'nvim-treesitter.configs', -- Sets main module to use for opts + -- [[ Configure Treesitter ]] See `:help nvim-treesitter` + opts = { + ensure_installed = { + 'lua', + 'python', + 'javascript', + 'typescript', + 'vimdoc', + 'vim', + 'regex', + 'terraform', + 'sql', + 'dockerfile', + 'toml', + 'json', + 'java', + 'groovy', + 'go', + 'gitignore', + 'graphql', + 'yaml', + 'make', + 'cmake', + 'markdown', + 'markdown_inline', + 'bash', + 'tsx', + 'css', + 'html', + }, + -- Autoinstall languages that are not installed + auto_install = true, + highlight = { + enable = true, + -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. + -- If you are experiencing weird indenting issues, add the language to + -- the list of additional_vim_regex_highlighting and disabled languages for indent. + additional_vim_regex_highlighting = { 'ruby' }, + }, + indent = { enable = true, disable = { 'ruby' } }, + }, + -- There are additional nvim-treesitter modules that you can use to interact + -- with nvim-treesitter. You should go explore a few and see what interests you: + -- + -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` + -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context + -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the @@ -915,12 +1020,15 @@ require('lazy').setup({ -- require 'kickstart.plugins.autopairs', -- require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommended keymaps + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', + -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lua/custom/core/keymaps.lua b/lua/custom/core/keymaps.lua new file mode 100644 index 00000000000..e41892ad220 --- /dev/null +++ b/lua/custom/core/keymaps.lua @@ -0,0 +1,120 @@ +-- Keymaps for better default experience + +-- Set leader key +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' + +-- For conciseness +local opts = { noremap = true, silent = true } + +-- Disable the spacebar key's default behavior in Normal and Visual modes +vim.keymap.set({ 'n', 'v' }, '', '', { silent = true }) + +-- Allow moving the cursor through wrapped lines with j, k +vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) +vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) + +-- clear highlights +vim.keymap.set('n', '', ':noh', opts) + +-- save file +vim.keymap.set('n', '', ' w ', opts) + +-- save file without auto-formatting +vim.keymap.set('n', 'sn', 'noautocmd w ', opts) + +-- quit file +vim.keymap.set('n', '', ' q ', opts) + +-- delete single character without copying into register +vim.keymap.set('n', 'x', '"_x', opts) + +-- Vertical scroll and center +vim.keymap.set('n', '', 'zz', opts) +vim.keymap.set('n', '', 'zz', opts) + +-- Find and center +vim.keymap.set('n', 'n', 'nzzzv') +vim.keymap.set('n', 'N', 'Nzzzv') + +-- Resize with arrows +vim.keymap.set('n', '', ':resize -2', opts) +vim.keymap.set('n', '', ':resize +2', opts) +vim.keymap.set('n', '', ':vertical resize -2', opts) +vim.keymap.set('n', '', ':vertical resize +2', opts) + +-- Buffers +vim.keymap.set('n', '', ':bnext', opts) +vim.keymap.set('n', '', ':bprevious', opts) +vim.keymap.set('n', 'x', ':Bdelete!', opts) -- close buffer +vim.keymap.set('n', 'b', ' enew ', opts) -- new buffer + +-- Increment/decrement numbers +vim.keymap.set('n', '+', '', opts) -- increment +vim.keymap.set('n', '-', '', opts) -- decrement + +-- Window management +vim.keymap.set('n', 'v', 'v', opts) -- split window vertically +vim.keymap.set('n', 'h', 's', opts) -- split window horizontally +vim.keymap.set('n', 'se', '=', opts) -- make split windows equal width & height +vim.keymap.set('n', 'xs', ':close', opts) -- close current split window + +-- Navigate between splits +vim.keymap.set('n', '', ':wincmd k', opts) +vim.keymap.set('n', '', ':wincmd j', opts) +vim.keymap.set('n', '', ':wincmd h', opts) +vim.keymap.set('n', '', ':wincmd l', opts) + +-- Tabs +vim.keymap.set('n', 'to', ':tabnew', opts) -- open new tab +vim.keymap.set('n', 'tx', ':tabclose', opts) -- close current tab +vim.keymap.set('n', 'tn', ':tabn', opts) -- go to next tab +vim.keymap.set('n', 'tp', ':tabp', opts) -- go to previous tab + +-- Toggle line wrapping +vim.keymap.set('n', 'lw', 'set wrap!', opts) + +-- Press jk fast to exit insert mode +vim.keymap.set('i', 'jk', '', opts) +vim.keymap.set('i', 'kj', '', opts) + +-- Stay in indent mode +vim.keymap.set('v', '<', '', '>gv', opts) + +-- Move text up and down +vim.keymap.set('v', '', ':m .+1==', opts) +vim.keymap.set('v', '', ':m .-2==', opts) + +-- Keep last yanked when pasting +vim.keymap.set('v', 'p', '"_dP', opts) + +-- Replace word under cursor +vim.keymap.set('n', 'j', '*``cgn', opts) + +-- Explicitly yank to system clipboard (highlighted and entire row) +vim.keymap.set({ 'n', 'v' }, 'y', [["+y]]) +vim.keymap.set('n', 'Y', [["+Y]]) + +-- Toggle diagnostics +local diagnostics_active = true + +vim.keymap.set('n', 'do', function() + diagnostics_active = not diagnostics_active + + if diagnostics_active then + vim.diagnostic.enable(0) + else + vim.diagnostic.disable(0) + end +end) + +-- Diagnostic keymaps +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' }) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' }) +vim.keymap.set('n', 'd', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) +vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) + +-- Save and load session +vim.keymap.set('n', 'ss', ':mksession! .session.vim', { noremap = true, silent = false }) +vim.keymap.set('n', 'sl', ':source .session.vim', { noremap = true, silent = false }) diff --git a/lua/custom/core/options.lua b/lua/custom/core/options.lua new file mode 100644 index 00000000000..a2357edde63 --- /dev/null +++ b/lua/custom/core/options.lua @@ -0,0 +1,43 @@ +vim.o.hlsearch = false -- Set highlight on search +vim.wo.number = true -- Make line numbers default +vim.o.mouse = 'a' -- Enable mouse mode +vim.o.clipboard = 'unnamedplus' -- Sync clipboard between OS and Neovim. +vim.o.breakindent = true -- Enable break indent +vim.o.undofile = true -- Save undo history +vim.o.ignorecase = true -- Case-insensitive searching UNLESS \C or capital in search +vim.o.smartcase = true -- smart case +vim.wo.signcolumn = 'yes' -- Keep signcolumn on by default +vim.o.updatetime = 250 -- Decrease update time +vim.o.timeoutlen = 300 -- time to wait for a mapped sequence to complete (in milliseconds) +vim.o.backup = false -- creates a backup file +vim.o.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited +vim.o.completeopt = 'menuone,noselect' -- Set completeopt to have a better completion experience +vim.opt.termguicolors = true -- set termguicolors to enable highlight groups +vim.o.whichwrap = 'bs<>[]hl' -- which "horizontal" keys are allowed to travel to prev/next line +vim.o.wrap = false -- display lines as one long line +vim.o.linebreak = true -- companion to wrap don't split words +vim.o.scrolloff = 4 -- minimal number of screen lines to keep above and below the cursor +vim.o.sidescrolloff = 8 -- minimal number of screen columns either side of cursor if wrap is `false` +vim.o.relativenumber = true -- set relative numbered lines +vim.o.numberwidth = 4 -- set number column width to 2 {default 4} +vim.o.shiftwidth = 4 -- the number of spaces inserted for each indentation +vim.o.tabstop = 4 -- insert n spaces for a tab +vim.o.softtabstop = 4 -- Number of spaces that a tab counts for while performing editing operations +vim.o.expandtab = true -- convert tabs to spaces +vim.o.cursorline = false -- highlight the current line +vim.o.splitbelow = true -- force all horizontal splits to go below current window +vim.o.splitright = true -- force all vertical splits to go to the right of current window +vim.o.swapfile = false -- creates a swapfile +vim.o.smartindent = true -- make indenting smarter again +vim.o.showmode = false -- we don't need to see things like -- INSERT -- anymore +vim.o.showtabline = 2 -- always show tabs +vim.o.backspace = 'indent,eol,start' -- allow backspace on +vim.o.pumheight = 10 -- pop up menu height +vim.o.conceallevel = 0 -- so that `` is visible in markdown files +vim.o.fileencoding = 'utf-8' -- the encoding written to a file +vim.o.cmdheight = 1 -- more space in the neovim command line for displaying messages +vim.o.autoindent = true -- copy indent from current line when starting new one +vim.opt.shortmess:append 'c' -- don't give |ins-completion-menu| messages +vim.opt.iskeyword:append '-' -- hyphenated words recognized by searches +vim.opt.formatoptions:remove { 'c', 'r', 'o' } -- don't insert the current comment leader automatically for auto-wrapping comments using 'textwidth', hitting in insert mode, or hitting 'o' or 'O' in normal mode. +vim.opt.runtimepath:remove '/usr/share/vim/vimfiles' -- separate vim plugins from neovim in case vim still in use diff --git a/lua/custom/plugins/auto-session.lua b/lua/custom/plugins/auto-session.lua new file mode 100644 index 00000000000..c1e2b75d0ce --- /dev/null +++ b/lua/custom/plugins/auto-session.lua @@ -0,0 +1,57 @@ +return { + 'rmagatti/auto-session', + lazy = false, + keys = { + -- Will use Telescope if installed or a vim.ui.select picker otherwise + { 'wr', 'AutoSession search', desc = 'Session search' }, + { 'ws', 'AutoSession save', desc = 'Save session' }, + { 'wa', 'AutoSession toggle', desc = 'Toggle autosave' }, + }, + + ---enables autocomplete for opts + ---@module "auto-session" + ---@type AutoSession.Config + opts = { + -- The following are already the default values, no need to provide them if these are already the settings you want. + session_lens = { + picker = nil, -- "telescope"|"snacks"|"fzf"|"select"|nil Pickers are detected automatically but you can also manually choose one. Falls back to vim.ui.select + mappings = { + -- Mode can be a string or a table, e.g. {"i", "n"} for both insert and normal mode + delete_session = { 'i', '' }, + alternate_session = { 'i', '' }, + copy_session = { 'i', '' }, + }, + + picker_opts = { + -- For Telescope, you can set theme options here, see: + -- https://github.com/nvim-telescope/telescope.nvim/blob/master/doc/telescope.txt#L112 + -- https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/themes.lua + -- + -- border = true, + -- layout_config = { + -- width = 0.8, -- Can set width and height as percent of window + -- height = 0.5, + -- }, + + -- For Snacks, you can set layout options here, see: + -- https://github.com/folke/snacks.nvim/blob/main/docs/picker.md#%EF%B8%8F-layouts + -- + -- preset = "dropdown", + -- preview = false, + -- layout = { + -- width = 0.4, + -- height = 0.4, + -- }, + + -- For Fzf-Lua, picker_opts just turns into winopts, see: + -- https://github.com/ibhagwan/fzf-lua#customization + -- + -- height = 0.8, + -- width = 0.50, + }, + + -- Telescope only: If load_on_setup is false, make sure you use `:AutoSession search` to open the picker as it will initialize everything first + load_on_setup = true, + }, + }, +} diff --git a/lua/custom/plugins/autotag.lua b/lua/custom/plugins/autotag.lua new file mode 100644 index 00000000000..064fa188747 --- /dev/null +++ b/lua/custom/plugins/autotag.lua @@ -0,0 +1,6 @@ +return { -- Auto close and change HTML tags + 'windwp/nvim-ts-autotag', + config = function() + require('nvim-ts-autotag').setup() + end, +} diff --git a/lua/custom/plugins/avante.lua b/lua/custom/plugins/avante.lua new file mode 100644 index 00000000000..470331d29f3 --- /dev/null +++ b/lua/custom/plugins/avante.lua @@ -0,0 +1,75 @@ +return { + 'yetone/avante.nvim', + -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` + -- ⚠️ must add this setting! ! ! + build = vim.fn.has 'win32' ~= 0 and 'powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false' or 'make', + event = 'VeryLazy', + version = false, -- Never set this value to "*"! Never! + ---@module 'avante' + ---@type avante.Config + opts = { + -- add any opts here + -- this file can contain specific instructions for your project + instructions_file = 'avante.md', + -- for example + provider = 'claude', + providers = { + claude = { + endpoint = 'https://api.anthropic.com', + model = 'claude-sonnet-4-20250514', + timeout = 30000, -- Timeout in milliseconds + extra_request_body = { + temperature = 0.75, + max_tokens = 20480, + }, + }, + moonshot = { + endpoint = 'https://api.moonshot.ai/v1', + model = 'kimi-k2-0711-preview', + timeout = 30000, -- Timeout in milliseconds + extra_request_body = { + temperature = 0.75, + max_tokens = 32768, + }, + }, + }, + }, + dependencies = { + 'nvim-lua/plenary.nvim', + 'MunifTanjim/nui.nvim', + --- The below dependencies are optional, + 'nvim-mini/mini.pick', -- for file_selector provider mini.pick + 'nvim-telescope/telescope.nvim', -- for file_selector provider telescope + 'hrsh7th/nvim-cmp', -- autocompletion for avante commands and mentions + 'ibhagwan/fzf-lua', -- for file_selector provider fzf + 'stevearc/dressing.nvim', -- for input provider dressing + 'folke/snacks.nvim', -- for input provider snacks + 'nvim-tree/nvim-web-devicons', -- or echasnovski/mini.icons + 'zbirenbaum/copilot.lua', -- for providers='copilot' + { + -- support for image pasting + 'HakonHarnes/img-clip.nvim', + event = 'VeryLazy', + opts = { + -- recommended settings + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + -- required for Windows users + use_absolute_path = true, + }, + }, + }, + { + -- Make sure to set this up properly if you have lazy=true + 'MeanderingProgrammer/render-markdown.nvim', + opts = { + file_types = { 'markdown', 'Avante' }, + }, + ft = { 'markdown', 'Avante' }, + }, + }, +} diff --git a/lua/custom/plugins/bufferline.lua b/lua/custom/plugins/bufferline.lua new file mode 100644 index 00000000000..968096dede6 --- /dev/null +++ b/lua/custom/plugins/bufferline.lua @@ -0,0 +1,81 @@ +return { + 'akinsho/bufferline.nvim', + dependencies = { + 'moll/vim-bbye', + 'nvim-tree/nvim-web-devicons', + }, + config = function() + -- vim.opt.linespace = 8 + + require('bufferline').setup { + options = { + mode = 'buffers', -- set to "tabs" to only show tabpages instead + themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default + numbers = 'none', -- | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string, + close_command = 'Bdelete! %d', -- can be a string | function, see "Mouse actions" + right_mouse_command = 'Bdelete! %d', -- can be a string | function, see "Mouse actions" + left_mouse_command = 'buffer %d', -- can be a string | function, see "Mouse actions" + middle_mouse_command = nil, -- can be a string | function, see "Mouse actions" + -- buffer_close_icon = '󰅖', + buffer_close_icon = '✗', + -- buffer_close_icon = '✕', + close_icon = '', + path_components = 1, -- Show only the file name without the directory + modified_icon = '●', + left_trunc_marker = '', + right_trunc_marker = '', + max_name_length = 30, + max_prefix_length = 30, -- prefix used when a buffer is de-duplicated + tab_size = 21, + diagnostics = false, + diagnostics_update_in_insert = false, + color_icons = true, + show_buffer_icons = true, + show_buffer_close_icons = true, + show_close_icon = true, + persist_buffer_sort = true, -- whether or not custom sorted buffers should persist + separator_style = { '│', '│' }, -- | "thick" | "thin" | { 'any', 'any' }, + enforce_regular_tabs = true, + always_show_bufferline = true, + show_tab_indicators = false, + indicator = { + -- icon = '▎', -- this should be omitted if indicator style is not 'icon' + style = 'none', -- Options: 'icon', 'underline', 'none' + }, + icon_pinned = '󰐃', + minimum_padding = 1, + maximum_padding = 5, + maximum_length = 15, + sort_by = 'insert_at_end', + }, + highlights = { + separator = { + fg = '#434C5E', + }, + buffer_selected = { + bold = true, + italic = false, + }, + -- separator_selected = {}, + -- tab_selected = {}, + -- background = {}, + -- indicator_selected = {}, + -- fill = {}, + }, + } + + -- Keymaps + local opts = { noremap = true, silent = true, desc = 'Go to Buffer' } + -- vim.keymap.set("n", "", "BufferLineCycleNext", {}) + -- vim.keymap.set("n", "", "BufferLineCyclePrev", {}) + -- vim.keymap.set('n', '1', "lua require('bufferline').go_to_buffer(1)", opts) + -- vim.keymap.set('n', '2', "lua require('bufferline').go_to_buffer(2)", opts) + -- vim.keymap.set('n', '3', "lua require('bufferline').go_to_buffer(3)", opts) + -- vim.keymap.set('n', '4', "lua require('bufferline').go_to_buffer(4)", opts) + -- vim.keymap.set('n', '5', "lua require('bufferline').go_to_buffer(5)", opts) + -- vim.keymap.set('n', '6', "lua require('bufferline').go_to_buffer(6)", opts) + -- vim.keymap.set('n', '7', "lua require('bufferline').go_to_buffer(7)", opts) + -- vim.keymap.set('n', '8', "lua require('bufferline').go_to_buffer(8)", opts) + -- vim.keymap.set('n', '9', "lua require('bufferline').go_to_buffer(9)", opts) + end, +} diff --git a/lua/custom/plugins/github-copilot.lua b/lua/custom/plugins/github-copilot.lua new file mode 100644 index 00000000000..a623ef7d734 --- /dev/null +++ b/lua/custom/plugins/github-copilot.lua @@ -0,0 +1,3 @@ +return { -- Github Copilot autosuggestions + 'github/copilot.vim', +} diff --git a/lua/custom/plugins/lsp-file-operations.lua b/lua/custom/plugins/lsp-file-operations.lua new file mode 100644 index 00000000000..23391ad6a2a --- /dev/null +++ b/lua/custom/plugins/lsp-file-operations.lua @@ -0,0 +1,13 @@ +return { -- File operations (rename, move etc...) improvements for auto renaming imports + 'antosha417/nvim-lsp-file-operations', + dependencies = { + 'nvim-lua/plenary.nvim', + -- Uncomment whichever supported plugin(s) you use + -- "nvim-tree/nvim-tree.lua", + 'nvim-neo-tree/neo-tree.nvim', + -- "simonmclean/triptych.nvim" + }, + config = function() + require('lsp-file-operations').setup() + end, +} diff --git a/lua/custom/plugins/refactoring.lua b/lua/custom/plugins/refactoring.lua new file mode 100644 index 00000000000..c44a6d82a0b --- /dev/null +++ b/lua/custom/plugins/refactoring.lua @@ -0,0 +1,9 @@ +return { -- Refactoring (extracting/inlining methods and variables) use :Refactor + 'ThePrimeagen/refactoring.nvim', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-treesitter/nvim-treesitter', + }, + lazy = false, + opts = {}, +} diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index af8d4495650..b0d5979a37c 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -24,6 +24,11 @@ return { ['\\'] = 'close_window', }, }, + follow_current_file = { + enabled = true, + leave_dirs_open = false, + }, + buffers = { follow_current_file = { enable = true } }, }, }, }