mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-05-14 07:26:44 +00:00
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
'm4xshen/autoclose.nvim',
|
||||
event = 'VeryLazy',
|
||||
config = true,
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
config = true,
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
return {
|
||||
"yetone/avante.nvim",
|
||||
event = "VeryLazy",
|
||||
-- build = "make", -- This is Optional, only if you want to use tiktoken_core to calculate tokens count
|
||||
opts = {
|
||||
-- provider = "claude",
|
||||
provider = "openai",
|
||||
},
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||
"stevearc/dressing.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
--- The below is optional, make sure to setup it properly if you have lazy=true
|
||||
{
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
opts = {
|
||||
file_types = { "markdown", "Avante" },
|
||||
},
|
||||
ft = { "markdown", "Avante" },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
event = 'VeryLazy',
|
||||
enabled = false,
|
||||
opts = {
|
||||
options = {
|
||||
show_buffer_icons = true,
|
||||
diagnostics = 'nvim_lsp',
|
||||
indicator = {
|
||||
icon = '▎',
|
||||
style = 'icon',
|
||||
},
|
||||
-- show_buffer_close_icons = false,
|
||||
modified_icon = '✥',
|
||||
offsets = {
|
||||
{ filetype = 'NvimTree', text = 'File Explorer', text_align = 'center', highlight = 'Directory' },
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
return {
|
||||
'tkmpypy/chowcho.nvim',
|
||||
event = 'VeryLazy',
|
||||
keys = {
|
||||
{
|
||||
'-',
|
||||
mode = { 'n' },
|
||||
function()
|
||||
require('chowcho').run()
|
||||
end,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
return {
|
||||
'hrsh7th/nvim-cmp',
|
||||
event = 'InsertEnter',
|
||||
dependencies = {
|
||||
'hrsh7th/cmp-vsnip',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/vim-vsnip',
|
||||
'hrsh7th/vim-vsnip-integ',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'onsails/lspkind-nvim',
|
||||
'windwp/nvim-autopairs',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
},
|
||||
config = function()
|
||||
local cmp = require('cmp')
|
||||
local types = require('cmp.types')
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
local opts = {
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
vim_item.kind = require('lspkind').presets.default[vim_item.kind] .. ' ' .. vim_item.kind
|
||||
|
||||
-- set a name for each source
|
||||
vim_item.menu = ({
|
||||
buffer = '[Buf]',
|
||||
nvim_lsp = '[LSP]',
|
||||
luasnip = '[Snip]',
|
||||
nvim_lua = '[Lua]',
|
||||
latex_symbols = '[Latex]',
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn['vsnip#anonymous'](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<Tab>'] = cmp.mapping.select_next_item({ behavior = types.cmp.SelectBehavior.Select }),
|
||||
['<S-Tab>'] = function(fallback)
|
||||
local function input(keys, mode)
|
||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(keys, true, true, true), mode or 'i', true)
|
||||
end
|
||||
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
input('<C-p>', 'n')
|
||||
elseif vim.fn['vsnip#jumpable']() == -1 then
|
||||
input('<Plug>(vsnip-jump-prev)')
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
['<C-y>'] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }),
|
||||
['<CR>'] = function(fallback)
|
||||
fallback()
|
||||
end,
|
||||
['<C-e>'] = function(fallback)
|
||||
fallback()
|
||||
end,
|
||||
}),
|
||||
completion = {
|
||||
completeopt = 'menu,menuone,noselect',
|
||||
},
|
||||
preselect = types.cmp.PreselectMode.None,
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'vsnip' },
|
||||
},
|
||||
}
|
||||
cmp.setup(opts)
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
|
||||
end,
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
return {
|
||||
'Exafunction/codeium.vim',
|
||||
event = 'BufEnter',
|
||||
config = function()
|
||||
-- Change '<C-g>' here to any keycode you like.
|
||||
vim.keymap.set('i', '<C-e>', function() return vim.fn['codeium#Accept']() end, { expr = true, silent = true })
|
||||
vim.keymap.set('i', '<c-j>', function() return vim.fn['codeium#CycleCompletions'](1) end,
|
||||
{ expr = true, silent = true })
|
||||
vim.keymap.set('i', '<c-k>', function() return vim.fn['codeium#CycleCompletions'](-1) end,
|
||||
{ expr = true, silent = true })
|
||||
vim.keymap.set('i', '<c-x>', function() return vim.fn['codeium#Clear']() end, { expr = true, silent = true })
|
||||
end
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
'numToStr/comment.nvim',
|
||||
keys = { 'gcc', { 'gc', mode = 'v' } },
|
||||
config = true,
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
return {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
override = {
|
||||
zsh = {
|
||||
icon = '',
|
||||
color = '#428850',
|
||||
name = 'Zsh',
|
||||
},
|
||||
},
|
||||
default = true,
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
return {
|
||||
'princejoogie/dir-telescope.nvim',
|
||||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
},
|
||||
config = function()
|
||||
require('dir-telescope').setup()
|
||||
require('telescope').load_extension('dir')
|
||||
end,
|
||||
}
|
||||
197
nvim/lua/plugins/example.lua
Normal file
197
nvim/lua/plugins/example.lua
Normal file
@@ -0,0 +1,197 @@
|
||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, { name = "emoji" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, {
|
||||
function()
|
||||
return "😄"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
return {
|
||||
'j-hui/fidget.nvim', -- nvim-lsp progress
|
||||
branch = 'legacy',
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
text = {
|
||||
done = '[✓]',
|
||||
},
|
||||
fmt = {
|
||||
stack_upwards = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
return {
|
||||
'tpope/vim-fugitive',
|
||||
event = 'VeryLazy',
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
return {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
event = 'VeryLazy',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = '▌' },
|
||||
change = { text = '▌' },
|
||||
delete = { text = '▌' },
|
||||
topdelete = { text = '▌' },
|
||||
changedelete = { text = '▌' },
|
||||
},
|
||||
word_diff = false,
|
||||
current_line_blame = true,
|
||||
linehl = true,
|
||||
numhl = true,
|
||||
sign_priority = 6,
|
||||
preview_config = {
|
||||
border = 'rounded',
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
local gs = package.loaded.gitsigns
|
||||
map('n', '<leader>hs', gs.stage_hunk)
|
||||
map('n', '<leader>hr', gs.reset_hunk)
|
||||
map('v', '<leader>hs', function() gs.stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end)
|
||||
map('v', '<leader>hr', function() gs.reset_hunk { vim.fn.line('.'), vim.fn.line('v') } end)
|
||||
map('n', '<leader>hp', gs.preview_hunk)
|
||||
map('n', '<leader>hd', gs.diffthis)
|
||||
|
||||
map('n', ']c', function()
|
||||
if vim.wo.diff then return ']c' end
|
||||
vim.schedule(function() gs.next_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then return '[c' end
|
||||
vim.schedule(function() gs.prev_hunk() end)
|
||||
return '<Ignore>'
|
||||
end, { expr = true })
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
'm-demare/hlargs.nvim',
|
||||
event = 'VeryLazy',
|
||||
config = true,
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
'glepnir/hlsearch.nvim',
|
||||
event = 'VeryLazy',
|
||||
config = true,
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
return {
|
||||
'phaazon/hop.nvim',
|
||||
event = 'VeryLazy',
|
||||
config = true,
|
||||
keys = {
|
||||
{
|
||||
's',
|
||||
'<cmd>HopChar2<cr>',
|
||||
},
|
||||
{
|
||||
'<leader>w',
|
||||
'<cmd>HopWordAC<cr>',
|
||||
},
|
||||
{
|
||||
'<leader>k',
|
||||
mode = { 'n', 'v' },
|
||||
'<cmd>HopLineStart<cr>',
|
||||
},
|
||||
{
|
||||
'<leader>j',
|
||||
mode = { 'n', 'v' },
|
||||
'<cmd>HopLineStart<cr>',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
'adelarsq/image_preview.nvim',
|
||||
event = 'VeryLazy',
|
||||
config = true,
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
'mattdibi/incolla.nvim',
|
||||
cmd = { 'Incolla' },
|
||||
config = true,
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
-- local highlight = {
|
||||
-- "RainbowRed",
|
||||
-- "RainbowYellow",
|
||||
-- "RainbowBlue",
|
||||
-- "RainbowOrange",
|
||||
-- "RainbowGreen",
|
||||
-- "RainbowViolet",
|
||||
-- "RainbowCyan",
|
||||
-- }
|
||||
|
||||
-- local hooks = require "ibl.hooks"
|
||||
-- -- create the highlight groups in the highlight setup hook, so they are reset
|
||||
-- -- every time the colorscheme changes
|
||||
-- hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
||||
-- vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
|
||||
-- vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
|
||||
-- vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
|
||||
-- vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
|
||||
-- vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
|
||||
-- vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
|
||||
-- vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
|
||||
-- end)
|
||||
|
||||
return {
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
event = 'BufRead',
|
||||
main = 'ibl',
|
||||
opts = {
|
||||
indent = {
|
||||
char = '|',
|
||||
-- highlight = highlight,
|
||||
},
|
||||
whitespace = {
|
||||
},
|
||||
exclude = {
|
||||
buftypes = {
|
||||
'terminal',
|
||||
'NvimTree',
|
||||
'nofile'
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
return {
|
||||
'junnplus/lsp-setup.nvim',
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'folke/neodev.nvim'
|
||||
},
|
||||
init = function()
|
||||
vim.lsp.set_log_level('debug')
|
||||
require('vim.lsp.log').set_format_func(vim.inspect)
|
||||
|
||||
local rounded = { border = 'rounded' }
|
||||
vim.diagnostic.config({ float = rounded })
|
||||
local with_rounded = function(handler)
|
||||
return vim.lsp.with(handler, rounded)
|
||||
end
|
||||
vim.lsp.handlers['textDocument/hover'] = with_rounded(vim.lsp.handlers.hover)
|
||||
vim.lsp.handlers['textDocument/signatureHelp'] = with_rounded(vim.lsp.handlers.signature_help)
|
||||
end,
|
||||
opts = {
|
||||
mappings = {
|
||||
gd = function() require('telescope.builtin').lsp_definitions() end,
|
||||
gi = function() require('telescope.builtin').lsp_implementations() end,
|
||||
gr = function() require('telescope.builtin').lsp_references() end,
|
||||
['<space>f'] = vim.lsp.buf.format,
|
||||
},
|
||||
inlay_hints = {
|
||||
enabled = true,
|
||||
debug = true,
|
||||
},
|
||||
servers = {
|
||||
eslint = {},
|
||||
pylsp = {
|
||||
settings = {
|
||||
pylsp = {
|
||||
-- PylspInstall python-lsp-black
|
||||
-- PylspInstall pyls-isort
|
||||
configurationSources = { 'flake8' },
|
||||
plugins = {
|
||||
pycodestyle = {
|
||||
enabled = false,
|
||||
},
|
||||
mccabe = {
|
||||
enabled = false,
|
||||
},
|
||||
pyflakes = {
|
||||
enabled = false,
|
||||
},
|
||||
flake8 = {
|
||||
enabled = true,
|
||||
},
|
||||
black = {
|
||||
enabled = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
yamlls = {
|
||||
settings = {
|
||||
yaml = {
|
||||
keyOrdering = false
|
||||
}
|
||||
}
|
||||
},
|
||||
crystalline = {},
|
||||
terraformls = {},
|
||||
jsonls = {},
|
||||
bashls = {},
|
||||
tsserver = {
|
||||
settings = {
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
includeInlayParameterNameHints = 'all',
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||
includeInlayFunctionParameterTypeHints = true,
|
||||
includeInlayVariableTypeHints = true,
|
||||
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
dockerls = {},
|
||||
-- jsonnet_ls = {},
|
||||
helm_ls = {},
|
||||
gopls = {
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
-- staticcheck = true,
|
||||
usePlaceholders = true,
|
||||
codelenses = {
|
||||
gc_details = true,
|
||||
},
|
||||
hints = {
|
||||
rangeVariableTypes = true,
|
||||
parameterNames = true,
|
||||
constantValues = true,
|
||||
assignVariableTypes = true,
|
||||
compositeLiteralFields = true,
|
||||
compositeLiteralTypes = true,
|
||||
functionTypeParameters = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- bufls = {},
|
||||
-- html = {},
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
},
|
||||
hint = {
|
||||
enable = true,
|
||||
arrayIndex = 'Disable',
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
['rust_analyzer@nightly'] = {
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
diagnostics = {
|
||||
disabled = { 'unresolved-proc-macro' },
|
||||
},
|
||||
cargo = {
|
||||
loadOutDirsFromCheck = true,
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
},
|
||||
inlayHints = {
|
||||
closureReturnTypeHints = {
|
||||
enable = true
|
||||
},
|
||||
},
|
||||
cache = {
|
||||
warmup = false,
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
'ray-x/lsp_signature.nvim',
|
||||
event = 'VeryLazy',
|
||||
config = true,
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
return {
|
||||
'hoob3rt/lualine.nvim',
|
||||
event = 'VeryLazy',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons', opt = true },
|
||||
opts = {
|
||||
options = {
|
||||
disabled_filetypes = { 'NvimTree' },
|
||||
theme = 'auto',
|
||||
section_separators = '',
|
||||
component_separators = '',
|
||||
-- globalstatus = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
return { "folke/neoconf.nvim", cmd = "Neoconf" }
|
||||
@@ -1,9 +0,0 @@
|
||||
return {
|
||||
'folke/neodev.nvim',
|
||||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
},
|
||||
ft = { 'lua' },
|
||||
config = true,
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
return {
|
||||
'petertriho/nvim-scrollbar',
|
||||
event = 'VeryLazy',
|
||||
opts = function()
|
||||
local colors = require('tokyonight.colors').setup()
|
||||
return {
|
||||
handle = {
|
||||
cursor = false,
|
||||
color = colors.bg_highlight,
|
||||
},
|
||||
marks = {
|
||||
Search = { color = colors.orange },
|
||||
Error = { color = colors.error },
|
||||
Warn = { color = colors.warning },
|
||||
Info = { color = colors.info },
|
||||
Hint = { color = colors.hint },
|
||||
Misc = { color = colors.purple },
|
||||
},
|
||||
excluded_filetypes = { 'NvimTree', 'TelescopePrompt', 'chatgpt' }
|
||||
}
|
||||
end
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
'utilyre/sentiment.nvim',
|
||||
event = 'VeryLazy',
|
||||
config = true,
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
'ray-x/lsp_signature.nvim',
|
||||
event = 'VeryLazy',
|
||||
config = true,
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
return {
|
||||
'krivahtoo/silicon.nvim',
|
||||
event = 'VeryLazy',
|
||||
enabled = false,
|
||||
opts = {
|
||||
font = 'Hack=20',
|
||||
theme = 'Dracula',
|
||||
background = '#fff',
|
||||
pad_horiz = 50,
|
||||
pad_vert = 50,
|
||||
line_number = true,
|
||||
line_pad = 2,
|
||||
line_offset = 1,
|
||||
tab_width = 4,
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
return {
|
||||
'luukvbaal/statuscol.nvim',
|
||||
event = 'VeryLazy',
|
||||
opts = function()
|
||||
local builtin = require('statuscol.builtin')
|
||||
return {
|
||||
relculright = true,
|
||||
segments = {
|
||||
{
|
||||
sign = { name = { '.*' }, maxwidth = 1, auto = true },
|
||||
click = 'v:lua#.ScSa'
|
||||
},
|
||||
{ text = { builtin.lnumfunc }, click = 'v:lua.ScLa', },
|
||||
{ text = { builtin.foldfunc }, click = 'v:lua.ScFa' },
|
||||
{
|
||||
text = { ' ' },
|
||||
condition = { builtin.not_empty, true, builtin.not_empty },
|
||||
click = 'v:lua.ScFa'
|
||||
},
|
||||
{
|
||||
sign = { name = { 'GitSigns' }, maxwidth = 1, colwidth = 1, auto = true },
|
||||
click = 'v:lua.ScSa'
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
width = 0.75,
|
||||
height = 0.5,
|
||||
},
|
||||
},
|
||||
mappings = {
|
||||
i = {
|
||||
['<esc>'] = 'close',
|
||||
['<C-k>'] = 'move_selection_previous',
|
||||
['<C-j>'] = 'move_selection_next',
|
||||
['<C-l>'] = { '<Right>', type = 'command' },
|
||||
['<C-h>'] = { '<Left>', type = 'command' },
|
||||
['<C-f>'] = 'preview_scrolling_down',
|
||||
['<C-b>'] = 'preview_scrolling_up',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<leader>ff',
|
||||
'<cmd>Telescope find_files<cr>',
|
||||
},
|
||||
{
|
||||
'<leader>fg',
|
||||
'<cmd>Telescope live_grep<cr>',
|
||||
},
|
||||
{
|
||||
'<leader>b',
|
||||
'<cmd>Telescope buffers<cr>',
|
||||
},
|
||||
{
|
||||
';',
|
||||
'<cmd>Telescope commands<cr>',
|
||||
}
|
||||
},
|
||||
file_ignore_patterns = { '^vendor/', '^.git/' },
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
return {
|
||||
'folke/todo-comments.nvim',
|
||||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
opts = {
|
||||
highlight = {
|
||||
-- bg conflects with linehl of gitsigns
|
||||
keyword = 'fg',
|
||||
after = '',
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
return {
|
||||
'akinsho/toggleterm.nvim',
|
||||
event = 'VeryLazy',
|
||||
keys = {
|
||||
{ mode = { 'n' }, '<C-t>', ':ToggleTerm<CR>' },
|
||||
},
|
||||
opts = {
|
||||
open_mapping = [[<C-t>]],
|
||||
size = function(term)
|
||||
if term.direction == 'horizontal' then
|
||||
return 15
|
||||
else
|
||||
return vim.o.columns * 0.3
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
return {
|
||||
'folke/tokyonight.nvim',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
init = function()
|
||||
require('tokyonight').load()
|
||||
end,
|
||||
opts = {
|
||||
style = 'night',
|
||||
},
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
return {
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
-- event = 'VeryLazy',
|
||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
init = function()
|
||||
local function open_nvim_tree()
|
||||
require('nvim-tree.api').tree.find_file({ open = true })
|
||||
end
|
||||
|
||||
local function close_nvim_tree()
|
||||
local layout = vim.api.nvim_call_function('winlayout', {})
|
||||
if layout[1] == 'leaf'
|
||||
and vim.api.nvim_buf_get_option(vim.api.nvim_win_get_buf(layout[2]), 'filetype') == 'NvimTree'
|
||||
and layout[3] == nil then
|
||||
vim.cmd('confirm quit')
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd('VimEnter', { callback = open_nvim_tree })
|
||||
vim.api.nvim_create_autocmd('BufEnter', { callback = close_nvim_tree })
|
||||
end,
|
||||
opts = {
|
||||
filters = { dotfiles = false, custom = { '^.git$' } },
|
||||
on_attach = function(bufnr)
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
local api = require('nvim-tree.api')
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
map('n', '<C-v>', api.node.open.vertical)
|
||||
map('n', '<C-s>', api.node.open.horizontal)
|
||||
map('n', 'v', api.node.open.vertical)
|
||||
map('n', 's', api.node.open.horizontal)
|
||||
map('n', '[d', api.node.navigate.diagnostics.prev)
|
||||
map('n', ']d', api.node.navigate.diagnostics.next)
|
||||
-- map('n', 'r', api.fs.rename_sub, { buffer = bufnr })
|
||||
|
||||
map('n', '<C-t>', function() require('toggleterm').toggle() end)
|
||||
map('n', '-', function() require('chowcho').run() end)
|
||||
end,
|
||||
renderer = {
|
||||
indent_markers = {
|
||||
enable = true,
|
||||
icons = {
|
||||
item = '|',
|
||||
edge = '|',
|
||||
corner = '┗',
|
||||
}
|
||||
},
|
||||
highlight_git = true,
|
||||
icons = {
|
||||
git_placement = 'after',
|
||||
glyphs = {
|
||||
symlink = '',
|
||||
git = {
|
||||
deleted = '',
|
||||
ignored = '◌',
|
||||
renamed = '➜',
|
||||
staged = '+',
|
||||
unmerged = '',
|
||||
untracked = '?',
|
||||
-- unstaged = 'ϟ',
|
||||
},
|
||||
folder = {
|
||||
arrow_open = '',
|
||||
arrow_closed = '',
|
||||
default = '',
|
||||
open = '',
|
||||
empty = '',
|
||||
empty_open = '',
|
||||
symlink = '',
|
||||
symlink_open = '',
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
view = {
|
||||
width = 35,
|
||||
side = 'left',
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
icons = {
|
||||
error = '',
|
||||
warning = '',
|
||||
info = '',
|
||||
hint = '',
|
||||
},
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
},
|
||||
hijack_netrw = true,
|
||||
update_cwd = true,
|
||||
reload_on_bufenter = true,
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
'nvim-treesitter/playground',
|
||||
'nvim-treesitter/nvim-treesitter-refactor',
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
'nvim-treesitter/nvim-treesitter-context',
|
||||
'RRethy/nvim-treesitter-endwise',
|
||||
-- 'andymass/vim-matchup', -- extend % key
|
||||
'yioneko/nvim-yati',
|
||||
},
|
||||
init = function()
|
||||
local ncmd = vim.api.nvim_command
|
||||
ncmd('set foldmethod=expr')
|
||||
ncmd('set foldexpr=nvim_treesitter#foldexpr()')
|
||||
end,
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
'c', 'lua', 'rust', 'go', 'python',
|
||||
'zig', 'markdown', 'solidity', 'jsonnet', 'vim', 'graphql'
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
playground = {
|
||||
enable = true,
|
||||
},
|
||||
query_linter = {
|
||||
enable = true,
|
||||
use_virtual_text = true,
|
||||
lint_events = { 'BufWrite', 'CursorHold' },
|
||||
},
|
||||
-- nvim-treesitter/nvim-treesitter-refactor
|
||||
refactor = {
|
||||
highlight_definitions = { enable = true },
|
||||
smart_rename = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
smart_rename = 'gnr',
|
||||
},
|
||||
},
|
||||
},
|
||||
indent = { enable = false },
|
||||
autopairs = { enable = true },
|
||||
rainbow = { enable = true },
|
||||
autotag = { enable = true },
|
||||
context_commentstring = { enable = true },
|
||||
-- RRethy/nvim-treesitter-endwise
|
||||
endwise = {
|
||||
enable = true,
|
||||
},
|
||||
-- andymass/vim-matchup
|
||||
-- matchup = {
|
||||
-- enable = true,
|
||||
-- },
|
||||
-- nvim-treesitter/nvim-treesitter-textobjects
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
},
|
||||
},
|
||||
-- yioneko/nvim-yati
|
||||
yati = { enable = true },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require('nvim-treesitter.configs').setup(opts)
|
||||
end,
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
return {
|
||||
'wakatime/vim-wakatime',
|
||||
event = 'InsertEnter',
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
return {"folke/which-key.nvim"}
|
||||
Reference in New Issue
Block a user