diff --git a/.stylua.toml b/.stylua.toml deleted file mode 100644 index 047d961..0000000 --- a/.stylua.toml +++ /dev/null @@ -1,7 +0,0 @@ -call_parentheses = "Always" -collapse_simple_statement = "Never" -column_width = 120 -indent_type = "Spaces" -indent_width = 4 -line_endings = "Unix" -quote_style = "AutoPreferSingle" diff --git a/README.md b/README.md deleted file mode 100644 index 9ee5f55..0000000 --- a/README.md +++ /dev/null @@ -1,157 +0,0 @@ -
- -vim.api.nvim_create_autocmd('FileType', { - group = augroup('close_with_q'), - pattern = { - 'DressingSelect', - 'Jaq', - 'PlenaryTestPopup', - 'fugitive', - 'help', - 'lir', - 'lspinfo', - 'man', - 'notify', - 'qf', - 'spectre_panel', - 'startuptime', - 'tsplayground', - }, - callback = function(event) - vim.bo[event.buf].buflisted = false - vim.keymap.set('n', 'q', 'close ', { buffer = event.buf, silent = true }) - end, -}) - --- wrap and check for spell in text filetypes -vim.api.nvim_create_autocmd('FileType', { - group = augroup('wrap_spell'), - pattern = { 'gitcommit', 'markdown' }, - callback = function() - vim.opt_local.wrap = true - vim.opt_local.spell = true - end, -}) - --- Auto create dir when saving a file, in case some intermediate directory does not exist -vim.api.nvim_create_autocmd({ 'BufWritePre' }, { - group = augroup('auto_create_dir'), - callback = function(event) - local file = vim.loop.fs_realpath(event.match) or event.match - vim.fn.mkdir(vim.fn.fnamemodify(file, ':p:h'), 'p') - end, -}) - --- Set arb filetype -vim.api.nvim_create_autocmd({ 'BufEnter' }, { - group = augroup('set_file_type'), - pattern = { '*.arb' }, - command = require('lib.util').get_file_type_cmd('arb'), -}) - --- Disable format options -vim.api.nvim_create_autocmd('FileType', { - group = augroup('disable_formatoptions'), - pattern = '*', - callback = function() - vim.opt_local.formatoptions:remove({ 'c', 'r', 'o' }) - end, -}) - - diff --git a/lua/core/functions.lua b/lua/core/functions.lua deleted file mode 100644 index 6e2da4f..0000000 --- a/lua/core/functions.lua +++ /dev/null @@ -1,41 +0,0 @@ --- Reload neovim config -vim.api.nvim_create_user_command('ReloadConfig', function() - for name, _ in pairs(package.loaded) do - if name:match('^plugins') then - package.loaded[name] = nil - end - end - - dofile(vim.env.MYVIMRC) - vim.notify('Nvim configuration reloaded!', vim.log.levels.INFO) -end, {}) - --- Copy relative path -vim.api.nvim_create_user_command('CopyRelativePath', function() - local path = vim.fn.expand('%') - vim.fn.setreg('+', path) - vim.notify('Copied "' .. path .. '" to the clipboard!') -end, {}) - --- Copy absolute path -vim.api.nvim_create_user_command('CopyAbsolutePath', function() - local path = vim.fn.expand('%:p') - vim.fn.setreg('+', path) - vim.notify('Copied "' .. path .. '" to the clipboard!') -end, {}) - -vim.api.nvim_create_user_command('CopyFileName', function() - local path = vim.fn.expand('%:t') - vim.fn.setreg('+', path) - vim.notify('Copied "' .. path .. '" to the clipboard!') -end, {}) - --- Switch to git root or file parent dir -vim.api.nvim_create_user_command('RootDir', function() - local root = require('lib.util').get_root_dir() - - if root == '' then - return - end - vim.cmd('lcd ' .. root) -end, {}) diff --git a/lua/core/keys.lua b/lua/core/keys.lua deleted file mode 100644 index 6e538f1..0000000 --- a/lua/core/keys.lua +++ /dev/null @@ -1,211 +0,0 @@ -local function map(mode, lhs, rhs, opts) - opts = opts or {} - opts.silent = opts.silent ~= false - vim.keymap.set(mode, lhs, rhs, opts) -end -local opts = { noremap = true, silent = true } -local icons = require('lib.icons') - --- Space as leader -map('n', ' ', '', opts) -vim.g.mapleader = ' ' -vim.g.maplocalleader = ' ' - --- Modes --- normal_mode = "n", insert_mode = "i", visual_mode = "v", --- visual_block_mode = "x", term_mode = "t", command_mode = "c", - --- Save File -map({ - "i", - "v", - "n", - "s" -}, " ", " w ", { - desc = "Save file" -}) - --- ctrl a to selected all text in file -map({ - "n", - "i", - "v" -}, " ", " ggVG") - --- Copy whole file -map("n", " ", " %y+ ", { - desc = "Copy whole file" -}) - - --- Paste -map("n", "]p", "o p", { - desc = "Paste below" -}) -map("n", "[P", "O p", { - desc = "Paste above" -}) -map("i", " ", ' "+p a', { - desc = "Paste from clipboard" -}) -map({ - "n", - "x" -}, " ", '"+y ', { - desc = "Copy to clipboard" -}) - --- Better escape using jk in insert and terminal mode -map("i", "jk", " ") -map("i", "kj", " ") -map("i", "jj", " ") - --- Terminal Mappings -map("t", "jk", " ") -map("t", "kj", " ") -map("t", " ", " ") - - --- Visual overwrite paste -map({ 'v', 'x' }, 'p', '"_dP', opts) - --- Do not copy on x -map({ 'v', 'x' }, 'x', '"_x', opts) - --- Increment/decrement -map({ 'n', 'v', 'x' }, '-', ' ', opts) -map({ 'n', 'v', 'x' }, '=', ' ', opts) - --- Move to line beginning and end -map({ 'n', 'v', 'x' }, 'gl', '$', { desc = 'End of line' }) -map({ 'n', 'v', 'x' }, 'gh', '^', { desc = 'Beginning of line' }) - --- Center Cursors -map('n', 'J', 'mzJ`z', opts) -map('n', ' ', ' zz', opts) -map('n', ' ', ' zz', opts) -map('n', 'n', 'nzzzv', opts) -map('n', 'N', 'Nzzzv', opts) - --- Better up/down -vim.keymap.set({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) -vim.keymap.set({ "n", "x" }, " ", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) -vim.keymap.set({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) -vim.keymap.set({ "n", "x" }, " ", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) - --- Move text up and down -vim.keymap.set("n", " ", " m .+1 ==", { desc = "Move Down" }) -vim.keymap.set("n", " ", " m .-2 ==", { desc = "Move Up" }) -vim.keymap.set("i", " ", " m .+1 ==gi", { desc = "Move Down" }) -vim.keymap.set("i", " ", " m .-2 ==gi", { desc = "Move Up" }) -vim.keymap.set("v", " ", ":m '>+1 gv=gv", { desc = "Move Down" }) -vim.keymap.set("v", " ", ":m '<-4 gv=gv", { desc = "Move Up" }) - --- Clear search, diff update and redraw -map({ 'i', 'n' }, ' ', ' noh ', { desc = 'Escape and clear hlsearch' }) - --- Consistent n/N search navigation -map('n', 'n', "'Nn'[v:searchforward]", { expr = true, desc = 'Next search result' }) -map('x', 'n', "'Nn'[v:searchforward]", { expr = true, desc = 'Next search result' }) -map('o', 'n', "'Nn'[v:searchforward]", { expr = true, desc = 'Next search result' }) -map('n', 'N', "'nN'[v:searchforward]", { expr = true, desc = 'Prev search result' }) -map('x', 'N', "'nN'[v:searchforward]", { expr = true, desc = 'Prev search result' }) -map('o', 'N', "'nN'[v:searchforward]", { expr = true, desc = 'Prev search result' }) - --- Better indenting -map('v', '<', ' ', '>gv') - --- Add undo breakpoints -map('i', ',', ', u') -map('i', '.', '. u') -map('i', ';', '; u') - - --- Search -map({ - "n", - "x" -}, "gw", "*N", { - desc = "Search word under cursor" -}) - - --- Insert empty line in insert mode -map("i", " ", " o", { - desc = "Insert empty line below" -}) -map("i", " ", " O", { - desc = "Insert empty line above" -}) - --- Insert empty line without entering insert mode -map('n', '[o', ': call append(line("."), repeat([""], v:count1)) ', { - desc = "Insert empty line below" -}) -map('n', ']o', ': call append(line(".")-1, repeat([""], v:count1)) ', { - desc = "Insert empty line above" -}) - --- go to beginning and end in insert mode -map("i", " ", " ^i", { - desc = "Go to beginning of line" -}) -map("i", " ", " ", { - desc = "Go to end of line" -}) - --- navigate within insert mode -map("i", " ", " ", { - desc = "Move Left" -}) -map("i", " ", " ", { - desc = "Move Right" -}) -map("i", " ", " ", { - desc = "Move Down" -}) -map("i", " ", " ", { - desc = "Move Up" -}) - - --- Move to window using the hjkl keys -vim.keymap.set("n", " ", " h", { desc = "Go to Left Window", remap = true }) -vim.keymap.set("n", " ", " j", { desc = "Go to Lower Window", remap = true }) -vim.keymap.set("n", " ", " k", { desc = "Go to Upper Window", remap = true }) -vim.keymap.set("n", " ", " l", { desc = "Go to Right Window", remap = true }) - - --- Move with shift-arrows -map("n", " ", " ", { - desc = "Move window to the left" -}) -map("n", " ", " ", { - desc = "Move window down" -}) -map("n", " ", " ", { - desc = "Move window up" -}) -map("n", " ", " ", { - desc = "Move window to the right" -}) - --- Resize window using arrow keys -vim.keymap.set("n", " ", " resize +2 ", { desc = "Increase Window Height" }) -vim.keymap.set("n", " ", " resize -2 ", { desc = "Decrease Window Height" }) -vim.keymap.set("n", " ", " vertical resize -2 ", { desc = "Decrease Window Width" }) -vim.keymap.set("n", " ", " vertical resize +2 ", { desc = "Increase Window Width" }) - - --- Codeium -map('i', ' ', function () return vim.fn['codeium#Accept']() end, { expr = true, silent = true }) -map('i', ' ', function() return vim.fn['codeium#CycleCompletions'](1) end, { expr = true, silent = true }) -map('i', ' ', function() return vim.fn['codeium#CycleCompletions'](-1) end, { expr = true, silent = true }) -map('i', ' ', function() return vim.fn['codeium#Clear']() end, { expr = true, silent = true }) - - -map('n', ' mu', function() - require("notify").dismiss({ silent = true, pending = true }) - end, { desc = 'Dismiss All Notifications' }) - diff --git a/lua/core/options.lua b/lua/core/options.lua deleted file mode 100644 index 650d869..0000000 --- a/lua/core/options.lua +++ /dev/null @@ -1,89 +0,0 @@ -local options = { - ai = true, - autoindent = true, - autowrite = true, - backspace = 'indent,eol,start', - backup = false, -- creates a backup file - breakindent = true, - clipboard = 'unnamedplus', -- allows neovim to access the system clipboard - cmdheight = 1, -- more space in the neovim command line for displaying messages - completeopt = 'menu,menuone,noselect', -- mostly just for cmp - conceallevel = 0, -- so that `` is visible in markdown files - confirm = true, -- Confirm to save changes before exiting modified buffer - cursorline = true, -- highlight the current line - expandtab = true, -- convert tabs to spaces - fileencoding = 'utf-8', -- the encoding written to a file - formatoptions = 'jlnqt', -- set formatoptions, check help fo-table - grepformat = '%f:%l:%c:%m', - grepprg = 'rg --vimgrep', - hlsearch = true, -- highlight all matches on previous search pattern - ignorecase = true, -- ignore case in search patterns - inccommand = 'split', -- preview incremental substitute - laststatus = 3, - list = true, - listchars = { trail = '๏', tab = '๏๏ ', nbsp = '_', extends = '>', precedes = '<' }, -- highlight - mouse = 'a', -- allow the mouse to be used in neovim - number = true, -- set numbered lines - numberwidth = 4, -- set number column width to 2 {default 4} - pumblend = 10, -- Popup blen - pumheight = 10, -- pop up menu height - relativenumber = true, -- set relative numbered lines - scrolloff = 10, -- is one of my fav - sessionoptions = 'blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal', - shiftround = true, -- Round indent - shiftwidth = 4, -- the number of spaces inserted for each indentation - showcmd = false, - showmode = false, -- we don't need to see things like -- INSERT -- anymore - showtabline = 0, -- always show tabs - si = true, - sidescrolloff = 8, - signcolumn = 'yes', -- always show the sign column, otherwise it would shift the text each time - smartcase = true, -- smart case - smartindent = true, -- make indenting smarter again - smarttab = true, - splitbelow = true, -- force all horizontal splits to go below current window - splitright = true, -- force all vertical splits to go to the right of current window - swapfile = false, -- creates a swapfile - tabstop = 4, -- insert 2 spaces for a tab - termguicolors = true, -- set term gui colors (most terminals support this) - timeoutlen = 300, -- time to wait for a mapped sequence to complete (in milliseconds) - undofile = true, -- enable persistent undo - undolevels = 10000, - updatetime = 50, -- faster completion (4000ms default) - wildmenu = true, -- wildmenu - wildmode = 'longest:full,full', -- Command-line completion mode - winminwidth = 5, -- Minimum window width - wrap = false, -- display lines as one long line - writebackup = false, -- do not edit backups -} - -for k, v in pairs(options) do - vim.opt[k] = v -end - --- netrw file explorer settings -vim.g.netrw_winsize = 20 -vim.g.netrw_banner = 0 -vim.g.netrw_liststyle = 1 - --- Fix markdown indentation settings -vim.g.markdown_recommended_style = 0 - -vim.opt.path:append({ '**' }) -vim.opt.shortmess:append({ W = true, I = true, c = true }) - --- hides `~` at the end of the buffer -vim.cmd([[set fillchars+=eob:\ ]]) - -vim.cmd([[ - setlocal spell spelllang=en "Set spellcheck language to en - setlocal spell! "Disable spell checks by default - filetype plugin indent on - if has('win32') - let g:python3_host_prog = $HOME . '/scoop/apps/python/current/python.exe' - endif - let &t_Cs = "\e[4:3m" "Undercurl - let &t_Ce = "\e[4:0m" - set whichwrap+=<,>,[,],h,l - set iskeyword+=- - ]]) diff --git a/lua/keymaps.lua b/lua/keymaps.lua new file mode 100644 index 0000000..f4d05d0 --- /dev/null +++ b/lua/keymaps.lua @@ -0,0 +1,104 @@ +-- File Explorer +vim.keymap.set('n', ' n', ':Neotree filesystem reveal left toggle ') + +-- Telescope +vim.keymap.set('n', ' ff', ':Telescope find_files ') +vim.keymap.set('n', ' tc', ':Telescope colorscheme ') +vim.keymap.set('n', ' of', ':Telescope oldfiles ') +vim.keymap.set('n', ' tl', ':Telescope live_grep ') +vim.keymap.set('n', ' km', ':Telescope keymaps ') +vim.keymap.set('n', ' tf', function() + require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown({ + previewer = false, + })) +end) + +-- formatter +vim.keymap.set('n', ' ft', vim.lsp.buf.format, {}) + +-- buffer +vim.keymap.set('n', ' ', ':BufferNext ') +vim.keymap.set('n', ' ', ':BufferPrevious ') +vim.keymap.set('n', ' q', ':BufferClose ') + +-- comment +vim.keymap.set('n', ' /', 'gcc', { remap = true }) + +-- terminal +vim.keymap.set('n', ' tr', ':ToggleTerm ') + +-- File Explorer +vim.keymap.set('n', ' e', function() + require('oil').toggle_float() +end) + +-- Clear search, diff update and redraw +vim.keymap.set({ 'i', 'n' }, ' ', ' noh ', { desc = 'Escape and clear hlsearch' }) + +-- Move to window using the hjkl keys +vim.keymap.set('n', ' ', ' h', { desc = 'Go to Left Window', remap = true }) +vim.keymap.set('n', ' ', ' j', { desc = 'Go to Lower Window', remap = true }) +vim.keymap.set('n', ' ', ' k', { desc = 'Go to Upper Window', remap = true }) +vim.keymap.set('n', ' ', ' l', { desc = 'Go to Right Window', remap = true }) + +-- Move with shift-arrows +vim.keymap.set('n', ' ', ' ', { + desc = 'Move window to the left', +}) +vim.keymap.set('n', ' ', ' ', { + desc = 'Move window down', +}) +vim.keymap.set('n', ' ', ' ', { + desc = 'Move window up', +}) +vim.keymap.set('n', ' ', ' ', { + desc = 'Move window to the right', +}) + +-- Resize window using arrow keys +vim.keymap.set('n', ' ', ' resize +2 ', { desc = 'Increase Window Height' }) +vim.keymap.set('n', ' ', ' resize -2 ', { desc = 'Decrease Window Height' }) +vim.keymap.set('n', ' ', ' vertical resize -2 ', { desc = 'Decrease Window Width' }) +vim.keymap.set('n', ' ', ' vertical resize +2 ', { desc = 'Increase Window Width' }) + +-- clear notification +vim.keymap.set('n', ' mu', function() + require('notify').dismiss({ silent = true, pending = true }) +end, { desc = 'Dismiss All Notifications' }) + +-- Harpoon Keybinds +-- Open harpoon ui +vim.keymap.set('n', ' ho', function() + harpoon_ui.toggle_quick_menu() +end) + +-- Add current file to harpoon +vim.keymap.set('n', ' ha', function() + harpoon.mark.add_file() +end) + +-- Remove current file from harpoon +vim.keymap.set('n', ' hr', function() + harpoon.mark.rm_file() +end) + +-- Quickly jump to harpooned files +vim.keymap.set('n', ' 1', function() + harpoon.ui.nav_file(1) +end) + +vim.keymap.set('n', ' 2', function() + harpoon.ui.nav_file(2) +end) + +vim.keymap.set('n', ' 3', function() + harpoon.ui.nav_file(3) +end) + +vim.keymap.set('n', ' 4', function() + harpoon.ui.nav_file(4) +end) + +vim.keymap.set('n', ' 5', function() + harpoon.ui.nav_file(5) +end) diff --git a/lua/lib/icons.lua b/lua/lib/icons.lua deleted file mode 100644 index 00bcf56..0000000 --- a/lua/lib/icons.lua +++ /dev/null @@ -1,164 +0,0 @@ -return { - diagnostics = { - Error = '๏ ', - Hint = '๓ฐ ', - Information = '๏ ', - Question = '๏ ', - Warning = '๏ฑ ', - }, - documents = { - File = '๏ ', - FileEmpty = '๏ ', - Files = '๏ ', - Folder = '๎ฟ ', - FolderEmpty = '๏ ', - OpenFolder = '๏ผ ', - OpenFolderEmpty = '๏ ', - SymLink = '๏ ', - SymlinkFolder = '๏ ', - Import = '๎ฝ ', - }, - git = { - Add = '๏ ', - AddAlt = '๏ ', - Branch = '๏ ', - Diff = '๏ ', - DiffAlt = '๏ ', - Ignore = 'โ ', - Mod = '๏ ', - Octoface = '๏ ', - Remove = '๏ ', - RemoveAlt = '๏ ', - Rename = '๏ฐ ', - Repo = '๏ ', - Tag = '๏ซ ', - Untrack = '๏ ', - }, - kind = { - Class = '๎ญฆ ', - Color = '๎ซ ', - Constant = '๎ญ ', - Constructor = '๓ฐ ', - Enum = '๏ ', - EnumMember = '๎ช ', - Event = '๏ง ', - Field = '๏ ', - File = '๏ ', - Folder = '๎ฟ ', - Function = '๓ฐ ', - Interface = '๏จ ', - Keyword = '๏ ', - Method = '๏ก ', - Module = '๏', - Operator = '๏ฌ ', - Property = '๏ญ ', - Reference = '๏ ', - Snippet = '๏ ', - Struct = '๏ณ ', - Text = '๎ ', - TypeParameter = '๏ ', - Unit = '๎ ', - Value = '๏ท ', - Variable = '๏ ', - }, - type = { - Array = '๎ช ', - Boolean = 'โป ', - Number = '๏ ', - Object = '๏ ', - String = '๏ต ', - }, - ui = { - Arrow = '๏ฒ ', - ArrowClosed = '๏ธ ', - ArrowLeft = '๏จ ', - ArrowOpen = '๏ ', - ArrowRight = '๏ฉ ', - Bluetooth = '๏ ', - Bookmark = '๏ฎ ', - Bug = '๏ ', - Calendar = '๏ณ ', - Camera = '๏ฐ ', - Check = '๏ ', - ChevronRight = '๏', - Circle = '๏ ', - CircleSmall = 'โ ', - CircleSmallEmpty = 'โ ', - Clipboard = '๏ช ', - Close = '๏ ', - Code = '๏ก ', - Collection = '๏ ', - Color = '๎ซ ', - Command = '๏ ', - Comment = '๏บ ', - Copilot = '๏ธ ', - CopilotError = '๏บ ', - Corner = 'โ ', - Dashboard = '๏ฃ ', - Database = '๏ ', - Download = '๏ ', - Edge = 'โ ', - Electric = '๎ช ', - Eye = '๏ ', - Fire = '๏ ', - Firefox = '๏ฉ ', - Flag = '๏ค ', - Game = '๏ ', - Gear = '๏ฃ ', - GitHub = '๏ ', - Heart = '๏ก ', - History = '๏ ', - Home = '๏ญ ', - Incoming = '๏ฃถ ', - Jump = '๏ฒ ', - Keyboard = '๏ ', - Ligthbulb = '๓ฐต ', - List = '๏ข', - Lock = '๏ฃ ', - Minus = 'โ ', - Music = '๓ฐ ', - Neovim = '๏ฏ ', - NewFile = '๏ ', - None = ' ', - Note = '๏ ', - Outgoing = '๏ฃบ ', - Package = '๏ฒ ', - Paint = '๏ผ ', - Pause = '๏ ', - Pencil = '๏ ', - Person = '๏ ', - Pin = '๏ต ', - Play = '๏ ', - Plug = '๏ฆ ', - Plus = '๎ฉ ', - Power = '๏ ', - PowerlineArrowLeft = '๎ฒ', - PowerlineArrowRight = '๎ฐ', - PowerlineLeftRound = '๎ถ', - PowerlineRightRound = '๎ด', - Project = '๏ป ', - Question = '๏จ ', - Reload = '๏ก ', - Rocket = '๏ต ', - Save = '๓ฐ ', - Search = '๏ข ', - Separator = 'โ ', - SeparatorLight = 'โ', - SeparatorDashed = 'โ', - SignIn = '๏ช ', - SignOut = '๏ฆ ', - Sleep = '๓ฐฒ ', - Star = '๏ ', - Table = '๏ ', - Telescope = '๏ซ ', - Terminal = '๏ ', - Test = '๏ ', - Time = '๏ ', - Topline = 'โพ', - Trash = '๏ธ ', - User = '๏ฟ ', - Vim = '๎ซ ', - Wifi = '๏ซ ', - Windows = '๏ บ ', - }, -} diff --git a/lua/lib/util.lua b/lua/lib/util.lua deleted file mode 100644 index b2f3de1..0000000 --- a/lua/lib/util.lua +++ /dev/null @@ -1,66 +0,0 @@ -local util = {} - -util.get_user_config = function(key, default) - local status_ok, user = pcall(require, 'user') - if not status_ok then - return default - end - - local user_config = user[key] - if user_config == nil then - return default - end - return user_config -end - -util.get_root_dir = function() - local bufname = vim.fn.expand('%:p') - if vim.fn.filereadable(bufname) == 0 then - return - end - - local parent = vim.fn.fnamemodify(bufname, ':h') - local git_root = vim.fn.systemlist('git -C ' .. parent .. ' rev-parse --show-toplevel') - if #git_root > 0 and git_root[1] ~= '' then - return git_root[1] - else - return parent - end -end - -util.get_file_type_cmd = function(extension) - local root = util.get_root_dir() - - if extension == 'arb' and root then - local gemfile_exists = vim.fn.filereadable(root .. '/Gemfile') == 1 - local pubspec_exists = vim.fn.filereadable(root .. '/pubspec.yaml') == 1 - if gemfile_exists then - return 'setfiletype ruby' - end - if pubspec_exists then - return 'setfiletype json' - end - end - return '' -end - -util.is_present = function(bin) - return vim.fn.executable(bin) == 1 -end - -util.telescope_select = function(options, options_desc, select_prompt) - require('telescope.pickers') - .new({}, { - prompt_title = select_prompt, - results_title = options_desc, - finder = require('telescope.finders').new_table({ - results = options, - entry_maker = require('telescope.make_entry').gen_from_file(), - }), - sorter = require('telescope.sorters').get_fzy_sorter(), - previewer = require('telescope.previewers').vim_buffer_cat.new({}), - }) - :find() -end - -return util diff --git a/lua/plugins.lua b/lua/plugins.lua new file mode 100644 index 0000000..a564707 --- /dev/null +++ b/lua/plugins.lua @@ -0,0 +1 @@ +return {} diff --git a/lua/plugins/auto-pairs.lua b/lua/plugins/auto-pairs.lua new file mode 100644 index 0000000..4a30ea8 --- /dev/null +++ b/lua/plugins/auto-pairs.lua @@ -0,0 +1,6 @@ +return { + 'altermo/ultimate-autopair.nvim', + event = { 'InsertEnter', 'CmdlineEnter' }, + branch = 'v0.6', + opts = {}, +} diff --git a/lua/plugins/barbar.lua b/lua/plugins/barbar.lua new file mode 100644 index 0000000..598eba3 --- /dev/null +++ b/lua/plugins/barbar.lua @@ -0,0 +1,3 @@ +return { + "romgrk/barbar.nvim", +} diff --git a/lua/plugins/codeium.lua b/lua/plugins/codeium.lua new file mode 100644 index 0000000..6ebd18b --- /dev/null +++ b/lua/plugins/codeium.lua @@ -0,0 +1,25 @@ +return { + 'Exafunction/codeium.vim', + event = 'BufEnter', + cmd = 'Codeium', + build = 'Codeium Auth:', + dependencies = { + 'nvim-lua/plenary.nvim', + 'hrsh7th/nvim-cmp', + }, + + config = function() + vim.keymap.set('i', ' ', function() + return vim.fn['codeium#Accept']() + end, { expr = true, silent = true }) + vim.keymap.set('i', ' ', function() + return vim.fn['codeium#CycleCompletions'](1) + end, { expr = true, silent = true }) + vim.keymap.set('i', ' ', function() + return vim.fn['codeium#CycleCompletions'](-1) + end, { expr = true, silent = true }) + vim.keymap.set('i', ' ', function() + return vim.fn['codeium#Clear']() + end, { expr = true, silent = true }) + end, +} diff --git a/lua/plugins/colorschemes.lua b/lua/plugins/colorschemes.lua new file mode 100644 index 0000000..23bfb0c --- /dev/null +++ b/lua/plugins/colorschemes.lua @@ -0,0 +1,27 @@ +return { + 'navarasu/onedark.nvim', + + config = function() + require('onedark').setup({ + style = 'deep', + transparent = true, + term_colors = false, + ending_tildes = false, + cmp_itemkind_reverse = false, + -- toggle_style_key = ' ot', + -- toggle_style_list = { 'dark', 'darker', 'cool', 'warm', 'warmer', 'deep', 'light' }, + + -- Options are italic, bold, underline, none and combos 'italic,bold' + code_style = { + comments = 'italic', + keywords = 'none', + functions = 'none', + strings = 'none', + variables = 'none', + }, + + lualine = { transparent = true }, + diagnostics = { darker = true, undercurl = true, background = false }, + }) + end, +} diff --git a/lua/plugins/completions.lua b/lua/plugins/completions.lua new file mode 100644 index 0000000..094d769 --- /dev/null +++ b/lua/plugins/completions.lua @@ -0,0 +1,63 @@ +return { + { + 'hrsh7th/cmp-nvim-lsp', + }, + { + 'hrsh7th/nvim-cmp', + + dependencies = { + 'saadparwaiz1/cmp_luasnip', + 'L3MON4D3/LuaSnip', + 'rafamadriz/friendly-snippets', + 'onsails/lspkind.nvim', + }, + + config = function() + local cmp = require('cmp') + local lspkind = require('lspkind') + + cmp.setup({ + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + require('luasnip.loaders.from_vscode').lazy_load() + end, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [' '] = cmp.mapping.scroll_docs(-4), + [' '] = cmp.mapping.scroll_docs(4), + [' '] = cmp.mapping.complete(), + [' '] = cmp.mapping.abort(), + [' '] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, -- For luasnip users. + { name = 'codeium' }, + }, { + { name = 'buffer' }, + }), + formatting = { + format = lspkind.cmp_format({ + mode = 'symbol', -- show only symbol annotations + maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) + -- can also be a function to dynamically calculate max width such as + -- maxwidth = function() return math.floor(0.45 * vim.o.columns) end, + ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) + show_labelDetails = true, -- show labelDetails in menu. Disabled by default + + -- The function below will be called before any actual modifications from lspkind + -- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30)) + before = function(entry, vim_item) + return vim_item + end, + }), + }, + }) + end, + }, +} diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua new file mode 100644 index 0000000..1059a66 --- /dev/null +++ b/lua/plugins/dashboard.lua @@ -0,0 +1,10 @@ +return { + 'nvimdev/dashboard-nvim', + event = 'VimEnter', + config = function() + require('dashboard').setup({ + -- config + }) + end, + dependencies = { { 'nvim-tree/nvim-web-devicons' } }, +} diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua new file mode 100644 index 0000000..e8e10be --- /dev/null +++ b/lua/plugins/harpoon.lua @@ -0,0 +1,6 @@ +return { + { + 'ThePrimeagen/harpoon', + lazy = true, + }, +} diff --git a/lua/plugins/lang/ai.lua b/lua/plugins/lang/ai.lua deleted file mode 100644 index 45f69d4..0000000 --- a/lua/plugins/lang/ai.lua +++ /dev/null @@ -1,35 +0,0 @@ -local ai = require('mini.ai') - -ai.setup({ - custom_textobjects = { - o = ai.gen_spec.treesitter({ - a = { '@block.outer', '@conditional.outer', '@loop.outer' }, - i = { '@block.inner', '@conditional.inner', '@loop.inner' }, - }, {}), - f = ai.gen_spec.treesitter({ a = '@function.outer', i = '@function.inner' }, {}), - c = ai.gen_spec.treesitter({ a = '@class.outer', i = '@class.inner' }, {}), - t = { '<([%p%w]-)%f[^<%w][^<>]->.-%1>', '^<.->().*()[^/]->$' }, - }, - - mappings = { - -- Main textobject prefixes - around = 'a', - inside = 'i', - - -- Next/last variants - around_next = 'an', - inside_next = 'in', - around_last = 'al', - inside_last = 'il', - - -- Move cursor to corresponding edge of `a` textobject - goto_left = 'g[', - goto_right = 'g]', - }, - - -- How to search for object - -- 'cover', 'cover_or_next', 'cover_or_prev','cover_or_nearest', 'next', 'previous', 'nearest'. - search_method = 'cover_or_next', - n_lines = 500, - silent = false, -}) diff --git a/lua/plugins/lang/autopairs.lua b/lua/plugins/lang/autopairs.lua deleted file mode 100644 index ae6231f..0000000 --- a/lua/plugins/lang/autopairs.lua +++ /dev/null @@ -1,26 +0,0 @@ -local npairs = require('nvim-autopairs') - -npairs.setup({ - check_ts = true, - ts_config = { - lua = { 'string', 'source' }, - javascript = { 'string', 'template_string' }, - java = false, - }, - disable_filetype = { 'TelescopePrompt', 'spectre_panel' }, - fast_wrap = { - map = ' ', - chars = { '{', '[', '(', '"', "'" }, - pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], '%s+', ''), - offset = 0, - end_key = '$', - keys = 'qwertyuiopzxcvbnmasdfghjkl', - check_comma = true, - highlight = 'PmenuSel', - highlight_grey = 'LineNr', - }, -}) - -local cmp_autopairs = require('nvim-autopairs.completion.cmp') -local cmp = require('cmp') -cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) diff --git a/lua/plugins/lang/cmp.lua b/lua/plugins/lang/cmp.lua deleted file mode 100644 index 4ff4069..0000000 --- a/lua/plugins/lang/cmp.lua +++ /dev/null @@ -1,246 +0,0 @@ -local cmp = require('cmp') -local luasnip = require('luasnip') - -require('luasnip/loaders/from_vscode').lazy_load() - -local icons = require('lib.icons') -local kind_icons = icons.kind - -local max_count = 15 - local rounded_border = true - - local function border(hl_name) - if rounded_border then - return { - { "โญ", hl_name }, - { "โ", hl_name }, - { "โฎ", hl_name }, - { "โ", hl_name }, - { "โฏ", hl_name }, - { "โ", hl_name }, - { "โฐ", hl_name }, - { "โ", hl_name }, - } - else - return { - { "โ", hl_name }, - { "โ", hl_name }, - { "โ", hl_name }, - { "โ", hl_name }, - { "โ", hl_name }, - { "โ", hl_name }, - { "โ", hl_name }, - { "โ", hl_name }, - } - end - end - - -- ๏ ๏จ ๏ญ ๏ฏ ๏ ๏ฑ some other good icons - local kind_icons = { - Text = "๎", - Method = "๏ก '", - Function = "๓ฐ", - Constructor = "๓ฐ", - Field = "๏", - Variable = "๏", - Class = "๎ญฆ", - Interface = "๏จ", - Module = "๏", - Property = "๏ญ", - Unit = "๎", - Value = "๏ท ", - Enum = "๏ ", - Keyword = "๏", - Snippet = "๏", - Color = "๎ซ", - File = "๏ ", - Reference = "๏", - Folder = "๎ฟ", - EnumMember = "๎ช", - Constant = "๎ญ", - Struct = "๏ณ", - Event = "๏ง", - Operator = "๏ฌ", - TypeParameter = "๏", - } - -cmp.setup({ - completion = { - completeopt = 'menu,menuone,preview,noselect', - }, - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - - mapping = { - [' '] = cmp.mapping.select_prev_item(), - [' '] = cmp.mapping.select_next_item(), - [' '] = cmp.mapping(cmp.mapping.scroll_docs(-1), { 'i', 'c' }), - [' '] = cmp.mapping(cmp.mapping.scroll_docs(1), { 'i', 'c' }), - [' '] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), - [' '] = cmp.mapping.scroll_docs(-4), - [' '] = cmp.mapping.scroll_docs(4), - [' '] = cmp.config.disable, - [' '] = cmp.mapping({ - i = cmp.mapping.abort(), - c = cmp.mapping.close(), - }), - [' '] = cmp.mapping.confirm({ - behavior = cmp.ConfirmBehavior.Replace, - select = false, - }), - [' '] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expandable() then - luasnip.expand() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end, { 'i', 's' }), - [' '] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { 'i', 's' }), - }, - formatting = { - fields = { 'kind', 'abbr', 'menu' }, - expandable_indicator = true, - format = function(entry, vim_item) - -- Kind icons - vim_item.kind = kind_icons[vim_item.kind] - vim_item.menu = ({ - codeium = '[Codeium]', - nvim_lsp = '[LSP]', - luasnip = '[Snippet]', - buffer = '[Buffer]', - path = '[Path]', - })[entry.source.name] - return vim_item - end, - }, - sources = { - { name = 'nvim_lsp' }, - { name = 'path' }, - { name = 'nvim_lua' }, - { name = 'luasnip', keyword_length = 2 }, - { name = 'buffer', keyword_length = 3 }, - { name = 'codeium'}, - { name = 'lazydev', group_index = 0 }, - }, - confirm_opts = { - behavior = cmp.ConfirmBehavior.Replace, - select = false, - }, - window = { - documentation = { - border = 'rounded', - winhighlight = 'NormalFloat:Pmenu,NormalFloat:Pmenu,CursorLine:PmenuSel,Search:None', - max_height = 15, - scrollbar = false, - }, - completion = { - border = 'rounded', - winhighlight = 'NormalFloat:Pmenu,NormalFloat:Pmenu,CursorLine:PmenuSel,Search:None', - scrollbar = false, - }, - }, - experimental = { - ghost_text = true - } -}) - - -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline({'/','?'}, { - formatting = { - fields = { "kind", "abbr" }, - format = function(entry, vim_item) - -- Kind icons - vim_item.kind = string.format("%s", kind_icons[vim_item.kind]) - vim_item.menu = ({ - buffer = "(buffer)" - })[entry.source.name] - return vim_item - end, - }, - mapping = cmp.mapping.preset.cmdline(), - sources = { - { - name = 'buffer', - option = { max_item_count = max_count } - } - } - }) - - -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline(':', { - formatting = { - fields = { "kind", "abbr", "menu" }, - format = function(entry, vim_item) - -- Kind icons - vim_item.kind = string.format("%s", kind_icons[vim_item.kind]) - vim_item.menu = ({ - buffer = "(buffer)", - path = "(path)", - })[entry.source.name] - return vim_item - end, - }, - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { - name = 'path', - option = { max_item_count = 10 } - } - }, - { - { - name = 'cmdline', - option = { max_item_count = 10 } - } - }) - }) - - cmp.setup.filetype("lua", { - sources = cmp.config.sources({ - { name = 'luasnip' }, -- For luasnip users. - { name = 'nvim_lsp' }, - { - name = "nvim_lua", - option = { max_item_count = max_count } - }, - { - name = 'buffer', - option = { keyword_length = 1 } - }, - { name = "path" }, - { name = "orgmode" }, - }), - }) - - cmp.setup.filetype("norg", { - sources = cmp.config.sources({ - { name = 'luasnip' }, -- For luasnip users. - { - name = 'neorg', - option = { max_item_count = max_count } - }, - { name = 'buffer', }, - { name = "path" }, - }) - }) - -require("luasnip.loaders.from_vscode").lazy_load() -local snippet_path = vim.fn.stdpath("config") .. "/snippets" -require("luasnip.loaders.from_snipmate").load({ path = { snippet_path } }) - - diff --git a/lua/plugins/lang/codeium.lua b/lua/plugins/lang/codeium.lua deleted file mode 100644 index bae659d..0000000 --- a/lua/plugins/lang/codeium.lua +++ /dev/null @@ -1,4 +0,0 @@ -require('codeium').setup({ - -}) - diff --git a/lua/plugins/lang/comment.lua b/lua/plugins/lang/comment.lua deleted file mode 100644 index 3079776..0000000 --- a/lua/plugins/lang/comment.lua +++ /dev/null @@ -1,26 +0,0 @@ -local comment = require('mini.comment') - -require('ts_context_commentstring').setup({ - enable_autocmd = false, - -- languages = { typescript = '// %s' }, -}) - -comment.setup({ - options = { - custom_commentstring = function() - return require('ts_context_commentstring.internal').calculate_commentstring() or vim.bo.commentstring - end, - ignore_blank_line = true, - start_of_line = false, - pad_comment_parts = true, - }, - - mappings = { - -- Toggle comment (like `gcip` - comment inner paragraph) for both - comment = 'gc', - comment_line = 'gcc', - comment_visual = 'gc', - -- Define 'comment' textobject (like `dgc` - delete whole comment block) - textobject = 'gc', - }, -}) diff --git a/lua/plugins/lang/dap.lua b/lua/plugins/lang/dap.lua deleted file mode 100644 index c427723..0000000 --- a/lua/plugins/lang/dap.lua +++ /dev/null @@ -1,152 +0,0 @@ -local dap = require('dap') -local dapui = require('dapui') -local icons = require('lib.icons') - -dapui.setup({ - icons = { expanded = icons.ui.ArrowClosed, collapsed = icons.ui.ArrowOpen }, - mappings = { - expand = { ' ', '<2-LeftMouse>' }, - open = 'o', - remove = 'd', - edit = 'e', - repl = 'r', - toggle = 't', - }, - expand_lines = vim.fn.has('nvim-0.7'), - layouts = { - { - elements = { - { id = 'scopes', size = 0.25 }, - 'breakpoints', - 'stacks', - 'watches', - }, - size = 40, - position = 'right', - }, - { - elements = { - 'repl', - 'console', - }, - size = 0.25, - position = 'bottom', - }, - }, - floating = { - max_height = nil, - max_width = nil, - border = 'rounded', - mappings = { - close = { 'q', ' ' }, - }, - }, - windows = { indent = 1 }, - render = { - max_type_length = nil, - }, -}) - -vim.fn.sign_define('DapBreakpoint', { text = icons.ui.Bug, texthl = 'DiagnosticSignError', linehl = '', numhl = '' }) - -dap.listeners.after.event_initialized['dapui_config'] = function() - dapui.open() -end -dap.listeners.before.event_terminated['dapui_config'] = function() - dapui.close() -end -dap.listeners.before.event_exited['dapui_config'] = function() - dapui.close() -end - -dap.adapters.python = { - type = 'executable', - command = '/usr/bin/python', - args = { '-m', 'debugpy.adapter' }, -} - -dap.configurations.python = { - { - type = 'python', - request = 'launch', - name = 'Launch file', - - program = '${file}', - pythonPath = function() - local cwd = vim.fn.getcwd() - if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then - return cwd .. '/venv/bin/python' - elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then - return cwd .. '/.venv/bin/python' - else - return '/usr/bin/python' - end - end, - }, -} - -dap.adapters.ruby = { - type = 'executable', - command = 'bundle', - args = { 'exec', 'readapt', 'stdio' }, -} - -dap.configurations.ruby = { - { - type = 'ruby', - request = 'launch', - name = 'Rails', - program = 'bundle', - programArgs = { 'exec', 'rails', 's' }, - useBundler = true, - }, -} - -dap.configurations.java = { - { - name = "Debug Launch (2GB)"; - type = 'java'; - request = 'launch'; - vmArgs = "" .. - "-Xmx2g " - }, - { - name = "Debug Attach (8000)"; - type = 'java'; - request = 'attach'; - hostName = "127.0.0.1"; - port = 8000; - }, - { - name = "Debug Attach (5005)"; - type = 'java'; - request = 'attach'; - hostName = "127.0.0.1"; - port = 5005; - }, - { - name = "My Custom Java Run Configuration", - type = "java", - request = "launch", - -- You need to extend the classPath to list your dependencies. - -- `nvim-jdtls` would automatically add the `classPaths` property if it is missing - -- classPaths = {}, - - -- If using multi-module projects, remove otherwise. - -- projectName = "yourProjectName", - - -- javaExec = "java", - mainClass = "replace.with.your.fully.qualified.MainClass", - - -- If using the JDK9+ module system, this needs to be extended - -- `nvim-jdtls` would automatically populate this property - -- modulePaths = {}, - vmArgs = "" .. - "-Xmx2g " - }, - } - - -vim.api.nvim_create_user_command('DapUIToggle', function() - require('dapui').toggle() -end, {}) diff --git a/lua/plugins/lang/lsp-lines.lua b/lua/plugins/lang/lsp-lines.lua deleted file mode 100644 index 4e24179..0000000 --- a/lua/plugins/lang/lsp-lines.lua +++ /dev/null @@ -1,4 +0,0 @@ -local lsp_lines = require('lsp_lines') - -lsp_lines.setup() -vim.diagnostic.config({ virtual_text = false }) diff --git a/lua/plugins/lang/lspconfig.lua b/lua/plugins/lang/lspconfig.lua deleted file mode 100644 index fbb9dd2..0000000 --- a/lua/plugins/lang/lspconfig.lua +++ /dev/null @@ -1,49 +0,0 @@ -local lspconfig = require('lspconfig') -local cmp_lsp = require('cmp_nvim_lsp') -local icons = require('lib.icons').diagnostics - -local auto_install = require('lib.util').get_user_config('auto_install', true) -local installed_servers = {} -if auto_install then - installed_servers = require('plugins.list').lsp_servers -end - -local lsp_capabilities = cmp_lsp.default_capabilities() -local default_setup = function(server) - lspconfig[server].setup({ - capabilities = lsp_capabilities, - }) -end - -local signs = { Error = icons.Error, Warn = icons.Warning, Hint = icons.Hint, Info = icons.Information } -for type, icon in pairs(signs) do - local hl = 'DiagnosticSign' .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' }) -end - -require('mason-lspconfig').setup({ - ensure_installed = installed_servers, - handlers = { - default_setup, - lua_ls = function() - lspconfig.lua_ls.setup({ - capabilities = lsp_capabilities, - settings = { - Lua = { - runtime = { version = 'LuaJIT' }, - diagnostics = { globals = { 'vim' } }, - workspace = { library = { vim.env.VIMRUNTIME } }, - format = { - enable = true, - defaultConfig = { - align_continuous_assign_statement = false, - align_continuous_rect_table_field = false, - align_array_table = false, - }, - }, - }, - }, - }) - end, - }, -}) diff --git a/lua/plugins/lang/lspsaga.lua b/lua/plugins/lang/lspsaga.lua deleted file mode 100644 index 892e3b5..0000000 --- a/lua/plugins/lang/lspsaga.lua +++ /dev/null @@ -1,21 +0,0 @@ -local lspsaga = require('lspsaga') - -local icons = require('lib.icons') - -lspsaga.setup({ - ui = { - theme = 'round', - border = 'rounded', - devicon = true, - title = true, - winblend = 1, - expand = icons.ui.ArrowOpen, - collapse = icons.ui.ArrowClosed, - preview = icons.ui.List, - code_action = icons.diagnostics.Hint, - diagnostic = icons.ui.Bug, - incoming = icons.ui.Incoming, - outgoing = icons.ui.Outgoing, - hover = icons.ui.Comment, - }, -}) diff --git a/lua/plugins/lang/mason.lua b/lua/plugins/lang/mason.lua deleted file mode 100644 index aa10be6..0000000 --- a/lua/plugins/lang/mason.lua +++ /dev/null @@ -1,35 +0,0 @@ -local mason = require('mason') - -local icons = require('lib.icons') -mason.setup({ - -- - "prepend": Use mason binary, "append": Use system binary - PATH = 'append', - - log_level = vim.log.levels.INFO, - max_concurrent_installers = 8, - - ui = { - check_outdated_packages_on_open = true, - border = 'rounded', - width = 0.8, - height = 0.8, - - icons = { - package_installed = icons.ui.Gear, - package_pending = icons.ui.Download, - package_uninstalled = icons.ui.Plus, - }, - - keymaps = { - toggle_package_expand = ' ', - install_package = 'i', - update_package = 'u', - check_package_version = 'c', - update_all_packages = 'U', - check_outdated_packages = 'C', - uninstall_package = 'x', - cancel_installation = ' ', - apply_language_filter = ' ', - }, - }, -}) diff --git a/lua/plugins/lang/neotest.lua b/lua/plugins/lang/neotest.lua deleted file mode 100644 index e5fc2c6..0000000 --- a/lua/plugins/lang/neotest.lua +++ /dev/null @@ -1,20 +0,0 @@ -local neotest = require('neotest') - -neotest.setup({ - adapters = { - require('neotest-rspec')({ - rspec_cmd = function() - return vim.tbl_flatten({ - 'bundle', - 'exec', - 'rspec', - }) - end, - }), - require('neotest-jest')({ - jestCommand = 'npx jest --', - jestConfigFile = 'jest.config.js', - }), - require('neotest-python'), - }, -}) diff --git a/lua/plugins/lang/null-ls.lua b/lua/plugins/lang/null-ls.lua deleted file mode 100644 index c095176..0000000 --- a/lua/plugins/lang/null-ls.lua +++ /dev/null @@ -1,51 +0,0 @@ -local null_ls = require('null-ls') - -local action = null_ls.builtins.code_actions -local comp = null_ls.builtins.completion -local diag = null_ls.builtins.diagnostics -local format = null_ls.builtins.formatting -local hover = null_ls.builtins.hover - --- Buily in sources: https://github.com/nvimtools/none-ls.nvim/blob/main/doc/BUILTINS.md -null_ls.setup({ - debug = false, - border = 'rounded', - log_level = 'info', - diagnostics_format = '#{c} #{m} (#{s})', - sources = { - action.proselint, -- markdown actions - action.refactoring, - action.ts_node_action, -- treesitter node actions - comp.spell, -- spell completion - comp.tags, -- tags completion - diag.actionlint, -- github action lint - diag.credo, -- elixir diagnostics - diag.golangci_lint, - diag.hadolint, -- docker lint - diag.proselint, -- markdown lint - diag.reek, -- ruby code smell - diag.rubocop, -- ruby diagnostics - diag.todo_comments, - diag.trail_space, -- trailing space check - diag.vint, -- vim lint - diag.write_good, -- english writing style - format.mix, -- elixir formatter - format.prettier, -- js, md, css, etc formatter - format.rubocop, -- ruby formatter - format.shfmt, -- shell formatter - format.stylua, -- lua formatter - hover.dictionary, -- show word dictionary on hover - hover.printenv, -- show env on hover - }, -}) - -local auto_install = require('lib.util').get_user_config('auto_install', true) -local installed_sources = {} -if auto_install then - installed_sources = require('plugins.list').null_ls_sources -end - -require('mason-null-ls').setup({ - ensure_installed = installed_sources, - automatic_installation = auto_install, -}) diff --git a/lua/plugins/lang/refactoring.lua b/lua/plugins/lang/refactoring.lua deleted file mode 100644 index 26b4a20..0000000 --- a/lua/plugins/lang/refactoring.lua +++ /dev/null @@ -1,25 +0,0 @@ -local refactoring = require('refactoring') - -refactoring.setup({ - prompt_func_return_type = { - go = false, - java = false, - cpp = false, - c = false, - h = false, - hpp = false, - cxx = false, - }, - prompt_func_param_type = { - go = false, - java = false, - - cpp = false, - c = false, - h = false, - hpp = false, - cxx = false, - }, - printf_statements = {}, - print_var_statements = {}, -}) diff --git a/lua/plugins/lang/ror.lua b/lua/plugins/lang/ror.lua deleted file mode 100644 index 8c988d4..0000000 --- a/lua/plugins/lang/ror.lua +++ /dev/null @@ -1,20 +0,0 @@ -local ror = require('ror') -local icons = require('lib.icons') - -ror.setup({ - test = { - message = { - file = 'Running test file...', - line = 'Running single test...', - }, - coverage = { - up = 'DiffAdd', - down = 'DiffDelete', - }, - notification = { - timeout = false, - }, - pass_icon = icons.ui.Check, - fail_icon = icons.ui.Close, - }, -}) diff --git a/lua/plugins/lang/sniprun.lua b/lua/plugins/lang/sniprun.lua deleted file mode 100644 index 8dec6f1..0000000 --- a/lua/plugins/lang/sniprun.lua +++ /dev/null @@ -1,14 +0,0 @@ -local sniprun = require('sniprun') - -sniprun.setup({ - display = { 'VirtualTextOk', 'VirtualTextErr' }, - show_no_output = { 'Classic', 'TempFloatingWindow' }, - - display_options = { - terminal_width = 45, - notification_timeout = 5, - }, - - inline_messages = 0, - borders = 'single', -}) diff --git a/lua/plugins/lang/surround.lua b/lua/plugins/lang/surround.lua deleted file mode 100644 index 73e4478..0000000 --- a/lua/plugins/lang/surround.lua +++ /dev/null @@ -1,25 +0,0 @@ -local surround = require('mini.surround') - -surround.setup({ - custom_surroundings = nil, - mappings = { - add = 'gsa', - delete = 'gsd', - find = 'gsf', - find_left = 'gsF', - highlight = 'gsh', - replace = 'gsr', - update_n_lines = 'gsn', - - suffix_last = 'l', -- Suffix to search with "prev" method - suffix_next = 'n', -- Suffix to search with "next" method - }, - - -- How to search for surrounding - -- 'cover', 'cover_or_next', 'cover_or_prev','cover_or_nearest', 'next', 'previous', 'nearest'. - search_method = 'cover_or_nearest', - highlight_duration = 500, - n_lines = 20, - respect_selection_type = false, - silent = false, -}) diff --git a/lua/plugins/lang/textobjects.lua b/lua/plugins/lang/textobjects.lua deleted file mode 100644 index ccc83da..0000000 --- a/lua/plugins/lang/textobjects.lua +++ /dev/null @@ -1,115 +0,0 @@ -local textobjects = { - select = { - enable = true, - lookahead = true, - - keymaps = { - ['a='] = { query = '@assignment.outer', desc = 'Select outer part of an assignment' }, - ['i='] = { query = '@assignment.inner', desc = 'Select inner part of an assignment' }, - ['al='] = { query = '@assignment.lhs', desc = 'Select left hand side of an assignment' }, - ['ar='] = { - query = '@assignment.rhs', - desc = 'Select right hand side of an assignment', - }, - - ['a:'] = { query = '@property.outer', desc = 'Select outer part of an object property' }, - ['i:'] = { query = '@property.inner', desc = 'Select inner part of an object property' }, - ['l:'] = { query = '@property.lhs', desc = 'Select left part of an object property' }, - ['r:'] = { query = '@property.rhs', desc = 'Select right part of an object property' }, - - ['aa'] = { - query = '@parameter.outer', - desc = 'Select outer part of a parameter/argument', - }, - ['ia'] = { - query = '@parameter.inner', - desc = 'Select inner part of a parameter/argument', - }, - - ['ai'] = { query = '@conditional.outer', desc = 'Select outer part of a conditional' }, - ['ii'] = { query = '@conditional.inner', desc = 'Select inner part of a conditional' }, - - ['al'] = { query = '@loop.outer', desc = 'Select outer part of a loop' }, - ['il'] = { query = '@loop.inner', desc = 'Select inner part of a loop' }, - - ['af'] = { query = '@call.outer', desc = 'Select outer part of a function call' }, - ['if'] = { query = '@call.inner', desc = 'Select inner part of a function call' }, - - ['am'] = { - query = '@function.outer', - desc = 'Select outer part of a method/function definition', - }, - ['im'] = { - query = '@function.inner', - desc = 'Select inner part of a method/function definition', - }, - - ['ac'] = { query = '@class.outer', desc = 'Select outer part of a class' }, - ['ic'] = { query = '@class.inner', desc = 'Select inner part of a class' }, - }, - }, - swap = { - enable = true, - swap_next = { - [' rna'] = '@parameter.inner', -- swap object property with next - [' rn:'] = '@property.outer', -- swap parameters/argument with next - [' rnm'] = '@function.outer', -- swap function with next - }, - swap_previous = { - [' rpa'] = '@parameter.inner', -- swap parameters/argument with prev - [' rp:'] = '@property.outer', -- swap object property with prev - [' rpm'] = '@function.outer', -- swap function with previous - }, - }, - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - [']f'] = { query = '@call.outer', desc = 'Next function call start' }, - [']m'] = { query = '@function.outer', desc = 'Next method/function def start' }, - [']c'] = { query = '@class.outer', desc = 'Next class start' }, - [']i'] = { query = '@conditional.outer', desc = 'Next conditional start' }, - [']l'] = { query = '@loop.outer', desc = 'Next loop start' }, - - -- You can pass a query group to use query from `queries/ / .scm file in your runtime path. - -- Below example nvim-treesitter's `locals.scm` and `folds.scm`. They also provide highlights.scm and indent.scm. - [']S'] = { query = '@scope', query_group = 'locals', desc = 'Next scope' }, - [']z'] = { query = '@fold', query_group = 'folds', desc = 'Next fold' }, - }, - goto_next_end = { - [']F'] = { query = '@call.outer', desc = 'Next function call end' }, - [']M'] = { query = '@function.outer', desc = 'Next method/function def end' }, - [']C'] = { query = '@class.outer', desc = 'Next class end' }, - [']I'] = { query = '@conditional.outer', desc = 'Next conditional end' }, - [']L'] = { query = '@loop.outer', desc = 'Next loop end' }, - }, - goto_previous_start = { - ['[f'] = { query = '@call.outer', desc = 'Prev function call start' }, - ['[m'] = { query = '@function.outer', desc = 'Prev method/function def start' }, - ['[c'] = { query = '@class.outer', desc = 'Prev class start' }, - ['[i'] = { query = '@conditional.outer', desc = 'Prev conditional start' }, - ['[l'] = { query = '@loop.outer', desc = 'Prev loop start' }, - }, - goto_previous_end = { - ['[F'] = { query = '@call.outer', desc = 'Prev function call end' }, - ['[M'] = { query = '@function.outer', desc = 'Prev method/function def end' }, - ['[C'] = { query = '@class.outer', desc = 'Prev class end' }, - ['[I'] = { query = '@conditional.outer', desc = 'Prev conditional end' }, - ['[L'] = { query = '@loop.outer', desc = 'Prev loop end' }, - }, - }, -} - -local ts_repeat_move = require('nvim-treesitter.textobjects.repeatable_move') - --- vim way: ; goes to the direction you were moving. -vim.keymap.set({ 'n', 'x', 'o' }, ';', ts_repeat_move.repeat_last_move) -vim.keymap.set({ 'n', 'x', 'o' }, ',', ts_repeat_move.repeat_last_move_opposite) - --- Optionally, make builtin f, F, t, T also repeatable with ; and , -vim.keymap.set({ 'n', 'x', 'o' }, 'f', ts_repeat_move.builtin_f) -vim.keymap.set({ 'n', 'x', 'o' }, 'F', ts_repeat_move.builtin_F) -vim.keymap.set({ 'n', 'x', 'o' }, 't', ts_repeat_move.builtin_t) -vim.keymap.set({ 'n', 'x', 'o' }, 'T', ts_repeat_move.builtin_T) - -return textobjects diff --git a/lua/plugins/lang/treesitter.lua b/lua/plugins/lang/treesitter.lua deleted file mode 100644 index 28efb08..0000000 --- a/lua/plugins/lang/treesitter.lua +++ /dev/null @@ -1,78 +0,0 @@ -local treesitter = require('nvim-treesitter.configs') -local textobjects = require('plugins.lang.textobjects') - -local auto_install = require('lib.util').get_user_config('auto_install', true) -local installed_parsers = {} -if auto_install then - installed_parsers = require('plugins.list').ts_parsers -end - -treesitter.setup({ - ensure_installed = installed_parsers, - sync_install = false, - ignore_install = {}, - auto_install = true, - - textobjects = textobjects, - autopairs = { enable = true }, - endwise = { enable = true }, - autotag = { enable = true }, - matchup = { enable = true }, - indent = { enable = true }, - - highlight = { - enable = true, - disable = {}, - additional_vim_regex_highlighting = false, - }, - - incremental_selection = { - enable = true, - keymaps = { - init_selection = ' ', - node_incremental = ' ', - scope_incremental = false, - node_decremental = ' ', - }, - }, - - textsubjects = { - enable = true, - prev_selection = ',', - keymaps = { - ['.'] = { 'textsubjects-smart', desc = 'Select the current text subject' }, - ['a;'] = { - 'textsubjects-container-outer', - desc = 'Select outer container (class, function, etc.)', - }, - ['i;'] = { - 'textsubjects-container-inner', - desc = 'Select inside containers (classes, functions, etc.)', - }, - }, - }, - - refactor = { - highlight_definitions = { - enable = true, - clear_on_cursor_move = true, - }, - highlight_current_scope = { enable = true }, - smart_rename = { - enable = true, - keymaps = { - smart_rename = ' rr', - }, - }, - navigation = { - enable = true, - keymaps = { - goto_definition = ' rd', - list_definitions = ' rl', - list_definitions_toc = ' rh', - goto_next_usage = ' rj', - goto_previous_usage = ' rk', - }, - }, - }, -}) diff --git a/lua/plugins/lazy.lua b/lua/plugins/lazy.lua deleted file mode 100644 index 94843c9..0000000 --- a/lua/plugins/lazy.lua +++ /dev/null @@ -1,109 +0,0 @@ -local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - 'git', - 'clone', - '--filter=blob:none', - '--single-branch', - 'https://github.com/folke/lazy.nvim.git', - lazypath, - }) -end -vim.opt.runtimepath:prepend(lazypath) - -local status_ok, lazy = pcall(require, 'lazy') -if not status_ok then - return -end - -local icons = require('lib.icons') -local plugins = require('plugins.list').plugins - -lazy.setup({ - root = vim.fn.stdpath('data') .. '/lazy', - defaults = { lazy = true }, - spec = plugins, - lockfile = vim.fn.stdpath('config') .. '/lua/plugins/lock.json', - concurrency = 8, - dev = { path = '~/Projects/GitHub/', patterns = {}, fallback = false }, - install = { missing = true, colorscheme = { 'onedark' } }, - - git = { - log = { '--since=3 days ago' }, - timeout = 120, - url_format = 'https://github.com/%s.git', - filter = true, - }, - - ui = { - size = { width = 0.9, height = 0.8 }, - wrap = true, - border = 'rounded', - icons = { - cmd = icons.ui.Terminal, - config = icons.ui.Gear, - event = icons.ui.Electric, - ft = icons.documents.File, - init = icons.ui.Rocket, - import = icons.documents.Import, - keys = icons.ui.Keyboard, - lazy = icons.ui.Sleep, - loaded = icons.ui.CircleSmall, - not_loaded = icons.ui.CircleSmallEmpty, - plugin = icons.ui.Package, - runtime = icons.ui.Neovim, - source = icons.ui.Code, - start = icons.ui.Play, - task = icons.ui.Check, - list = { - icons.ui.CircleSmall, - icons.ui.Arrow, - icons.ui.Star, - icons.ui.Minus, - }, - }, - browser = nil, - throttle = 20, - custom_keys = { - [' l'] = function(plugin) - require('lazy.util').float_term({ 'lazygit', 'log' }, { - cwd = plugin.dir, - }) - end, - - [' t'] = function(plugin) - require('lazy.util').float_term(nil, { - cwd = plugin.dir, - }) - end, - }, - }, - - diff = { cmd = 'git' }, - checker = { enabled = false, concurrency = nil, notify = true, frequency = 3600 }, - change_detection = { enabled = true, notify = true }, - performance = { - cache = { enabled = true }, - reset_packpath = true, - rtp = { - reset = true, - paths = {}, - disabled_plugins = { - 'gzip', - 'tarPlugin', - 'zipPlugin', - 'tohtml', - -- 'tutor', - -- 'matchit', - -- 'matchparen', - -- 'netrwPlugin', - }, - }, - }, - readme = { - root = vim.fn.stdpath('state') .. '/lazy/readme', - files = { 'README.md', 'lua/**/README.md' }, - skip_if_doc_exists = true, - }, - state = vim.fn.stdpath('state') .. '/lazy/state.json', -}) diff --git a/lua/plugins/list.lua b/lua/plugins/list.lua deleted file mode 100644 index 23a70f2..0000000 --- a/lua/plugins/list.lua +++ /dev/null @@ -1,547 +0,0 @@ -local function load_config(package) - return function() - require('plugins.' .. package) - end -end - -local plugins = { - -- UI - { - 'navarasu/onedark.nvim', - config = load_config('ui.onedark'), - lazy = false, - priority = 1000, - }, - { - 'nvim-lualine/lualine.nvim', - config = load_config('ui.lualine'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - { - 'lukas-reineke/indent-blankline.nvim', - config = load_config('ui.indentline'), - main = 'ibl', - event = { 'BufReadPre', 'BufNewFile' }, - }, - { - 'HiPhish/rainbow-delimiters.nvim', - config = load_config('ui.rainbow'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - { - 'rcarriga/nvim-notify', - config = load_config('ui.notify'), - event = 'VeryLazy', - cmd = 'Notifications', - }, - { - 'stevearc/dressing.nvim', - config = load_config('ui.dressing'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - { - 'nvimdev/dashboard-nvim', - dependencies = { - "rubiin/fortune.nvim", - config = true, - }, - config = load_config('ui.dashboard'), - -- Only load when no arguments - event = function() - if vim.fn.argc() == 0 then - return 'VimEnter' - end - end, - cmd = 'Dashboard', - }, - { - 'folke/noice.nvim', - event = 'VimEnter', - dependencies = { - 'MunifTanjim/nui.nvim', - 'rcarriga/nvim-notify', - }, - config = load_config('ui.noice'), - }, - { - 'folke/zen-mode.nvim', - dependencies = { - 'folke/twilight.nvim', - config = load_config('ui.twilight'), - }, - config = load_config('ui.zen-mode'), - cmd = { 'ZenMode', 'Twilight' }, - }, - - -- Language - { - 'mfussenegger/nvim-dap', - dependencies = { - 'rcarriga/nvim-dap-ui', - }, - config = load_config('lang.dap'), - cmd = { 'DapUIToggle', 'DapToggleRepl', 'DapToggleBreakpoint' }, - }, - { - 'nvim-neotest/neotest', - dependencies = { - 'nvim-neotest/nvim-nio', - 'olimorris/neotest-rspec', - 'nvim-neotest/neotest-jest', - 'nvim-neotest/neotest-python', - }, - config = load_config('lang.neotest'), - cmd = 'Neotest', - }, - { - 'michaelb/sniprun', - build = 'bash ./install.sh', - config = load_config('lang.sniprun'), - cmd = 'SnipRun', - }, - { - 'ThePrimeagen/refactoring.nvim', - config = load_config('lang.refactoring'), - }, - { - 'windwp/nvim-autopairs', - config = load_config('lang.autopairs'), - event = 'InsertEnter', - }, - { - 'echasnovski/mini.comment', - version = '*', - dependencies = 'JoosepAlviste/nvim-ts-context-commentstring', - config = load_config('lang.comment'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - { - 'echasnovski/mini.surround', - version = '*', - config = load_config('lang.surround'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - { - 'echasnovski/mini.ai', - version = '*', - config = load_config('lang.ai'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - { - 'alvan/vim-closetag', - ft = { "html", "javascriptreact", "typescriptreact" }, - }, - -- Tresitter - { - 'nvim-treesitter/nvim-treesitter', - build = ':TSUpdate', - dependencies = { - 'nvim-treesitter/nvim-treesitter-refactor', - 'nvim-treesitter/nvim-treesitter-textobjects', - 'RRethy/nvim-treesitter-endwise', - 'RRethy/nvim-treesitter-textsubjects', - 'windwp/nvim-ts-autotag', - }, - config = load_config('lang.treesitter'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - { - 'ckolkey/ts-node-action', - dependencies = { 'nvim-treesitter' }, - }, - -- LSP - { - 'neovim/nvim-lspconfig', - dependencies = { - 'williamboman/mason-lspconfig.nvim', - 'hrsh7th/cmp-nvim-lsp', - }, - config = load_config('lang.lspconfig'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - { - 'folke/lazydev.nvim', - ft = 'lua', - }, - { - 'nvimdev/lspsaga.nvim', - config = load_config('lang.lspsaga'), - event = 'LspAttach', - }, - { - 'Maan2003/lsp_lines.nvim', - config = load_config('lang.lsp-lines'), - event = 'LspAttach', - }, - { - 'williamboman/mason.nvim', - config = load_config('lang.mason'), - cmd = 'Mason', - }, - { - 'nvimtools/none-ls.nvim', - dependencies = { 'neovim/nvim-lspconfig', 'jay-babu/mason-null-ls.nvim' }, - config = load_config('lang.null-ls'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - - -- Completion - { - 'hrsh7th/nvim-cmp', - dependencies = { - 'hrsh7th/cmp-buffer', - 'hrsh7th/cmp-path', - 'hrsh7th/cmp-cmdline', - 'hrsh7th/cmp-nvim-lua', - 'L3MON4D3/LuaSnip', - 'rafamadriz/friendly-snippets', - 'saadparwaiz1/cmp_luasnip', - }, - config = load_config('lang.cmp'), - event = 'InsertEnter', - }, - { - 'Exafunction/codeium.vim', - event = 'BufEnter', - cmd = 'Codeium', - build = 'Codeium Auth:', - dependencies = { - 'nvim-lua/plenary.nvim', - 'hrsh7th/nvim-cmp', - }, - }, - -- Tools - { - 'sontungexpt/url-open', - cmd = 'URLOpenUnderCursor', - config = load_config('tools.url-open'), - }, - { - 'stevearc/conform.nvim', - event = { 'BufReadPre', 'BufNewFile' }, - config = load_config('tools.conform'), - }, - { - 'nvim-tree/nvim-tree.lua', - dependencies = { - 'nvim-tree/nvim-web-devicons', - }, - config = load_config('tools.nvim-tree'), - cmd = 'NvimTreeToggle', - }, - { - 'windwp/nvim-spectre', - config = load_config('tools.spectre'), - cmd = 'Spectre', - }, - { - 'abecodes/tabout.nvim', - config = load_config('tools.tabout'), - event = 'InsertEnter', - }, - { - 'folke/flash.nvim', - config = load_config('tools.flash'), - keys = { - { - 's', - mode = { 'n', 'x', 'o' }, - function() - require('flash').jump() - end, - desc = 'Flash', - }, - { - 'S', - mode = { 'n', 'x', 'o' }, - function() - require('flash').treesitter() - end, - desc = 'Flash Treesitter', - }, - }, - }, - { - 'numToStr/Navigator.nvim', - config = load_config('tools.navigator'), - event = function() - if vim.fn.exists('$TMUX') == 1 then - return 'VeryLazy' - end - end, - }, - { - 'm4xshen/hardtime.nvim', - dependencies = { 'MunifTanjim/nui.nvim', 'nvim-lua/plenary.nvim' }, - config = function() - require('hardtime').setup({ enabled = true }) - end, - cmd = 'Hardtime', - }, - { - 'chrisgrieser/nvim-spider', - config = load_config('tools.spider'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - { - 'folke/which-key.nvim', - config = load_config('tools.which-key'), - event = 'VeryLazy', - }, - { - 'iamcco/markdown-preview.nvim', - build = function() - vim.fn['mkdp#util#install']() - end, - ft = 'markdown', - cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview' }, - }, - { - 'uga-rosa/ccc.nvim', - config = load_config('tools.ccc'), - cmd = { 'CccHighlighterToggle', 'CccConvert', 'CccPick' }, - }, - { - '2kabhishek/termim.nvim', - cmd = { 'Fterm', 'FTerm', 'Sterm', 'STerm', 'Vterm', 'VTerm' }, - }, - { - '2kabhishek/tdo.nvim', - dependencies = 'nvim-telescope/telescope.nvim', - cmd = { 'Tdo', 'TdoEntry', 'TdoNote', 'TdoTodos', 'TdoToggle', 'TdoFind', 'TdoFiles' }, - keys = { '[t', ']t' }, - }, - { - 'kndndrj/nvim-dbee', - dependencies = { - 'MunifTanjim/nui.nvim', - }, - build = function() - -- "curl", "wget", "bitsadmin", "go" - require('dbee').install('curl') - end, - config = load_config('tools.dbee'), - cmd = 'DBToggle', - enabled = false, - }, - { - 'aurum77/live-server.nvim', - build = function() - require("live_server.util").install() - end, - cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" }, - keys = { - { " ", ft = "html", " LiveServer ", desc = "Live Server" }, - { " ", ft = "html", " LiveServerStop ", desc = "Live Server Stop" }, - }, - }, - { - 'Zeioth/compiler.nvim', - cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" }, - dependencies = { "stevearc/overseer.nvim" }, - opts = {}, - keys = { - { " ", " CompilerOpen ", desc = "Open Compiler" }, - { " ", function() vim.cmd("CompilerStop") vim.cmd("CompilerRedo") end, desc = "Redo Compiler" }, - { " ", " CompilerToggleResults ", desc = "Toggle Compiler Results" }, - }, - }, - { - 'stevearc/overseer.nvim', - cmd = { - "OverseerOpen", - "OverseerClose", - "OverseerToggle", - "OverseerSaveBundle", - "OverseerLoadBundle", - "OverseerDeleteBundle", - "OverseerRunCmd", - "OverseerRun", - "OverseerInfo", - "OverseerBuild", - "OverseerQuickAction", - "OverseerTaskAction ", - "OverseerClearCache", - }, - opts = { - task_list = { - direction = "bottom", - min_height = 15, - max_height = 15, - default_detail = 1, - }, - }, - }, - { - 'okuuva/auto-save.nvim', - event = 'VeryLazy', - config = load_config('tools.auto-save'), - }, - -- Telescope - { - 'nvim-telescope/telescope.nvim', - branch = '0.1.x', - dependencies = { - 'nvim-lua/plenary.nvim', - { - 'nvim-telescope/telescope-fzf-native.nvim', - build = 'make', - }, - 'nvim-telescope/telescope-file-browser.nvim', - 'nvim-telescope/telescope-symbols.nvim', - 'molecule-man/telescope-menufacture', - 'debugloop/telescope-undo.nvim', - }, - config = load_config('tools.telescope'), - cmd = 'Telescope', - }, - { - 'ThePrimeagen/harpoon', - branch = 'harpoon2', - config = load_config('tools.harpoon'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - { - '2kabhishek/nerdy.nvim', - dependencies = { 'stevearc/dressing.nvim' }, - cmd = 'Nerdy', - }, - { - -- 'chentoast/marks.nvim', - '2kabhishek/markit.nvim', - config = load_config('tools.marks'), - event = { 'BufReadPre', 'BufNewFile' }, - }, - - -- Git - { - '2kabhishek/co-author.nvim', - dependencies = { 'stevearc/dressing.nvim' }, - cmd = 'CoAuthor', - }, - { - 'ruifm/gitlinker.nvim', - config = load_config('tools.gitlinker'), - keys = '