woohooo
This commit is contained in:
commit
085347ddac
49 changed files with 1931 additions and 0 deletions
22
lua/config/autocmds.lua
Normal file
22
lua/config/autocmds.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
-- [[ Autocommands ]]
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
-- Highlight when yanking (copying) text
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight when yanking (copying) text',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function()
|
||||
vim.hl.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Set indent for C/C++ to 2 spaces
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = { 'c', 'cpp' },
|
||||
callback = function()
|
||||
vim.bo.tabstop = 2
|
||||
vim.bo.shiftwidth = 2
|
||||
vim.bo.softtabstop = 2
|
||||
vim.bo.expandtab = true
|
||||
end,
|
||||
})
|
||||
61
lua/config/keymaps.lua
Normal file
61
lua/config/keymaps.lua
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
-- [[ Basic Keymaps ]]
|
||||
-- See `:help vim.keymap.set()`
|
||||
|
||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
|
||||
-- Toggle spell check
|
||||
vim.keymap.set('n', '<leader>ts', function()
|
||||
vim.o.spell = not vim.o.spell
|
||||
print(vim.o.spell and 'Spell check enabled' or 'Spell check disabled')
|
||||
end, { desc = '[T]oggle [S]pell check' })
|
||||
|
||||
-- Toggle word wrap
|
||||
vim.keymap.set('n', '<leader>tw', function()
|
||||
vim.o.wrap = not vim.o.wrap
|
||||
vim.cmd 'redraw'
|
||||
print(vim.o.wrap and 'Wrap enabled' or 'Wrap disabled')
|
||||
end, { desc = '[T]oggle [W]rap' })
|
||||
|
||||
-- Toggle colorcolumn
|
||||
vim.keymap.set('n', '<leader>tc', function()
|
||||
if vim.wo.colorcolumn == '' then
|
||||
vim.wo.colorcolumn = '80'
|
||||
else
|
||||
vim.wo.colorcolumn = ''
|
||||
end
|
||||
end, { desc = '[T]oggle [C]olorcolumn' })
|
||||
|
||||
-- Set colorcolumn to a specific value
|
||||
vim.keymap.set('n', '<leader>cc', function()
|
||||
local col = vim.fn.input 'Set colorcolumn to: '
|
||||
if col ~= '' then
|
||||
vim.wo.colorcolumn = col
|
||||
vim.bo.textwidth = tonumber(col) or 80
|
||||
end
|
||||
end, { desc = 'Set [C]olor[c]olumn width' })
|
||||
|
||||
-- Toggle textwidth auto-wrapping
|
||||
vim.keymap.set('n', '<leader>tt', function()
|
||||
if vim.bo.textwidth == 0 then
|
||||
local cc = vim.wo.colorcolumn
|
||||
local width = tonumber(cc) or 80
|
||||
vim.bo.textwidth = width
|
||||
print('Textwidth enabled (' .. width .. ')')
|
||||
else
|
||||
vim.bo.textwidth = 0
|
||||
print 'Textwidth disabled'
|
||||
end
|
||||
end, { desc = '[T]oggle [T]extwidth auto-wrap' })
|
||||
|
||||
-- Exit terminal mode
|
||||
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
|
||||
|
||||
-- Window navigation
|
||||
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
|
||||
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
|
||||
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
|
||||
34
lua/config/options.lua
Normal file
34
lua/config/options.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
-- [[ Setting options ]]
|
||||
-- See `:help vim.o`
|
||||
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.mouse = 'a'
|
||||
vim.o.showmode = false
|
||||
vim.o.completeopt = 'menuone,noinsert,noselect'
|
||||
|
||||
vim.schedule(function()
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
end)
|
||||
|
||||
vim.o.breakindent = true
|
||||
vim.o.wrap = true
|
||||
vim.o.linebreak = true
|
||||
vim.o.undofile = true
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
vim.o.signcolumn = 'yes'
|
||||
vim.o.updatetime = 250
|
||||
vim.o.timeoutlen = 300
|
||||
vim.o.splitright = true
|
||||
vim.o.splitbelow = true
|
||||
vim.opt.cmdheight = 0
|
||||
|
||||
vim.o.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
|
||||
vim.o.inccommand = 'split'
|
||||
vim.o.cursorline = true
|
||||
vim.o.scrolloff = 10
|
||||
vim.o.confirm = true
|
||||
vim.opt.termguicolors = true
|
||||
61
lua/custom/claude-code.lua
Normal file
61
lua/custom/claude-code.lua
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
require('claude-code').setup {
|
||||
-- Terminal window settings
|
||||
window = {
|
||||
split_ratio = 0.3, -- Percentage of screen for the terminal window (height for horizontal, width for vertical splits)
|
||||
position = 'botright', -- Position of the window: "botright", "topleft", "vertical", "float", etc.
|
||||
enter_insert = true, -- Whether to enter insert mode when opening Claude Code
|
||||
hide_numbers = true, -- Hide line numbers in the terminal window
|
||||
hide_signcolumn = true, -- Hide the sign column in the terminal window
|
||||
|
||||
-- Floating window configuration (only applies when position = "float")
|
||||
float = {
|
||||
width = '80%', -- Width: number of columns or percentage string
|
||||
height = '80%', -- Height: number of rows or percentage string
|
||||
row = 'center', -- Row position: number, "center", or percentage string
|
||||
col = 'center', -- Column position: number, "center", or percentage string
|
||||
relative = 'editor', -- Relative to: "editor" or "cursor"
|
||||
border = 'rounded', -- Border style: "none", "single", "double", "rounded", "solid", "shadow"
|
||||
},
|
||||
},
|
||||
-- File refresh settings
|
||||
refresh = {
|
||||
enable = true, -- Enable file change detection
|
||||
updatetime = 100, -- updatetime when Claude Code is active (milliseconds)
|
||||
timer_interval = 1000, -- How often to check for file changes (milliseconds)
|
||||
show_notifications = true, -- Show notification when files are reloaded
|
||||
},
|
||||
-- Git project settings
|
||||
git = {
|
||||
use_git_root = true, -- Set CWD to git root when opening Claude Code (if in git project)
|
||||
},
|
||||
-- Shell-specific settings
|
||||
shell = {
|
||||
separator = '&&', -- Command separator used in shell commands
|
||||
pushd_cmd = 'pushd', -- Command to push directory onto stack (e.g., 'pushd' for bash/zsh, 'enter' for nushell)
|
||||
popd_cmd = 'popd', -- Command to pop directory from stack (e.g., 'popd' for bash/zsh, 'exit' for nushell)
|
||||
},
|
||||
-- Command settings
|
||||
command = 'claude', -- Command used to launch Claude Code
|
||||
-- Command variants
|
||||
command_variants = {
|
||||
-- Conversation management
|
||||
continue = '--continue', -- Resume the most recent conversation
|
||||
resume = '--resume', -- Display an interactive conversation picker
|
||||
|
||||
-- Output options
|
||||
verbose = '--verbose', -- Enable verbose logging with full turn-by-turn output
|
||||
},
|
||||
-- Keymaps
|
||||
keymaps = {
|
||||
toggle = {
|
||||
normal = '<C-,>', -- Normal mode keymap for toggling Claude Code, false to disable
|
||||
terminal = '<C-,>', -- Terminal mode keymap for toggling Claude Code, false to disable
|
||||
variants = {
|
||||
continue = '<leader>cC', -- Normal mode keymap for Claude Code with continue flag
|
||||
verbose = '<leader>cV', -- Normal mode keymap for Claude Code with verbose flag
|
||||
},
|
||||
},
|
||||
window_navigation = true, -- Enable window navigation keymaps (<C-h/j/k/l>)
|
||||
scrolling = true, -- Enable scrolling keymaps (<C-f/b>) for page up/down
|
||||
},
|
||||
}
|
||||
28
lua/custom/godot_config.lua
Normal file
28
lua/custom/godot_config.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
local godot = require 'godot'
|
||||
|
||||
godot.setup {
|
||||
bin = 'C:\\Program Files\\godot\\Godot_v4.5.1-stable_win64.exe',
|
||||
dap = {
|
||||
host = '127.0.0.1',
|
||||
port = 6006,
|
||||
},
|
||||
gui = {
|
||||
console_config = {
|
||||
anchor = 'SW',
|
||||
border = 'double',
|
||||
col = 1,
|
||||
height = 10,
|
||||
relative = 'editor',
|
||||
row = 99999,
|
||||
style = 'minimal',
|
||||
width = 99999,
|
||||
},
|
||||
},
|
||||
expose_commands = true,
|
||||
}
|
||||
|
||||
require('godot_lsp_setup').setup {
|
||||
lsp_opts = {
|
||||
cmd = { 'nc', '-w', '3', '127.0.0.1', '6005' },
|
||||
},
|
||||
}
|
||||
209
lua/custom/oil_config.lua
Normal file
209
lua/custom/oil_config.lua
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
-- lua/custom/oil_config.lua
|
||||
local oil = require 'oil'
|
||||
|
||||
oil.setup {
|
||||
|
||||
-- Oil will take over directory buffers (e.g. `vim .` or `:e src/`)
|
||||
-- Set to false if you want some other plugin (e.g. netrw) to open when you edit directories.
|
||||
default_file_explorer = true,
|
||||
-- Id is automatically added at the beginning, and name at the end
|
||||
-- See :help oil-columns
|
||||
columns = {
|
||||
'icon',
|
||||
-- "permissions",
|
||||
-- "size",
|
||||
-- "mtime",
|
||||
},
|
||||
-- Buffer-local options to use for oil buffers
|
||||
buf_options = {
|
||||
buflisted = false,
|
||||
bufhidden = 'hide',
|
||||
},
|
||||
-- Window-local options to use for oil buffers
|
||||
win_options = {
|
||||
wrap = false,
|
||||
signcolumn = 'no',
|
||||
cursorcolumn = false,
|
||||
foldcolumn = '0',
|
||||
spell = false,
|
||||
list = false,
|
||||
conceallevel = 3,
|
||||
concealcursor = 'nvic',
|
||||
},
|
||||
-- Send deleted files to the trash instead of permanently deleting them (:help oil-trash)
|
||||
delete_to_trash = false,
|
||||
-- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)
|
||||
skip_confirm_for_simple_edits = false,
|
||||
-- Selecting a new/moved/renamed file or directory will prompt you to save changes first
|
||||
-- (:help prompt_save_on_select_new_entry)
|
||||
prompt_save_on_select_new_entry = true,
|
||||
-- Oil will automatically delete hidden buffers after this delay
|
||||
-- You can set the delay to false to disable cleanup entirely
|
||||
-- Note that the cleanup process only starts when none of the oil buffers are currently displayed
|
||||
cleanup_delay_ms = 2000,
|
||||
lsp_file_methods = {
|
||||
-- Enable or disable LSP file operations
|
||||
enabled = true,
|
||||
-- Time to wait for LSP file operations to complete before skipping
|
||||
timeout_ms = 1000,
|
||||
-- Set to true to autosave buffers that are updated with LSP willRenameFiles
|
||||
-- Set to "unmodified" to only save unmodified buffers
|
||||
autosave_changes = false,
|
||||
},
|
||||
-- Constrain the cursor to the editable parts of the oil buffer
|
||||
-- Set to `false` to disable, or "name" to keep it on the file names
|
||||
constrain_cursor = 'editable',
|
||||
-- Set to true to watch the filesystem for changes and reload oil
|
||||
watch_for_changes = false,
|
||||
-- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap
|
||||
-- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" })
|
||||
-- Additionally, if it is a string that matches "actions.<name>",
|
||||
-- it will use the mapping at require("oil.actions").<name>
|
||||
-- Set to `false` to remove a keymap
|
||||
-- See :help oil-actions for a list of all available actions
|
||||
|
||||
keymaps = {
|
||||
['g?'] = { 'actions.show_help', mode = 'n' },
|
||||
['<CR>'] = 'actions.select',
|
||||
['<C-s>'] = { 'actions.select', opts = { vertical = true } },
|
||||
['<C-h>'] = { 'actions.select', opts = { horizontal = true } },
|
||||
['<C-t>'] = { 'actions.select', opts = { tab = true } },
|
||||
['<C-p>'] = 'actions.preview',
|
||||
['<C-c>'] = { 'actions.close', mode = 'n' },
|
||||
['<C-l>'] = 'actions.refresh',
|
||||
['<C-]>'] = { 'actions.parent', mode = 'n' },
|
||||
['<C-\\>'] = { 'actions.open_cwd', mode = 'n' },
|
||||
['`'] = { 'actions.cd', mode = 'n' },
|
||||
['~'] = { 'actions.cd', opts = { scope = 'tab' }, mode = 'n' },
|
||||
['gs'] = { 'actions.change_sort', mode = 'n' },
|
||||
['gx'] = 'actions.open_external',
|
||||
['g.'] = { 'actions.toggle_hidden', mode = 'n' },
|
||||
['g\\'] = { 'actions.toggle_trash', mode = 'n' },
|
||||
},
|
||||
-- Set to false to disable all of the above keymaps
|
||||
use_default_keymaps = true,
|
||||
view_options = {
|
||||
-- Show files and directories that start with "."
|
||||
show_hidden = true,
|
||||
-- This function defines what is considered a "hidden" file
|
||||
is_hidden_file = function(name, bufnr)
|
||||
local m = name:match '^%.'
|
||||
return m ~= nil
|
||||
end,
|
||||
-- This function defines what will never be shown, even when `show_hidden` is set
|
||||
is_always_hidden = function(name, bufnr)
|
||||
return false
|
||||
end,
|
||||
-- Sort file names with numbers in a more intuitive order for humans.
|
||||
-- Can be "fast", true, or false. "fast" will turn it off for large directories.
|
||||
natural_order = 'fast',
|
||||
-- Sort file and directory names case insensitive
|
||||
case_insensitive = false,
|
||||
sort = {
|
||||
-- sort order can be "asc" or "desc"
|
||||
-- see :help oil-columns to see which columns are sortable
|
||||
{ 'type', 'asc' },
|
||||
{ 'name', 'asc' },
|
||||
},
|
||||
-- Customize the highlight group for the file name
|
||||
highlight_filename = function(entry, is_hidden, is_link_target, is_link_orphan)
|
||||
return nil
|
||||
end,
|
||||
},
|
||||
-- Extra arguments to pass to SCP when moving/copying files over SSH
|
||||
extra_scp_args = {},
|
||||
-- EXPERIMENTAL support for performing file operations with git
|
||||
git = {
|
||||
-- Return true to automatically git add/mv/rm files
|
||||
add = function(path)
|
||||
return false
|
||||
end,
|
||||
mv = function(src_path, dest_path)
|
||||
return false
|
||||
end,
|
||||
rm = function(path)
|
||||
return false
|
||||
end,
|
||||
},
|
||||
-- Configuration for the floating window in oil.open_float
|
||||
float = {
|
||||
-- Padding around the floating window
|
||||
padding = 2,
|
||||
-- max_width and max_height can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||
max_width = 0,
|
||||
max_height = 0,
|
||||
border = nil,
|
||||
win_options = {
|
||||
winblend = 0,
|
||||
},
|
||||
-- optionally override the oil buffers window title with custom function: fun(winid: integer): string
|
||||
get_win_title = nil,
|
||||
-- preview_split: Split direction: "auto", "left", "right", "above", "below".
|
||||
preview_split = 'auto',
|
||||
-- This is the config that will be passed to nvim_open_win.
|
||||
-- Change values here to customize the layout
|
||||
override = function(conf)
|
||||
return conf
|
||||
end,
|
||||
},
|
||||
-- Configuration for the file preview window
|
||||
preview_win = {
|
||||
-- Whether the preview window is automatically updated when the cursor is moved
|
||||
update_on_cursor_moved = true,
|
||||
-- How to open the preview window "load"|"scratch"|"fast_scratch"
|
||||
preview_method = 'fast_scratch',
|
||||
-- A function that returns true to disable preview on a file e.g. to avoid lag
|
||||
disable_preview = function(filename)
|
||||
return false
|
||||
end,
|
||||
-- Window-local options to use for preview window buffers
|
||||
win_options = {},
|
||||
},
|
||||
-- Configuration for the floating action confirmation window
|
||||
confirmation = {
|
||||
-- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||
-- min_width and max_width can be a single value or a list of mixed integer/float types.
|
||||
-- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total"
|
||||
max_width = 0.9,
|
||||
-- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total"
|
||||
min_width = { 40, 0.4 },
|
||||
-- optionally define an integer/float for the exact width of the preview window
|
||||
width = nil,
|
||||
-- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
|
||||
-- min_height and max_height can be a single value or a list of mixed integer/float types.
|
||||
-- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total"
|
||||
max_height = 0.9,
|
||||
-- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total"
|
||||
min_height = { 5, 0.1 },
|
||||
-- optionally define an integer/float for the exact height of the preview window
|
||||
height = nil,
|
||||
border = nil,
|
||||
win_options = {
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
-- Configuration for the floating progress window
|
||||
progress = {
|
||||
max_width = 0.9,
|
||||
min_width = { 40, 0.4 },
|
||||
width = nil,
|
||||
max_height = { 10, 0.9 },
|
||||
min_height = { 5, 0.1 },
|
||||
height = nil,
|
||||
border = nil,
|
||||
minimized_border = 'none',
|
||||
win_options = {
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
-- Configuration for the floating SSH window
|
||||
ssh = {
|
||||
border = nil,
|
||||
},
|
||||
-- Configuration for the floating keymaps help window
|
||||
keymaps_help = {
|
||||
border = nil,
|
||||
},
|
||||
}
|
||||
|
||||
vim.keymap.set('n', '-', oil.open, { noremap = true })
|
||||
52
lua/kickstart/health.lua
Normal file
52
lua/kickstart/health.lua
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
--[[
|
||||
--
|
||||
-- This file is not required for your own configuration,
|
||||
-- but helps people determine if their system is setup correctly.
|
||||
--
|
||||
--]]
|
||||
|
||||
local check_version = function()
|
||||
local verstr = tostring(vim.version())
|
||||
if not vim.version.ge then
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
return
|
||||
end
|
||||
|
||||
if vim.version.ge(vim.version(), '0.10-dev') then
|
||||
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
|
||||
else
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
end
|
||||
end
|
||||
|
||||
local check_external_reqs = function()
|
||||
-- Basic utils: `git`, `make`, `unzip`
|
||||
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
|
||||
local is_executable = vim.fn.executable(exe) == 1
|
||||
if is_executable then
|
||||
vim.health.ok(string.format("Found executable: '%s'", exe))
|
||||
else
|
||||
vim.health.warn(string.format("Could not find executable: '%s'", exe))
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
return {
|
||||
check = function()
|
||||
vim.health.start 'kickstart.nvim'
|
||||
|
||||
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
|
||||
|
||||
Fix only warnings for plugins and languages you intend to use.
|
||||
Mason will give warnings for languages that are not installed.
|
||||
You do not need to install, unless you want to use those languages!]]
|
||||
|
||||
local uv = vim.uv or vim.loop
|
||||
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
|
||||
|
||||
check_version()
|
||||
check_external_reqs()
|
||||
end,
|
||||
}
|
||||
39
lua/plugins/alpha.lua
Normal file
39
lua/plugins/alpha.lua
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
return {
|
||||
'goolord/alpha-nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
event = 'VimEnter',
|
||||
config = function()
|
||||
local alpha = require 'alpha'
|
||||
local dashboard = require 'alpha.themes.dashboard'
|
||||
|
||||
dashboard.section.header.val = {
|
||||
' ',
|
||||
' ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗',
|
||||
' ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║',
|
||||
' ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║',
|
||||
' ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║',
|
||||
' ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║',
|
||||
' ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝',
|
||||
' ',
|
||||
}
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button('f', ' Find file', '<cmd>Telescope find_files<cr>'),
|
||||
dashboard.button('r', ' Recent files', '<cmd>Telescope oldfiles<cr>'),
|
||||
dashboard.button('g', ' Grep text', '<cmd>Telescope live_grep<cr>'),
|
||||
dashboard.button('c', ' Configuration', '<cmd>e $MYVIMRC<cr>'),
|
||||
dashboard.button('l', ' Lazy', '<cmd>Lazy<cr>'),
|
||||
dashboard.button('q', ' Quit', '<cmd>qa<cr>'),
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
|
||||
-- Disable folding on alpha buffer
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'alpha',
|
||||
callback = function()
|
||||
vim.opt_local.foldenable = false
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
5
lua/plugins/autopairs.lua
Normal file
5
lua/plugins/autopairs.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
opts = {},
|
||||
}
|
||||
54
lua/plugins/blink-cmp.lua
Normal file
54
lua/plugins/blink-cmp.lua
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
return {
|
||||
'saghen/blink.cmp',
|
||||
event = 'VimEnter',
|
||||
version = '1.*',
|
||||
dependencies = {
|
||||
{
|
||||
'L3MON4D3/LuaSnip',
|
||||
version = '2.*',
|
||||
build = (function()
|
||||
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
|
||||
return
|
||||
end
|
||||
return 'make install_jsregexp'
|
||||
end)(),
|
||||
opts = {},
|
||||
},
|
||||
'folke/lazydev.nvim',
|
||||
},
|
||||
--- @module 'blink.cmp'
|
||||
--- @type blink.cmp.Config
|
||||
opts = {
|
||||
keymap = {
|
||||
preset = 'default',
|
||||
['<Tab>'] = { 'select_and_accept', 'fallback' },
|
||||
['<Esc>'] = { 'cancel', 'fallback' },
|
||||
},
|
||||
appearance = {
|
||||
nerd_font_variant = 'mono',
|
||||
},
|
||||
completion = {
|
||||
menu = { auto_show = true },
|
||||
ghost_text = {
|
||||
enabled = true,
|
||||
show_without_selection = true,
|
||||
show_with_menu = true,
|
||||
},
|
||||
documentation = { auto_show = true, auto_show_delay_ms = 500 },
|
||||
},
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'lazydev', 'codecompanion' },
|
||||
providers = {
|
||||
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
|
||||
codecompanion = {
|
||||
name = 'codecompanion',
|
||||
module = 'codecompanion.providers.completion.blink',
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
snippets = { preset = 'luasnip' },
|
||||
fuzzy = { implementation = 'lua' },
|
||||
signature = { enabled = true },
|
||||
},
|
||||
}
|
||||
23
lua/plugins/bufferline.lua
Normal file
23
lua/plugins/bufferline.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
version = '*',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
event = 'VimEnter',
|
||||
opts = {
|
||||
options = {
|
||||
diagnostics = 'nvim_lsp',
|
||||
offsets = {
|
||||
{ filetype = 'undotree', text = 'Undo Tree', highlight = 'Directory', separator = true },
|
||||
},
|
||||
show_buffer_close_icons = false,
|
||||
show_close_icon = false,
|
||||
separator_style = 'slant',
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ '<S-h>', '<cmd>BufferLineCyclePrev<cr>', desc = 'Prev Buffer' },
|
||||
{ '<S-l>', '<cmd>BufferLineCycleNext<cr>', desc = 'Next Buffer' },
|
||||
{ '<leader>bd', '<cmd>bdelete<cr>', desc = '[B]uffer [D]elete' },
|
||||
{ '<leader>bp', '<cmd>BufferLineTogglePin<cr>', desc = '[B]uffer [P]in' },
|
||||
},
|
||||
}
|
||||
9
lua/plugins/claude-code.lua
Normal file
9
lua/plugins/claude-code.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
'greggh/claude-code.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
config = function()
|
||||
require 'custom.claude-code'
|
||||
end,
|
||||
}
|
||||
53
lua/plugins/codecompanion.lua
Normal file
53
lua/plugins/codecompanion.lua
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
return {
|
||||
'olimorris/codecompanion.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
'saghen/blink.cmp',
|
||||
},
|
||||
cmd = { 'CodeCompanion', 'CodeCompanionChat', 'CodeCompanionActions' },
|
||||
keys = {
|
||||
{ '<leader>a', '<cmd>CodeCompanionActions<cr>', mode = { 'n', 'v' }, desc = 'CodeCompanion Actions' },
|
||||
{ '<leader>ac', '<cmd>CodeCompanionChat Toggle<cr>', mode = { 'n', 'v' }, desc = 'CodeCompanion Chat' },
|
||||
{ 'ga', '<cmd>CodeCompanionChat Add<cr>', mode = 'v', desc = 'Add to CodeCompanion Chat' },
|
||||
},
|
||||
opts = {
|
||||
log_level = 'DEBUG',
|
||||
adapters = {
|
||||
local_model = function()
|
||||
return require('codecompanion.adapters').extend('openai_compatible', {
|
||||
env = {
|
||||
url = 'http://localhost:8000/api/v1/chat/completions',
|
||||
api_key = 'dummy-key',
|
||||
},
|
||||
schema = {
|
||||
model = { default = '' },
|
||||
temperature = { default = 0.3 },
|
||||
},
|
||||
})
|
||||
end,
|
||||
mistral = function()
|
||||
return require('codecompanion.adapters').extend('mistral', {
|
||||
url = 'https://codestral.mistral.ai/v1/chat/completions',
|
||||
env = {
|
||||
api_key = 'cmd:echo $MISTRAL_API_KEY',
|
||||
},
|
||||
schema = {
|
||||
model = { default = 'codestral-latest' },
|
||||
},
|
||||
})
|
||||
end,
|
||||
ollama = function()
|
||||
return require('codecompanion.adapters').extend('ollama', {
|
||||
schema = {
|
||||
model = { default = 'qwen2.5-coder:latest' },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
strategies = {
|
||||
chat = { adapter = 'anthropic' },
|
||||
inline = { adapter = 'anthropic' },
|
||||
},
|
||||
},
|
||||
}
|
||||
11
lua/plugins/comment.lua
Normal file
11
lua/plugins/comment.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
'numToStr/Comment.nvim',
|
||||
event = 'VimEnter',
|
||||
config = function()
|
||||
require('Comment').setup()
|
||||
vim.keymap.set('n', '<C-/>', '<Plug>(comment_toggle_linewise_current)', { desc = 'Toggle comment' })
|
||||
vim.keymap.set('n', '<C-_>', '<Plug>(comment_toggle_linewise_current)', { desc = 'Toggle comment' })
|
||||
vim.keymap.set('v', '<C-/>', '<Plug>(comment_toggle_linewise_visual)', { desc = 'Toggle comment' })
|
||||
vim.keymap.set('v', '<C-_>', '<Plug>(comment_toggle_linewise_visual)', { desc = 'Toggle comment' })
|
||||
end,
|
||||
}
|
||||
41
lua/plugins/conform.lua
Normal file
41
lua/plugins/conform.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
return {
|
||||
'stevearc/conform.nvim',
|
||||
event = { 'BufWritePre' },
|
||||
cmd = { 'ConformInfo' },
|
||||
keys = {
|
||||
{
|
||||
'<leader>f',
|
||||
function()
|
||||
require('conform').format { async = true, lsp_format = 'fallback' }
|
||||
end,
|
||||
mode = '',
|
||||
desc = '[F]ormat buffer',
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
notify_on_error = false,
|
||||
format_on_save = function(bufnr)
|
||||
-- Skip special buffers (e.g. CodeCompanion chat, terminals)
|
||||
if vim.bo[bufnr].buftype ~= '' then
|
||||
return nil
|
||||
end
|
||||
local disable_filetypes = {}
|
||||
if disable_filetypes[vim.bo[bufnr].filetype] then
|
||||
return nil
|
||||
end
|
||||
return { timeout_ms = 500, lsp_format = 'fallback' }
|
||||
end,
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
c = { 'clang-format' },
|
||||
cpp = { 'clang-format' },
|
||||
python = { 'isort', 'black' },
|
||||
go = { 'goimports', 'gofmt' },
|
||||
java = { 'google-java-format' },
|
||||
html = { 'prettier' },
|
||||
css = { 'prettier' },
|
||||
markdown = { 'prettier' },
|
||||
toml = { 'taplo' },
|
||||
},
|
||||
},
|
||||
}
|
||||
12
lua/plugins/flash.lua
Normal file
12
lua/plugins/flash.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
'folke/flash.nvim',
|
||||
event = 'VeryLazy',
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
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' },
|
||||
{ 'r', mode = 'o', function() require('flash').remote() end, desc = 'Remote Flash' },
|
||||
{ 'R', mode = { 'o', 'x' }, function() require('flash').treesitter_search() end, desc = 'Treesitter Search' },
|
||||
},
|
||||
}
|
||||
12
lua/plugins/gitsigns.lua
Normal file
12
lua/plugins/gitsigns.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
},
|
||||
}
|
||||
8
lua/plugins/godot.lua
Normal file
8
lua/plugins/godot.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
'lommix/godot.nvim',
|
||||
lazy = true,
|
||||
cmd = { 'GodotDebug', 'GodotBreakAtCursor', 'GodotStep', 'GodotQuit', 'GodotContinue' },
|
||||
config = function()
|
||||
require 'custom.godot_config'
|
||||
end,
|
||||
}
|
||||
11
lua/plugins/gruvbox.lua
Normal file
11
lua/plugins/gruvbox.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
'ellisonleao/gruvbox.nvim',
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require('gruvbox').setup {
|
||||
contrast = 'hard',
|
||||
transparent_mode = false,
|
||||
}
|
||||
vim.cmd.colorscheme 'gruvbox'
|
||||
end,
|
||||
}
|
||||
4
lua/plugins/guess-indent.lua
Normal file
4
lua/plugins/guess-indent.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
'NMAC427/guess-indent.nvim',
|
||||
opts = {},
|
||||
}
|
||||
17
lua/plugins/harpoon.lua
Normal file
17
lua/plugins/harpoon.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
return {
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local harpoon = require 'harpoon'
|
||||
harpoon:setup()
|
||||
|
||||
vim.keymap.set('n', '<leader>ha', function() harpoon:list():add() end, { desc = '[H]arpoon [A]dd' })
|
||||
vim.keymap.set('n', '<leader>hh', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, { desc = '[H]arpoon Menu' })
|
||||
|
||||
vim.keymap.set('n', '<leader>1', function() harpoon:list():select(1) end, { desc = 'Harpoon File 1' })
|
||||
vim.keymap.set('n', '<leader>2', function() harpoon:list():select(2) end, { desc = 'Harpoon File 2' })
|
||||
vim.keymap.set('n', '<leader>3', function() harpoon:list():select(3) end, { desc = 'Harpoon File 3' })
|
||||
vim.keymap.set('n', '<leader>4', function() harpoon:list():select(4) end, { desc = 'Harpoon File 4' })
|
||||
end,
|
||||
}
|
||||
12
lua/plugins/indent-blankline.lua
Normal file
12
lua/plugins/indent-blankline.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
main = 'ibl',
|
||||
event = { 'BufReadPost', 'BufNewFile' },
|
||||
opts = {
|
||||
indent = { char = '│' },
|
||||
scope = { enabled = true, show_start = true },
|
||||
exclude = {
|
||||
filetypes = { 'help', 'alpha', 'dashboard', 'lazy', 'mason', 'oil' },
|
||||
},
|
||||
},
|
||||
}
|
||||
153
lua/plugins/lsp.lua
Normal file
153
lua/plugins/lsp.lua
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
return {
|
||||
{
|
||||
'folke/lazydev.nvim',
|
||||
ft = 'lua',
|
||||
opts = {
|
||||
library = {
|
||||
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
{ 'mason-org/mason.nvim', opts = {} },
|
||||
'mason-org/mason-lspconfig.nvim',
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
{ 'j-hui/fidget.nvim', opts = {} },
|
||||
'saghen/blink.cmp',
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
||||
callback = function(event)
|
||||
local map = function(keys, func, desc, mode)
|
||||
mode = mode or 'n'
|
||||
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
||||
end
|
||||
|
||||
map('grn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
|
||||
map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||
map('gri', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
||||
map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
||||
map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||
map('gO', require('telescope.builtin').lsp_document_symbols, 'Open Document Symbols')
|
||||
map('gW', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Open Workspace Symbols')
|
||||
map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition')
|
||||
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
|
||||
---@param c vim.lsp.Client
|
||||
---@param method vim.lsp.protocol.Method
|
||||
---@param bufnr? integer
|
||||
---@return boolean
|
||||
local function client_supports_method(c, method, bufnr)
|
||||
if vim.fn.has 'nvim-0.11' == 1 then
|
||||
return c:supports_method(method, bufnr)
|
||||
else
|
||||
return c.supports_method(method, { bufnr = bufnr })
|
||||
end
|
||||
end
|
||||
|
||||
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then
|
||||
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||
buffer = event.buf,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||
buffer = event.buf,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
vim.api.nvim_create_autocmd('LspDetach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
||||
callback = function(event2)
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then
|
||||
map('<leader>th', function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
|
||||
end, '[T]oggle Inlay [H]ints')
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.diagnostic.config {
|
||||
severity_sort = true,
|
||||
float = { border = 'rounded', source = 'if_many' },
|
||||
underline = { severity = vim.diagnostic.severity.ERROR },
|
||||
signs = vim.g.have_nerd_font and {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = ' ',
|
||||
[vim.diagnostic.severity.WARN] = ' ',
|
||||
[vim.diagnostic.severity.INFO] = ' ',
|
||||
[vim.diagnostic.severity.HINT] = ' ',
|
||||
},
|
||||
} or {},
|
||||
virtual_text = {
|
||||
source = 'if_many',
|
||||
spacing = 2,
|
||||
},
|
||||
}
|
||||
|
||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||
|
||||
local servers = {
|
||||
clangd = {
|
||||
cmd = { 'clangd', '--background-index', '--clang-tidy' },
|
||||
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' },
|
||||
},
|
||||
gopls = {},
|
||||
pyright = {},
|
||||
jdtls = {},
|
||||
html = {},
|
||||
cssls = {},
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
completion = { callSnippet = 'Replace' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua',
|
||||
'clang-format',
|
||||
'isort',
|
||||
'black',
|
||||
'goimports',
|
||||
'prettier',
|
||||
'taplo',
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
require('mason-lspconfig').setup {
|
||||
ensure_installed = {},
|
||||
automatic_installation = false,
|
||||
handlers = {
|
||||
function(server_name)
|
||||
local server = servers[server_name] or {}
|
||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||
require('lspconfig')[server_name].setup(server)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
-- Godot LSP (not managed by Mason)
|
||||
vim.lsp.config.gdscript = {
|
||||
cmd = { 'ncat', '127.0.0.1', '6005' },
|
||||
name = 'godot',
|
||||
root_markers = { 'project.godot', '.godot' },
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
19
lua/plugins/lualine.lua
Normal file
19
lua/plugins/lualine.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
opts = {
|
||||
options = {
|
||||
theme = 'gruvbox',
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = { { 'filename', path = 1 } },
|
||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' },
|
||||
},
|
||||
},
|
||||
}
|
||||
7
lua/plugins/mini.lua
Normal file
7
lua/plugins/mini.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
'echasnovski/mini.nvim',
|
||||
config = function()
|
||||
require('mini.ai').setup { n_lines = 500 }
|
||||
require('mini.surround').setup()
|
||||
end,
|
||||
}
|
||||
11
lua/plugins/neoscroll.lua
Normal file
11
lua/plugins/neoscroll.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
'karb94/neoscroll.nvim',
|
||||
event = { 'BufReadPost', 'BufNewFile' },
|
||||
opts = {
|
||||
mappings = { '<C-u>', '<C-d>', '<C-b>', '<C-f>', 'zt', 'zz', 'zb' },
|
||||
hide_cursor = true,
|
||||
stop_eof = true,
|
||||
respect_scrolloff = false,
|
||||
cursor_scrolls_alone = true,
|
||||
},
|
||||
}
|
||||
24
lua/plugins/noice.lua
Normal file
24
lua/plugins/noice.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
return {
|
||||
'folke/noice.nvim',
|
||||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
'MunifTanjim/nui.nvim',
|
||||
'rcarriga/nvim-notify',
|
||||
},
|
||||
opts = {
|
||||
lsp = {
|
||||
override = {
|
||||
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
|
||||
['vim.lsp.util.stylize_markdown'] = true,
|
||||
['cmp.entry.get_documentation'] = true,
|
||||
},
|
||||
},
|
||||
presets = {
|
||||
bottom_search = true,
|
||||
command_palette = true,
|
||||
long_message_to_split = true,
|
||||
inc_rename = false,
|
||||
lsp_doc_border = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
7
lua/plugins/oil.lua
Normal file
7
lua/plugins/oil.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
'stevearc/oil.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
require 'custom.oil_config'
|
||||
end,
|
||||
}
|
||||
6
lua/plugins/rainbow-csv.lua
Normal file
6
lua/plugins/rainbow-csv.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
'cameron-wags/rainbow_csv.nvim',
|
||||
config = true,
|
||||
ft = { 'csv', 'tsv', 'csv_semicolon', 'csv_whitespace', 'csv_pipe', 'rfc_csv', 'rfc_semicolon' },
|
||||
cmd = { 'RainbowDelim', 'RainbowDelimSimple', 'RainbowDelimQuoted', 'RainbowMultiDelim' },
|
||||
}
|
||||
9
lua/plugins/spectre.lua
Normal file
9
lua/plugins/spectre.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
'nvim-pack/nvim-spectre',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
cmd = 'Spectre',
|
||||
keys = {
|
||||
{ '<leader>sr', function() require('spectre').open() end, desc = '[S]earch & [R]eplace (Spectre)' },
|
||||
{ '<leader>srw', function() require('spectre').open_visual { select_word = true } end, desc = '[S]pectre current [W]ord' },
|
||||
},
|
||||
}
|
||||
58
lua/plugins/telescope.lua
Normal file
58
lua/plugins/telescope.lua
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
event = 'VimEnter',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = 'make',
|
||||
cond = function()
|
||||
return vim.fn.executable 'make' == 1
|
||||
end,
|
||||
},
|
||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||
},
|
||||
config = function()
|
||||
require('telescope').setup {
|
||||
extensions = {
|
||||
['ui-select'] = {
|
||||
require('telescope.themes').get_dropdown(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
pcall(require('telescope').load_extension, 'fzf')
|
||||
pcall(require('telescope').load_extension, 'ui-select')
|
||||
|
||||
local builtin = require 'telescope.builtin'
|
||||
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
||||
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
||||
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
|
||||
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
||||
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
||||
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
|
||||
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||
vim.keymap.set('n', '<leader>sR', builtin.resume, { desc = '[S]earch [R]esume' })
|
||||
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
})
|
||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
||||
|
||||
vim.keymap.set('n', '<leader>s/', function()
|
||||
builtin.live_grep {
|
||||
grep_open_files = true,
|
||||
prompt_title = 'Live Grep in Open Files',
|
||||
}
|
||||
end, { desc = '[S]earch [/] in Open Files' })
|
||||
|
||||
vim.keymap.set('n', '<leader>sn', function()
|
||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||
end, { desc = '[S]earch [N]eovim files' })
|
||||
end,
|
||||
}
|
||||
9
lua/plugins/thesaurus.lua
Normal file
9
lua/plugins/thesaurus.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
'Ron89/thesaurus_query.vim',
|
||||
cmd = { 'Thesaurus', 'ThesaurusQueryReplaceCurrentWord' },
|
||||
init = function()
|
||||
vim.g.tq_enabled_backends = { 'datamuse_com', 'openoffice_en' }
|
||||
vim.g.tq_use_vim_autocomplete = 0
|
||||
vim.keymap.set('n', 'z/', '<cmd>ThesaurusQueryReplaceCurrentWord<CR>', { desc = 'Find synonyms (thesaurus)' })
|
||||
end,
|
||||
}
|
||||
6
lua/plugins/todo-comments.lua
Normal file
6
lua/plugins/todo-comments.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
'folke/todo-comments.nvim',
|
||||
event = 'VimEnter',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
opts = { signs = false },
|
||||
}
|
||||
36
lua/plugins/treesitter.lua
Normal file
36
lua/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
main = 'nvim-treesitter.configs',
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
'bash',
|
||||
'c',
|
||||
'cpp',
|
||||
'css',
|
||||
'diff',
|
||||
'go',
|
||||
'html',
|
||||
'java',
|
||||
'javascript',
|
||||
'json',
|
||||
'lua',
|
||||
'luadoc',
|
||||
'markdown',
|
||||
'markdown_inline',
|
||||
'python',
|
||||
'query',
|
||||
'toml',
|
||||
'typescript',
|
||||
'vim',
|
||||
'vimdoc',
|
||||
'yaml',
|
||||
},
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = { 'ruby' },
|
||||
},
|
||||
indent = { enable = true, disable = { 'ruby' } },
|
||||
},
|
||||
}
|
||||
13
lua/plugins/trouble.lua
Normal file
13
lua/plugins/trouble.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
'folke/trouble.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
cmd = 'Trouble',
|
||||
opts = {},
|
||||
keys = {
|
||||
{ '<leader>xx', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Diagnostics (Trouble)' },
|
||||
{ '<leader>xd', '<cmd>Trouble diagnostics toggle filter.buf=0<cr>', desc = 'Buffer Diagnostics (Trouble)' },
|
||||
{ '<leader>xs', '<cmd>Trouble symbols toggle focus=false<cr>', desc = 'Symbols (Trouble)' },
|
||||
{ '<leader>xl', '<cmd>Trouble lsp toggle focus=false win.position=right<cr>', desc = 'LSP Definitions / References (Trouble)' },
|
||||
{ '<leader>xq', '<cmd>Trouble qflist toggle<cr>', desc = 'Quickfix List (Trouble)' },
|
||||
},
|
||||
}
|
||||
6
lua/plugins/undotree.lua
Normal file
6
lua/plugins/undotree.lua
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
'mbbill/undotree',
|
||||
keys = {
|
||||
{ '<leader>u', '<cmd>UndotreeToggle<cr>', desc = '[U]ndotree Toggle' },
|
||||
},
|
||||
}
|
||||
17
lua/plugins/vim-tmux-navigator.lua
Normal file
17
lua/plugins/vim-tmux-navigator.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
return {
|
||||
'christoomey/vim-tmux-navigator',
|
||||
cmd = {
|
||||
'TmuxNavigateLeft',
|
||||
'TmuxNavigateDown',
|
||||
'TmuxNavigateUp',
|
||||
'TmuxNavigateRight',
|
||||
'TmuxNavigatePrevious',
|
||||
},
|
||||
keys = {
|
||||
{ '<c-h>', '<cmd><C-U>TmuxNavigateLeft<cr>' },
|
||||
{ '<c-j>', '<cmd><C-U>TmuxNavigateDown<cr>' },
|
||||
{ '<c-k>', '<cmd><C-U>TmuxNavigateUp<cr>' },
|
||||
{ '<c-l>', '<cmd><C-U>TmuxNavigateRight<cr>' },
|
||||
{ '<c-\\>', '<cmd><C-U>TmuxNavigatePrevious<cr>' },
|
||||
},
|
||||
}
|
||||
47
lua/plugins/which-key.lua
Normal file
47
lua/plugins/which-key.lua
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
return {
|
||||
'folke/which-key.nvim',
|
||||
event = 'VimEnter',
|
||||
opts = {
|
||||
delay = 0,
|
||||
icons = {
|
||||
mappings = vim.g.have_nerd_font,
|
||||
keys = vim.g.have_nerd_font and {} or {
|
||||
Up = '<Up> ',
|
||||
Down = '<Down> ',
|
||||
Left = '<Left> ',
|
||||
Right = '<Right> ',
|
||||
C = '<C-…> ',
|
||||
M = '<M-…> ',
|
||||
D = '<D-…> ',
|
||||
S = '<S-…> ',
|
||||
CR = '<CR> ',
|
||||
Esc = '<Esc> ',
|
||||
ScrollWheelDown = '<ScrollWheelDown> ',
|
||||
ScrollWheelUp = '<ScrollWheelUp> ',
|
||||
NL = '<NL> ',
|
||||
BS = '<BS> ',
|
||||
Space = '<Space> ',
|
||||
Tab = '<Tab> ',
|
||||
F1 = '<F1>',
|
||||
F2 = '<F2>',
|
||||
F3 = '<F3>',
|
||||
F4 = '<F4>',
|
||||
F5 = '<F5>',
|
||||
F6 = '<F6>',
|
||||
F7 = '<F7>',
|
||||
F8 = '<F8>',
|
||||
F9 = '<F9>',
|
||||
F10 = '<F10>',
|
||||
F11 = '<F11>',
|
||||
F12 = '<F12>',
|
||||
},
|
||||
},
|
||||
spec = {
|
||||
{ '<leader>s', group = '[S]earch' },
|
||||
{ '<leader>t', group = '[T]oggle' },
|
||||
{ '<leader>h', group = 'Git [H]unk / [H]arpoon', mode = { 'n', 'v' } },
|
||||
{ '<leader>x', group = 'Trouble' },
|
||||
{ '<leader>b', group = '[B]uffer' },
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue