woohooo
This commit is contained in:
commit
085347ddac
49 changed files with 1931 additions and 0 deletions
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