improve startup time from >250ms to ~70ms

This commit is contained in:
2024-11-22 13:43:37 -05:00
parent 19474801dd
commit 9e03718a80
20 changed files with 667 additions and 588 deletions
+21 -20
View File
@@ -1,24 +1,25 @@
return { return {
"rmagatti/auto-session", 'rmagatti/auto-session',
lazy = false, -- lazy = false,
event = 'VeryLazy',
---@module "auto-session" ---@module "auto-session"
---@type AutoSession.Config ---@type AutoSession.Config
opts = { opts = {
auto_save = true, auto_save = true,
auto_restore = false, -- don't auto restore the last session auto_restore = false, -- don't auto restore the last session
session_lens = { session_lens = {
load_on_setup = true, load_on_setup = true,
previewer = false, previewer = false,
mappings = { mappings = {
delete_session = { "i", "<C-D>" }, delete_session = { 'i', '<C-D>' },
alternate_session = { "i", "<C-S>" }, alternate_session = { 'i', '<C-S>' },
copy_session = { "i", "<C-Y>" }, copy_session = { 'i', '<C-Y>' },
},
}, },
bypass_save_filetypes = { "alpha", "dashboard" }, -- don't save dashboard/greeter to a session },
-- Folders listed here will not have sessions created within. bypass_save_filetypes = { 'alpha', 'dashboard' }, -- don't save dashboard/greeter to a session
suppress_dirs = { "~/", "~/Downloads", "~/Documents", "~/Desktop", "/" }, -- Folders listed here will not have sessions created within.
}, suppress_dirs = { '~/', '~/Downloads', '~/Documents', '~/Desktop', '/' },
} },
}
+55 -62
View File
@@ -1,65 +1,58 @@
return { return {
"akinsho/bufferline.nvim", 'akinsho/bufferline.nvim',
dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { 'nvim-tree/nvim-web-devicons' },
version = "*", version = '*',
opts = { event = 'VeryLazy',
options = { opts = {
mode = "buffer", options = {
separator_style = "slant", mode = 'buffer',
diagnostics = "nvim_lsp", separator_style = 'slant',
-- diagnostics_indicator = function(count, level, diagnostics_dict, context) diagnostics = 'nvim_lsp',
-- local s = " " -- diagnostics_indicator = function(count, level, diagnostics_dict, context)
-- for e, n in pairs(diagnostics_dict) do -- local s = " "
-- local sym = e == "error" and " " or (e == "warning" and " " or " ") -- for e, n in pairs(diagnostics_dict) do
-- s = s .. n .. sym -- local sym = e == "error" and " " or (e == "warning" and " " or " ")
-- end -- s = s .. n .. sym
-- return s -- end
-- end, -- return s
always_show_bufferline = false, -- end,
show_tab_indicators = false, always_show_bufferline = false,
color_icons = true, show_tab_indicators = false,
show_buffer_icons = true, color_icons = true,
persist_buffer_sort = true, show_buffer_icons = true,
indicator = { persist_buffer_sort = true,
style = "underline", indicator = {
}, style = 'underline',
offsets = {
{
filetype = "NvimTree",
text = function()
return vim.fn.getcwd()
end,
highlight = "Directory",
separator = true,
},
},
custom_areas = {
right = function()
local result = {}
local seve = vim.diagnostic.severity
local error = #vim.diagnostic.get(0, { severity = seve.ERROR })
local warning = #vim.diagnostic.get(0, { severity = seve.WARN })
local info = #vim.diagnostic.get(0, { severity = seve.INFO })
local hint = #vim.diagnostic.get(0, { severity = seve.HINT })
if error ~= 0 then
table.insert(result, { text = "" .. error, link = "DiagnosticError" })
end
if warning ~= 0 then
table.insert(result, { text = "" .. warning, link = "DiagnosticWarn" })
end
if hint ~= 0 then
table.insert(result, { text = "" .. hint, link = "DiagnosticHint" })
end
if info ~= 0 then
table.insert(result, { text = "" .. info, link = "DiagnosticInfo" })
end
return result
end,
},
}, },
}, offsets = {
{
filetype = 'NvimTree',
text = function()
return vim.fn.getcwd()
end,
highlight = 'Directory',
separator = true,
},
},
custom_areas = {
right = function()
local result = {}
local seve = vim.diagnostic.severity
local error = #vim.diagnostic.get(0, { severity = seve.ERROR })
local warning = #vim.diagnostic.get(0, { severity = seve.WARN })
local info = #vim.diagnostic.get(0, { severity = seve.INFO })
local hint = #vim.diagnostic.get(0, { severity = seve.HINT })
if error ~= 0 then table.insert(result, { text = '' .. error, link = 'DiagnosticError' }) end
if warning ~= 0 then table.insert(result, { text = '' .. warning, link = 'DiagnosticWarn' }) end
if hint ~= 0 then table.insert(result, { text = '' .. hint, link = 'DiagnosticHint' }) end
if info ~= 0 then table.insert(result, { text = '' .. info, link = 'DiagnosticInfo' }) end
return result
end,
},
},
},
} }
+22 -15
View File
@@ -1,17 +1,24 @@
return { return {
"norcalli/nvim-colorizer.lua", 'norcalli/nvim-colorizer.lua',
-- event = { 'BufEnter', 'BufNewFile' },
config = function() ft = {
local colorizer = require "colorizer" 'markdown',
'javascript',
colorizer.setup { 'css',
"css", 'python',
"javascript", 'json',
"python", 'lua',
"json", 'toml',
"lua", 'yaml',
"toml", },
"yaml", opts = {
} 'css',
end, 'javascript',
'markdown',
'python',
'json',
'lua',
'toml',
'yaml',
},
} }
+6 -6
View File
@@ -1,8 +1,8 @@
return { return {
"LudoPinelli/comment-box.nvim", 'LudoPinelli/comment-box.nvim',
lazy = true, event = { 'BufReadPre', 'BufNewFile' },
keys = { keys = {
{ "<leader>Cb", "<cmd>CBllbox19<CR>", desc = "Insert a default comment box" }, { '<leader>Cb', '<cmd>CBllbox19<CR>', desc = 'Insert a default comment box' },
{ "<leader>Cl", "<cmd>CBccline6<CR>", desc = "Insert a default comment line" }, { '<leader>Cl', '<cmd>CBccline6<CR>', desc = 'Insert a default comment line' },
}, },
} }
+24 -24
View File
@@ -1,26 +1,26 @@
return { return {
{ {
"ThePrimeagen/harpoon", 'ThePrimeagen/harpoon',
enabled = false, enabled = false,
}, },
{ {
"tadmccorkle/markdown.nvim", 'tadmccorkle/markdown.nvim',
enabled = false, enabled = false,
}, },
{ {
"OXY2DEV/markview.nvim", 'OXY2DEV/markview.nvim',
enabled = false, enabled = false,
}, },
{ {
"jakewvincent/mkdnflow.nvim", 'jakewvincent/mkdnflow.nvim',
enabled = false, enabled = false,
}, },
{ {
"willothy/moveline.nvim", 'willothy/moveline.nvim',
enabled = false, enabled = false,
}, },
{ {
"MeanderingProgrammer/render-markdown.nvim", 'MeanderingProgrammer/render-markdown.nvim',
enabled = false, enabled = false,
}, },
} }
+35 -4
View File
@@ -1,5 +1,36 @@
return { return {
"stevearc/dressing.nvim", 'stevearc/dressing.nvim',
event = "VeryLazy", dependencies = {
opts = {}, 'nvim-telescope/telescope.nvim',
} },
event = 'VeryLazy',
opts = {
input = {
enabled = true,
-- default_prompt = 'Prompt',
prompt_align = 'left',
insert_only = false,
start_in_insert = true,
border = 'rounded',
relative = 'cursor',
prefer_width = 0.4,
mappings = {
n = {
['<Esc>'] = 'Close',
['q'] = 'Close',
['<CR>'] = 'Confirm',
},
i = {
['<C-c>'] = 'Close',
['<CR>'] = 'Confirm',
['<Up>'] = 'HistoryPrev',
['<Down>'] = 'HistoryNext',
},
},
override = function(conf)
return conf
end,
},
select = {},
},
}
+66 -66
View File
@@ -1,69 +1,69 @@
return { return {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
{ {
"purarue/gitsigns-yadm.nvim", "purarue/gitsigns-yadm.nvim",
opts = { opts = {
shell_timeout_ms = 2000, shell_timeout_ms = 2000,
},
}, },
}, },
event = { "BufReadPre", "BufNewFile" }, },
opts = { event = { "BufReadPre", "BufNewFile" },
_on_attach_pre = function(_, callback) opts = {
if vim.fn.executable "yadm" == 1 then _on_attach_pre = function(_, callback)
require("gitsigns-yadm").yadm_signs(callback) if vim.fn.executable("yadm") == 1 then
else require("gitsigns-yadm").yadm_signs(callback)
callback() else
end callback()
end, end
signs = { end,
add = { text = "+" }, signs = {
change = { text = "" }, add = { text = "+" },
delete = { text = "_" }, change = { text = "" },
topdelete = { text = "" }, delete = { text = "_" },
changedelete = { text = "~" }, topdelete = { text = "" },
untracked = { text = "" }, changedelete = { text = "~" },
}, untracked = { text = "" },
signs_staged = { },
add = { text = "+" }, signs_staged = {
change = { text = "" }, add = { text = "+" },
delete = { text = "_" }, change = { text = "" },
topdelete = { text = "" }, delete = { text = "_" },
changedelete = { text = "~" }, topdelete = { text = "" },
untracked = { text = "" }, changedelete = { text = "~" },
}, untracked = { text = "" },
signs_staged_enable = true, },
signcolumn = true, signs_staged_enable = true,
numhl = true, signcolumn = true,
linehl = false, numhl = true,
word_diff = true, linehl = false,
show_deleted = false, -- turning this off for now as it seems to be slowing down neovim on MBP word_diff = true,
watch_gitdir = { show_deleted = false, -- turning this off for now as it seems to be slowing down neovim on MBP
interval = 1000, watch_gitdir = {
follow_files = true, interval = 1000,
}, follow_files = true,
attach_to_untracked = false, },
current_line_blame = true, attach_to_untracked = false,
current_line_blame_opts = { current_line_blame = true,
use_focus = true, current_line_blame_opts = {
virt_text = true, use_focus = true,
virt_text_pos = "right_align", virt_text = true,
delay = 200, virt_text_pos = "right_align",
ignore_whitespace = false, delay = 200,
}, ignore_whitespace = false,
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>", },
sign_priority = 6, current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>",
update_debounce = 100, sign_priority = 6,
status_formatter = nil, -- Use default update_debounce = 100,
max_file_length = 40000, status_formatter = nil, -- Use default
preview_config = { max_file_length = 40000,
border = "single", preview_config = {
style = "minimal", border = "single",
relative = "cursor", style = "minimal",
row = 0, relative = "cursor",
col = 1, row = 0,
}, col = 1,
}, },
},
} }
+54 -53
View File
@@ -1,59 +1,60 @@
return { return {
"ThePrimeagen/harpoon", 'ThePrimeagen/harpoon',
branch = "harpoon2", branch = 'harpoon2',
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", 'nvim-lua/plenary.nvim',
"nvim-telescope/telescope.nvim", 'nvim-telescope/telescope.nvim',
}, },
event = 'VeryLazy',
config = function() config = function()
local harpoon = require("harpoon") local harpoon = require('harpoon')
local map = vim.keymap local map = vim.keymap
harpoon:setup() harpoon:setup()
local conf = require("telescope.config").values local conf = require('telescope.config').values
local function toggle_telescope(harpoon_files) local function toggle_telescope(harpoon_files)
local file_paths = {} local file_paths = {}
for _, item in ipairs(harpoon_files.items) do for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value) table.insert(file_paths, item.value)
end
require("telescope.pickers")
.new({}, {
prompt_title = "Harpoon",
finder = require("telescope.finders").new_table({
results = file_paths,
}),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
})
:find()
end end
map.set("n", "<leader>a", function() require('telescope.pickers')
harpoon:list():add() .new({}, {
end, { desc = "Harpoon this" }) prompt_title = 'Harpoon',
map.set("n", "<C-e>", function() finder = require('telescope.finders').new_table({
toggle_telescope(harpoon:list()) results = file_paths,
end, { desc = "Harpoon UI" }) }),
map.set("n", "<C-S-!>", function() previewer = conf.file_previewer({}),
harpoon:list():select(1) sorter = conf.generic_sorter({}),
end, { desc = "Mark 1" }) })
map.set("n", "<C-S-2>", function() :find()
harpoon:list():select(2) end
end, { desc = "Mark 2" })
map.set("n", "<C-S-3>", function() map.set('n', '<leader>a', function()
harpoon:list():select(3) harpoon:list():add()
end, { desc = "Mark 3" }) end, { desc = 'Harpoon this' })
map.set("n", "<C-S-4>", function() map.set('n', '<C-e>', function()
harpoon:list():select(4) toggle_telescope(harpoon:list())
end, { desc = "Mark 4" }) end, { desc = 'Harpoon UI' })
map.set("n", "<C-S-{>", function() map.set('n', '<C-S-!>', function()
harpoon:list():prev() harpoon:list():select(1)
end, { desc = "Cycle back" }) end, { desc = 'Mark 1' })
map.set("n", "<C-S-}>", function() map.set('n', '<C-S-2>', function()
harpoon:list():next() harpoon:list():select(2)
end, { desc = "Cycle forward" }) end, { desc = 'Mark 2' })
end, map.set('n', '<C-S-3>', function()
} harpoon:list():select(3)
end, { desc = 'Mark 3' })
map.set('n', '<C-S-4>', function()
harpoon:list():select(4)
end, { desc = 'Mark 4' })
map.set('n', '<C-S-{>', function()
harpoon:list():prev()
end, { desc = 'Cycle back' })
map.set('n', '<C-S-}>', function()
harpoon:list():next()
end, { desc = 'Cycle forward' })
end,
}
+8 -7
View File
@@ -1,9 +1,10 @@
return { return {
"ziontee113/icon-picker.nvim", 'ziontee113/icon-picker.nvim',
dependencies = { dependencies = {
"stevearc/dressing.nvim", 'stevearc/dressing.nvim',
}, },
opts = { event = { 'BufReadPre', 'BufNewFile' },
disable_legacy_commands = true, opts = {
}, disable_legacy_commands = true,
},
} }
+24 -23
View File
@@ -1,25 +1,26 @@
return { return {
"RRethy/vim-illuminate", 'RRethy/vim-illuminate',
event = { "BufReadPre", "BufNewFile" }, event = { 'BufReadPre', 'BufNewFile' },
opts = { opts = {
providers = { providers = {
"lsp", 'lsp',
"treesitter", 'treesitter',
"regex", 'regex',
}, },
delay = 100, delay = 100,
filetypes_denylist = { filetypes_denylist = {
"help", 'NvimTree',
"man", 'help',
"markdown", 'man',
"md", 'markdown',
}, 'md',
under_cursor = true, },
min_count_to_highlight = 1, under_cursor = true,
case_insensitive_regex = false, min_count_to_highlight = 1,
}, case_insensitive_regex = false,
},
config = function(_, opts) config = function(_, opts)
require("illuminate").configure(opts) require('illuminate').configure(opts)
end, end,
} }
+112 -90
View File
@@ -1,109 +1,131 @@
return { return {
"neovim/nvim-lspconfig", 'neovim/nvim-lspconfig',
event = { "BufReadPre", "BufNewFile" }, event = { 'BufReadPost', 'BufNewFile' },
dependencies = { dependencies = {
"hrsh7th/cmp-nvim-lsp", 'williamboman/mason.nvim',
{ "antosha417/nvim-lsp-file-operations", config = true }, 'williamboman/mason-lspconfig.nvim',
{ "folke/neodev.nvim", opts = {} }, 'hrsh7th/cmp-nvim-lsp',
}, { 'antosha417/nvim-lsp-file-operations', config = true },
{ 'folke/neodev.nvim', config = true },
},
config = function() config = function()
local lspconfig = require "lspconfig" local lspconfig = require('lspconfig')
local mason_lspconfig = require "mason-lspconfig" local mason_lspconfig = require('mason-lspconfig')
local cmp_nvim_lsp = require "cmp_nvim_lsp" local cmp_nvim_lsp = require('cmp_nvim_lsp')
local keymap = vim.keymap local keymap = vim.keymap
vim.api.nvim_create_autocmd("LspAttach", { vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup("UserLspConfig", {}), group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev) callback = function(ev)
local opts = { buffer = ev.buf, silent = true } local opts = { buffer = ev.buf, silent = true }
opts.desc = "Show LSP references" opts.desc = 'Show LSP references'
keymap.set("n", "gR", "<cmd>Telescope lsp_references<CR>", opts) keymap.set('n', 'gR', '<cmd>Telescope lsp_references<CR>', opts)
opts.desc = "Go to declaration" opts.desc = 'Go to declaration'
keymap.set("n", "gD", vim.lsp.buf.declaration, opts) keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
opts.desc = "Show LSP definitions" opts.desc = 'Show LSP definitions'
keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts) keymap.set('n', 'gd', '<cmd>Telescope lsp_definitions<CR>', opts)
opts.desc = "Show LSP implementations" opts.desc = 'Show LSP implementations'
keymap.set("n", "gi", "<cmd>Telescope lsp_implementations<CR>", opts) keymap.set('n', 'gi', '<cmd>Telescope lsp_implementations<CR>', opts)
opts.desc = "Show LSP type definitions" opts.desc = 'Show LSP type definitions'
keymap.set("n", "gt", "<cmd>Telescope lsp_type_definitions<CR>", opts) keymap.set('n', 'gt', '<cmd>Telescope lsp_type_definitions<CR>', opts)
opts.desc = "See available code actions" opts.desc = 'See available code actions'
keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts) keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, opts)
opts.desc = "Smart rename" opts.desc = 'Smart rename'
keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts) keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
opts.desc = "Show buffer diagnostics" opts.desc = 'Show buffer diagnostics'
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics bufnf=0<CR>", opts) keymap.set('n', '<leader>D', '<cmd>Telescope diagnostics bufnf=0<CR>', opts)
opts.desc = "Show line diagnostics" opts.desc = 'Show line diagnostics'
keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts) keymap.set('n', '<leader>d', vim.diagnostic.open_float, opts)
opts.desc = "Go to previous diagnostic" opts.desc = 'Go to previous diagnostic'
keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
opts.desc = "Go to next diagnostic" opts.desc = 'Go to next diagnostic'
keymap.set("n", "]d", vim.diagnostic.goto_next, opts) keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
opts.desc = "Show documentation for what is under cursor" opts.desc = 'Show documentation for what is under cursor'
keymap.set("n", "K", vim.lsp.buf.hover, opts) keymap.set('n', 'K', vim.lsp.buf.hover, opts)
opts.desc = "Restart LSP" opts.desc = 'Restart LSP'
keymap.set("n", "<leader>rs", ":LspRestart<CR>", opts) keymap.set('n', '<leader>rs', ':LspRestart<CR>', opts)
end, end,
}) })
local capabilities = cmp_nvim_lsp.default_capabilities() local capabilities = cmp_nvim_lsp.default_capabilities()
local signs = { Error = "", Warn = "", Hint = "󰠠 ", Info = "" } local signs = { Error = '', Warn = '', Hint = '󰠠 ', Info = '' }
for type, icon in pairs(signs) do for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type local hl = 'DiagnosticSign' .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' })
end end
mason_lspconfig.setup_handlers { mason_lspconfig.setup_handlers({
-- default handler for installed servers -- default handler for installed servers
function(server_name) function(server_name)
lspconfig[server_name].setup { lspconfig[server_name].setup({
capabilities = capabilities, capabilities = capabilities,
} })
end, end,
["emmet_ls"] = function() ['emmet_ls'] = function()
-- configure emmet language server -- configure emmet language server
lspconfig["emmet_ls"].setup { lspconfig['emmet_ls'].setup({
capabilities = capabilities, capabilities = capabilities,
filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" }, filetypes = { 'html', 'typescriptreact', 'javascriptreact', 'css', 'sass', 'scss', 'less', 'svelte' },
} })
end, end,
["bashls"] = function() ['bashls'] = function()
lspconfig["bashls"].setup { lspconfig['bashls'].setup({
capabilities = capabilities, capabilities = capabilities,
filetypes = { "sh", "zsh" }, filetypes = { 'sh', 'zsh' },
} })
end, end,
["lua_ls"] = function() ['lua_ls'] = function()
-- configure lua server (with special settings) -- configure lua server (with special settings)
lspconfig["lua_ls"].setup { lspconfig['lua_ls'].setup({
capabilities = capabilities, capabilities = capabilities,
settings = { settings = {
Lua = { Lua = {
-- make the language server recognize "vim" global -- make the language server recognize "vim" global
diagnostics = { diagnostics = {
globals = { "vim" }, globals = { 'vim' },
}, },
completion = { completion = {
callSnippet = "Replace", callSnippet = 'Replace',
}, },
}, },
}, },
} })
end, end,
} })
end,
} vim.diagnostic.config({
virtual_text = {
prefix = '',
},
signs = {
active = signs,
},
update_in_insert = true,
underline = true,
severity_sort = true,
float = {
focusable = false,
style = 'minimal',
border = 'rounded',
source = true,
show_header = true,
prefix = '',
},
})
end,
}
+66 -62
View File
@@ -1,68 +1,72 @@
return { return {
"williamboman/mason.nvim", 'williamboman/mason.nvim',
dependencies = { dependencies = {
"williamboman/mason-lspconfig.nvim", 'williamboman/mason-lspconfig.nvim',
"WhoIsSethDaniel/mason-tool-installer.nvim", 'WhoIsSethDaniel/mason-tool-installer.nvim',
}, },
event = 'VeryLazy',
build = ':MasonUpdate',
config = function() config = function()
local mason = require "mason" local mason = require('mason')
local mason_lspconfig = require "mason-lspconfig" local mason_lspconfig = require('mason-lspconfig')
local mason_tool_installer = require "mason-tool-installer" local mason_tool_installer = require('mason-tool-installer')
mason.setup { mason.setup({
ui = { ui = {
icons = { -- style = 'minimal',
package_installed = "", border = 'rounded',
package_pending = "", icons = {
package_uninstalled = "", package_installed = '',
}, package_pending = '',
}, package_uninstalled = '',
} },
},
})
mason_lspconfig.setup { mason_lspconfig.setup({
ensure_installed = { ensure_installed = {
"ansiblels", 'ansiblels',
"bashls", 'bashls',
"css_variables", 'css_variables',
"cssls", 'cssls',
"cssmodules_ls", 'cssmodules_ls',
"docker_compose_language_service", 'docker_compose_language_service',
"dockerls", 'dockerls',
"emmet_ls", 'emmet_ls',
"eslint", 'eslint',
"html", 'html',
"jinja_lsp", 'jinja_lsp',
"jsonls", 'jsonls',
"lua_ls", 'lua_ls',
"markdown_oxide", 'markdown_oxide',
"marksman", 'marksman',
"pylsp", 'pylsp',
"vimls", 'vimls',
"yamlls", 'yamlls',
}, },
} })
mason_tool_installer.setup { mason_tool_installer.setup({
ensure_installed = { ensure_installed = {
"ansible-lint", 'ansible-lint',
"beautysh", 'beautysh',
"black", 'black',
"eslint_d", 'eslint_d',
"gitlint", 'gitlint',
"htmlhint", 'htmlhint',
"isort", 'isort',
"jinja_lsp", 'jinja_lsp',
"jsonlint", 'jsonlint',
"markdownlint", 'markdownlint',
"prettier", 'prettier',
"pylint", 'pylint',
"shellcheck", 'shellcheck',
"shellharden", 'shellharden',
"stylua", 'stylua',
"trivy", 'trivy',
"yamllint", 'yamllint',
}, },
} })
end, end,
} }
+9
View File
@@ -4,16 +4,25 @@ return {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
"rmehri01/onenord.nvim", "rmehri01/onenord.nvim",
}, },
event = "VeryLazy",
config = function() config = function()
local lualine = require("lualine") local lualine = require("lualine")
local lazy_status = require("lazy.status") local lazy_status = require("lazy.status")
local custom_components = { local custom_components = {
-- ┌
-- │ do not show encoding if UTF-8
-- │ from https://github.com/wookayin/dotfiles/blob/master/nvim/lua/config/statusline.lua
-- └
encoding = function() encoding = function()
local ret, _ = (vim.bo.fenc or vim.go.enc):gsub("^utf%-8$", "") local ret, _ = (vim.bo.fenc or vim.go.enc):gsub("^utf%-8$", "")
return ret return ret
end, end,
-- ┌
-- │ only show non-unix file format
-- │ from https://github.com/wookayin/dotfiles/blob/master/nvim/lua/config/statusline.lua
-- └
fileformat = function() fileformat = function()
local ret, _ = vim.bo.fileformat:gsub("^unix$", "") local ret, _ = vim.bo.fileformat:gsub("^unix$", "")
return ret return ret
+91 -90
View File
@@ -1,97 +1,98 @@
return { return {
"nvim-tree/nvim-tree.lua", 'nvim-tree/nvim-tree.lua',
dependencies = "nvim-tree/nvim-web-devicons", dependencies = 'nvim-tree/nvim-web-devicons',
opts = { event = 'VeryLazy',
respect_buf_cwd = false, opts = {
view = { respect_buf_cwd = false,
width = 35, view = {
relativenumber = true, width = 35,
signcolumn = "yes", relativenumber = true,
signcolumn = 'yes',
},
renderer = {
indent_markers = {
enable = true,
}, },
renderer = { icons = {
indent_markers = { web_devicons = {
file = {
enable = true, enable = true,
}, color = true,
icons = { },
web_devicons = { folder = {
file = { enable = true,
enable = true, color = true,
color = true, },
}, },
folder = { git_placement = 'after',
enable = true, modified_placement = 'after',
color = true, diagnostics_placement = 'signcolumn',
}, padding = ' ',
}, show = {
git_placement = "after", file = true,
modified_placement = "after", folder = true,
diagnostics_placement = "signcolumn", folder_arrow = true,
padding = " ", git = true,
show = { modified = true,
file = true, hidden = false,
folder = true, diagnostics = true,
folder_arrow = true, bookmarks = true,
git = true, },
modified = true, glyphs = {
hidden = false, default = '',
diagnostics = true, modified = '',
bookmarks = true, folder = {
}, default = '',
glyphs = { open = '',
default = "", empty = '',
modified = "", empty_open = '',
folder = { arrow_closed = '', -- arrow when folder is closed
default = "", arrow_open = '', -- arrow when folder is open
open = "", },
empty = "", git = {
empty_open = "", unstaged = '',
arrow_closed = "", -- arrow when folder is closed staged = '',
arrow_open = "", -- arrow when folder is open unmerged = '',
}, renamed = '',
git = { untracked = '',
unstaged = "", deleted = '',
staged = "", ignored = '',
unmerged = "", },
renamed = "", },
untracked = "",
deleted = "",
ignored = "",
},
},
},
}, },
actions = { },
open_file = { actions = {
window_picker = { open_file = {
enable = false, window_picker = {
}, enable = false,
}, },
}, },
filters = { },
enable = true, filters = {
git_ignored = true, enable = true,
dotfiles = false, git_ignored = true,
custom = { ".DS_Store" }, dotfiles = false,
}, custom = { '.DS_Store' },
git = { },
enable = true, git = {
show_on_dirs = true, enable = true,
ignore = false, show_on_dirs = true,
}, ignore = false,
diagnostics = { },
enable = true, diagnostics = {
show_on_open_dirs = true, enable = true,
}, show_on_open_dirs = true,
modified = { },
enable = true, modified = {
show_on_dirs = true, enable = true,
show_on_open_dirs = true, show_on_dirs = true,
}, show_on_open_dirs = true,
}, },
},
config = function(_, opts) config = function(_, opts)
vim.g.loaded_netrwPlugin = 1 vim.g.loaded_netrwPlugin = 1
require("nvim-tree").setup(opts) require('nvim-tree').setup(opts)
end, end,
} }
+23 -22
View File
@@ -1,44 +1,45 @@
return { return {
"nvim-telescope/telescope.nvim", 'nvim-telescope/telescope.nvim',
branch = "0.1.x", branch = '0.1.x',
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", 'nvim-lua/plenary.nvim',
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
"nvim-tree/nvim-web-devicons", 'nvim-tree/nvim-web-devicons',
"folke/todo-comments.nvim", 'folke/todo-comments.nvim',
}, },
event = 'VeryLazy',
config = function() config = function()
local telescope = require("telescope") local telescope = require('telescope')
local actions = require("telescope.actions") local actions = require('telescope.actions')
local transform_mod = require("telescope.actions.mt").transform_mod local transform_mod = require('telescope.actions.mt').transform_mod
local trouble = require("trouble") local trouble = require('trouble')
local trouble_telescope = require("trouble.sources.telescope") local trouble_telescope = require('trouble.sources.telescope')
local custom_actions = transform_mod({ local custom_actions = transform_mod({
open_trouble_qflist = function(prompt_bufnr) open_trouble_qflist = function(prompt_bufnr)
trouble.toggle("quickfix") trouble.toggle('quickfix')
end, end,
}) })
telescope.setup({ telescope.setup({
defaults = { defaults = {
path_display = { "smart" }, path_display = { 'smart' },
mappings = { mappings = {
n = { n = {
["x"] = actions.delete_buffer, ['x'] = actions.delete_buffer,
["q"] = actions.close, ['q'] = actions.close,
}, },
i = { i = {
["<C-k>"] = actions.move_selection_previous, ['<C-k>'] = actions.move_selection_previous,
["<C-j>"] = actions.move_selection_next, ['<C-j>'] = actions.move_selection_next,
["<C-q>"] = actions.send_selected_to_qflist + custom_actions.open_trouble_qflist, ['<C-q>'] = actions.send_selected_to_qflist + custom_actions.open_trouble_qflist,
["<C-t>"] = trouble_telescope.open, ['<C-t>'] = trouble_telescope.open,
["<ESC>"] = actions.close, ['<ESC>'] = actions.close,
}, },
}, },
}, },
}) })
telescope.load_extension("fzf") telescope.load_extension('fzf')
end, end,
} }
+10 -10
View File
@@ -1,11 +1,11 @@
return { return {
"folke/trouble.nvim", 'folke/trouble.nvim',
dependencies = { dependencies = {
"nvim-tree/nvim-web-devicons", 'nvim-tree/nvim-web-devicons',
"folke/todo-comments.nvim", 'folke/todo-comments.nvim',
}, },
opts = { cmd = 'Trouble',
focus = true, opts = {
}, focus = true,
cmd = "Trouble", },
} }
+14 -13
View File
@@ -1,14 +1,15 @@
return { return {
"folke/twilight.nvim", 'folke/twilight.nvim',
opts = { lazy = true,
context = 10, opts = {
treesitter = true, context = 10,
expand = { treesitter = true,
"function", expand = {
"method", 'function',
"table", 'method',
"if_statement", 'table',
}, 'if_statement',
exclude = {}, -- filetypes to excluise },
}, exclude = {}, -- filetypes to excluise
} },
}
+2 -1
View File
@@ -1,3 +1,4 @@
return { return {
"ThePrimeagen/vim-be-good", 'ThePrimeagen/vim-be-good',
cmd = 'VimBeGood',
} }
+2 -1
View File
@@ -1,3 +1,4 @@
return { return {
"szw/vim-maximizer", 'szw/vim-maximizer',
event = { 'BufReadPre', 'BufNewFile' },
} }
+23 -19
View File
@@ -1,21 +1,25 @@
return { return {
"folke/zen-mode.nvim", 'folke/zen-mode.nvim',
opts = { dependencies = {
window = { signcolumn = false }, 'folke/twilight.nvim',
plugins = { },
options = { enabled = true }, cmd = 'ZenMode',
twilight = { enabled = true }, opts = {
gitsigns = { enabled = true }, window = { signcolumn = false },
tmux = { enabled = true }, plugins = {
todo = { enabled = true }, options = { enabled = true },
alacritty = { twilight = { enabled = true },
enabled = true, gitsigns = { enabled = true },
font = "16", tmux = { enabled = true },
}, todo = { enabled = true },
kitty = { alacritty = {
enabled = true, enabled = true,
font = "+4", font = '16',
},
}, },
}, kitty = {
} enabled = true,
font = '+4',
},
},
},
}