Compare commits

...

34 Commits

Author SHA1 Message Date
94862a999b feat: update init config 2025-09-16 21:27:12 +04:00
52b133918b feat: remove vscode theme, add catppuccin and treesitter playground plugin 2025-09-16 21:27:05 +04:00
43bf103431 feat(plugins): add breadcrumbs, navic and dropbar 2025-09-16 21:26:37 +04:00
1350be9290 feat(ui): change borders 2025-09-16 21:26:08 +04:00
8843432ef3 feat(rust-analyzer): update rust analyzer config 2025-09-16 21:25:41 +04:00
2cc40aa68f feat(plugins): add dropbar and navic 2025-09-16 21:25:22 +04:00
676c991a43 fix(path): change JS debugger paths 2025-09-16 21:25:02 +04:00
9ad4462e8c feat(ts/js): remove some inline hints 2025-05-09 14:50:30 +04:00
95a766f193 feat(rust): remove lifetime elision hints 2025-05-09 14:50:30 +04:00
0bbed03377 feat(plugins): add vscode and eslint plugins 2025-05-09 14:50:30 +04:00
e8b9bfa907 feat(mapping): add keybinds for shifting lines 2025-05-09 14:49:33 +04:00
0dcbddb8a6 feat(snippets): remove luasnip
feat(snipperts): reklwj

df
2025-05-09 14:49:01 +04:00
7779261104 feat(lint): add eslint configuration 2025-05-09 14:48:20 +04:00
193b296118 feat(statusline): add cmd to lualine
a
2025-05-09 14:48:08 +04:00
9f07874772 add patentheses 2025-04-17 18:41:21 +04:00
9609e2d7eb feat(sings): use new diagnostic configuration + improve UI 2025-04-17 18:40:46 +04:00
3f05e62ac8 feat(plugin): remove nvim-navic
feat(plugin): remove nvim-navic
2025-04-17 18:40:05 +04:00
cd7e91f688 feat(signs): remove deprecated diagnostic signs configuration 2025-04-17 18:39:12 +04:00
813671fcb0 feat(ui): improve ui (cmp) and add gruvbox theme 2025-04-13 22:18:47 +04:00
5a533becb0 feat(ui): add telescope ui select for improve UI 2025-04-13 14:44:47 +04:00
08e8e21300 refactor: clean config
refactor: clean config
2025-04-13 14:44:20 +04:00
5f155a5880 refactor: rename file 2025-04-13 00:21:55 +04:00
ff20726ade feat(dev plugins): update plugins configs for developing 2025-04-13 00:21:43 +04:00
d35acd0125 feat(statusline): update statusline layout 2025-04-13 00:20:34 +04:00
3c5dde045b feat(ui): improve UI 2025-04-13 00:19:42 +04:00
e87eae6dd8 feat(config): remove imports, add autostart commands and etc. 2025-04-13 00:18:48 +04:00
e8dc4c05a0 feat(mapping): remap turn on relative numbering and remap quickfix shortcut 2025-04-13 00:17:36 +04:00
26dd461682 feat(plugins + config): remove useless plugins+colorschemes 2025-04-13 00:16:39 +04:00
7464d8afcd feat(plugins): update plugins list 2025-02-12 22:43:35 +04:00
dee584556c feat(mapping): add some mappings 2025-02-12 22:42:51 +04:00
dc2c6bc548 feat(ibl): add ibl config to separate file 2025-02-12 22:42:35 +04:00
47378601a0 feat(plugins conf): update plugins config 2025-02-12 22:42:15 +04:00
61ec656e98 feat(buff): add bufferline utils module 2025-02-12 22:41:34 +04:00
18ac90101a feat(init conf): remove nvimufo plugin and ibl configuration 2025-02-12 22:40:51 +04:00
28 changed files with 1061 additions and 832 deletions

View File

@@ -4,8 +4,25 @@ local vanila_vim_autostart_commands = {
"set nowrap", "set nowrap",
"set shiftwidth=4", "set shiftwidth=4",
"set tabstop=4", "set tabstop=4",
"set ttyfast",
} }
vim.o.showcmdloc = "statusline"
vim.diagnostic.config({
virtual_text = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '󰅗 ',
[vim.diagnostic.severity.WARN] = '󰀧 ',
[vim.diagnostic.severity.INFO] = '󰬐',
[vim.diagnostic.severity.HINT] = '󰌵',
},
}
})
vim.opt.termguicolors = true
vim.opt.fillchars = { eob = " " }
for _, cmd in pairs(vanila_vim_autostart_commands) do for _, cmd in pairs(vanila_vim_autostart_commands) do
vim.cmd(cmd) vim.cmd(cmd)
end end
@@ -15,34 +32,32 @@ if vim.lsp.inlay_hint then
end end
require("config.lazy") require("config.lazy")
require("config.plugins.nvimufo")
require("config.plugins.acmp")
require("config.plugins.autotag") require("config.plugins.autotag")
require("config.plugins.autocomplete") require("config.plugins.autocomplete")
require("config.plugins.bufferline") require("config.plugins.buffer")
require("config.plugins.colorizer") require("config.plugins.colorizer")
require("config.plugins.comment") require("config.plugins.comment")
require("config.plugins.dap") require("config.plugins.dap")
require("config.plugins.dropbar")
require("config.plugins.gitsigns") require("config.plugins.gitsigns")
require("ibl").setup({ require("config.plugins.ibl")
exclude = {
filetypes = { "dashboard" },
}
})
require("config.plugins.hover_actions") require("config.plugins.hover_actions")
require("config.plugins.lsp_config") require("config.plugins.lsp_config")
require("config.plugins.lsp_diagnostic")
require("config.plugins.lualine") require("config.plugins.lualine")
require("config.plugins.navic")
require("config.plugins.noice") require("config.plugins.noice")
require("toggleterm").setup() require("config.plugins.navic")
require("toggleterm").setup({
direction = "float",
})
require("config.plugins.telescope")
require("config.plugins.treesitter") require("config.plugins.treesitter")
require("config.plugins.neotree") require("config.plugins.neotree")
require("config.plugins.prettier") require("config.plugins.prettier")
require("config.plugins.rustaceanvim") require("config.plugins.rustaceanvim")
require("huez").setup({}) require("huez").setup({})
require("config.plugins.dropbar")
require("config.plugins.dashboard") vim.api.nvim_set_hl(0, 'WinBar', { link = 'BufferLineCloseButtonSelected' })
vim.api.nvim_set_hl(0, 'WinBarNC', { link = "BufferLineCloseButtonSelected" })
vim.api.nvim_create_autocmd("BufWritePre", { vim.api.nvim_create_autocmd("BufWritePre", {
buffer = buffer, buffer = buffer,
@@ -50,5 +65,4 @@ vim.api.nvim_create_autocmd("BufWritePre", {
vim.lsp.buf.format { async = false } vim.lsp.buf.format { async = false }
end end
}) })
require("mappings") require("mappings")

View File

@@ -1,5 +0,0 @@
-- require'cmp'.setup {
-- sources = {
-- { name = 'nvim_lsp' }
-- }
-- }

View File

@@ -1,95 +1,89 @@
local cmp = require "cmp" local cmp = require("cmp")
local kind_icons = { local kind_icons = {
Text = "", Text = "",
Method = "󰆧", Method = "󰆧",
Function = "󰊕", Function = "󰊕",
Constructor = "", Constructor = "",
Field = "", Field = "",
Variable = "", Variable = "",
Class = "", Class = "",
Interface = "", Interface = "",
Module = "", Module = "",
Property = "󰜢", Property = "󰜢",
Unit = "", Unit = "",
Value = "󰎠", Value = "󰎠",
Enum = "", Enum = "",
Keyword = "󰌋", Keyword = "󰌋",
Snippet = "", Snippet = "",
Color = "󰏘", Color = "󰏘",
File = "󰈙", File = "󰈙",
Reference = "", Reference = "",
Folder = "󰉋", Folder = "󰉋",
EnumMember = "", EnumMember = "",
Constant = "󰏿", Constant = "󰏿",
Struct = "", Struct = "",
Event = "", Event = "",
Operator = "󰆕", Operator = "󰆕",
TypeParameter = "󰅲", TypeParameter = "󰅲",
} }
cmp.setup{ cmp.setup {
completion = { completeopt = "menu,menuone" }, completion = { completeopt = "menu,menuone" },
snippet = { window = {
expand = function(args) completion = {
require("luasnip").lsp_expand(args.body) -- winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
end, col_offset = -3,
}, side_padding = 0,
},
},
formatting = { formatting = {
format = function(entry, vim_item) fields = { "kind", "abbr", "menu" },
-- Kind icons format = function(entry, vim_item)
vim_item.kind = string.format('\t%s %s\t', kind_icons[vim_item.kind], vim_item.kind) -- This concatenates the icons with the name of the item kind local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, vim_item)
-- Source local strings = vim.split(kind.kind, "%s", { trimempty = true })
vim_item.menu = ({ kind.kind = " " .. (strings[1] or "") .. " "
buffer = "[Buffer]", kind.menu = " " .. (strings[2] or "")
nvim_lsp = "[LSP]",
luasnip = "[LuaSnip]",
nvim_lua = "[Lua]",
latex_symbols = "[LaTeX]",
})[entry.source.name]
return vim_item
end
},
mapping = { return kind
["<C-p>"] = cmp.mapping.select_prev_item(), end
["<C-n>"] = cmp.mapping.select_next_item(), },
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping.confirm { mapping = {
behavior = cmp.ConfirmBehavior.Insert, ["<C-p>"] = cmp.mapping.select_prev_item(),
select = true, ["<C-n>"] = cmp.mapping.select_next_item(),
}, ["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<Tab>"] = cmp.mapping(function(fallback) ["<CR>"] = cmp.mapping.confirm {
if cmp.visible() then behavior = cmp.ConfirmBehavior.Insert,
cmp.select_next_item() select = true,
elseif require("luasnip").expand_or_jumpable() then },
require("luasnip").expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback) ["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_prev_item() cmp.select_next_item()
elseif require("luasnip").jumpable(-1) then else
require("luasnip").jump(-1) fallback()
else end
fallback() end, { "i", "s" }),
end
end, { "i", "s" }),
},
sources = { ["<S-Tab>"] = cmp.mapping(function(fallback)
{ name = "nvim_lsp" }, if cmp.visible() then
{ name = "buffer" }, cmp.select_prev_item()
{ name = "path" }, else
}, fallback()
end
end, { "i", "s" }),
},
sources = {
{ name = "nvim_lsp" },
{ name = "buffer" },
{ name = "path" },
},
} }

View File

@@ -1,7 +1,7 @@
require('nvim-ts-autotag').setup({ require('nvim-ts-autotag').setup({
opts = { opts = {
enable_close = true, enable_close = true,
enable_rename = true, enable_rename = true,
enable_close_on_slash = false enable_close_on_slash = true,
}, },
}) })

View File

@@ -0,0 +1,89 @@
vim.opt.termguicolors = true
local utils = require("config.utils.bufferline")
require("bufferline").setup({
highlights = {
background = {
italic = false,
},
buffer_selected = {
bold = true,
},
},
options = {
themable = true,
get_element_icon = nil,
show_duplicate_prefix = true,
duplicates_across_groups = true,
auto_toggle_bufferline = true,
move_wraps_at_ends = false,
groups = { items = {}, options = { toggle_hidden_on_enter = true } },
mode = "buffers",
numbers = "none",
close_command = function(bufnr)
utils.buf_kill("bd", bufnr, false)
end,
right_mouse_command = "vert sbuffer %d",
left_mouse_command = "buffer %d",
middle_mouse_command = nil,
name_formatter = function(buf)
if buf.name:match "%.md" then
return vim.fn.fnamemodify(buf.name, ":t:r")
end
end,
max_name_length = 18,
max_prefix_length = 15,
truncate_names = true,
tab_size = 18,
diagnostics = "nvim_lsp",
diagnostics_update_in_insert = false,
custom_filter = utils.custom_filter,
offsets = {
{
filetype = "undotree",
text = "Undotree",
highlight = "PanelHeading",
padding = 1,
},
{
filetype = "NvimTree",
text = "Explorer",
highlight = "PanelHeading",
padding = 1,
},
{
filetype = "DiffviewFiles",
text = "Diff View",
highlight = "PanelHeading",
padding = 1,
},
{
filetype = "flutterToolsOutline",
text = "Flutter Outline",
highlight = "PanelHeading",
},
{
filetype = "lazy",
text = "Lazy",
highlight = "PanelHeading",
padding = 1,
},
},
color_icons = true,
show_close_icon = false,
show_tab_indicators = true,
persist_buffer_sort = true,
separator_style = "thin",
enforce_regular_tabs = false,
always_show_bufferline = false,
hover = {
enabled = false,
delay = 200,
reveal = { "close" },
},
sort_by = "id",
debug = { logging = false },
},
})

View File

@@ -1,27 +0,0 @@
vim.opt.termguicolors = true
require("bufferline").setup({
highlights = {
background = {
italic = false,
},
buffer_selected = {
bold = true,
},
},
options = {
mode = "buffers",
persist_buffer_sort = true,
enforce_regular_tabs = false,
always_show_bufferline = false,
offsets = {
{
filetype = "NeoTree",
text = "File Explorer",
highlight = "Directory",
separator = true,
}
}
}
})

View File

@@ -1,88 +1,88 @@
local dap = require('dap') local dap = require('dap')
require("dap-vscode-js").setup({ require("dap-vscode-js").setup({
debugger_path = "/.local/share/lunarvim/site/pack/lazy/opt/vscode-js-debug", debugger_path = "/.local/share/nvim/site/pack/lazy/opt/vscode-js-debug",
debugger_cmd = { "js-debug-adapter" }, debugger_cmd = { "js-debug-adapter" },
adapters = { 'node-terminal' }, adapters = { 'node-terminal' },
}) })
dap.configurations.cpp = { dap.configurations.cpp = {
{ {
name = "Launch file", name = "Launch file",
type = "codelldb", type = "codelldb",
request = "launch", request = "launch",
program = function() program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end, end,
cwd = '${workspaceFolder}', cwd = '${workspaceFolder}',
stopOnEntry = false, stopOnEntry = false,
}, },
} }
dap.configurations.c = dap.configurations.cpp dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp dap.configurations.rust = dap.configurations.cpp
dap.adapters["pwa-node"] = { dap.adapters["pwa-node"] = {
type = "server", type = "server",
host = "localhost", host = "localhost",
port = "${port}", port = "${port}",
executable = { executable = {
command = "node", command = "node",
args = {os.getenv("HOME") .. "/.local/share/lvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}"}, args = { os.getenv("HOME") .. "/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}" },
} }
} }
dap.configurations.javascript = { dap.configurations.javascript = {
{ {
type = "pwa-node", type = "pwa-node",
request = "launch", request = "launch",
name = "Launch file", name = "Launch file",
program = "${file}", program = "${file}",
cwd = "${workspaceFolder}", cwd = "${workspaceFolder}",
}, },
} }
dap.adapters.chrome = { dap.adapters.chrome = {
type = "executable", type = "executable",
command = "node", command = "node",
args = {os.getenv("HOME") .. "/.local/share/lvim/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js"}, args = { os.getenv("HOME") .. "/.local/share/nvim/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js" },
} }
dap.adapters.firefox = { dap.adapters.firefox = {
type = 'executable', type = 'executable',
command = 'node', command = 'node',
args = {os.getenv('HOME') .. '/.local/share/lvim/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js'}, args = { os.getenv('HOME') .. '/.local/share/nvim/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js' },
} }
dap.configurations.typescriptreact = { dap.configurations.typescriptreact = {
{ {
name = 'Next.js: debug server-side', name = 'Next.js: debug server-side',
type = "pwa-node", type = "pwa-node",
request = "launch", request = "launch",
runtimeExecutable = "npm", runtimeExecutable = "npm",
runtimeArgs = { "run", "dev" }, runtimeArgs = { "run", "dev" },
cwd = "${workspaceFolder}", cwd = "${workspaceFolder}",
}, },
{ {
name = "Next.js: debug client-side with chrome", name = "Next.js: debug client-side with chrome",
type = "chrome", type = "chrome",
request = "launch", request = "launch",
url = "http://localhost:3000" url = "http://localhost:3000"
}, },
{ {
name = "Next.js: debug client-side with firefox", name = "Next.js: debug client-side with firefox",
type = "firefox", type = "firefox",
request = "launch", request = "launch",
url = 'http://localhost:3000', url = 'http://localhost:3000',
webRoot = '${workspaceFolder}', webRoot = '${workspaceFolder}',
firefoxExecutable = '/usr/bin/waterfox', firefoxExecutable = '/usr/bin/firefox',
pathMappings = { pathMappings = {
{ {
url = "webpack://_n_e/", url = "webpack://_n_e/",
path = "${workspaceFolder}/" path = "${workspaceFolder}/"
} }
}, },
}, },
} }
dap.configurations.javascriptreact = dap.configurations.typescriptreact; dap.configurations.javascriptreact = dap.configurations.typescriptreact;
@@ -92,8 +92,7 @@ require("dapui").setup()
local dap, dapui = require("dap"), require("dapui") local dap, dapui = require("dap"), require("dapui")
dap.listeners.after.event_initialized["dapui_config"] = function() dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open({}) dapui.open({})
end end
vim.keymap.set('n', '<leader>ui', require 'dapui'.toggle) vim.keymap.set('n', '<leader>ui', require 'dapui'.toggle)

View File

@@ -1,31 +0,0 @@
require('dashboard').setup {
theme = 'hyper',
config = {
week_header = {
enable = true,
},
shortcut = {
{ desc = '󰊳 Update', group = '@property', action = 'Lazy update', key = 'u' },
{
icon = '',
icon_hl = '@variable',
desc = 'Files',
group = 'Label',
action = 'Telescope find_files',
key = 'f',
},
{
desc = ' Apps',
group = 'DiagnosticHint',
action = 'Telescope app',
key = 'a',
},
{
desc = ' dotfiles',
group = 'Number',
action = 'Telescope dotfiles',
key = 'd',
},
},
},
}

View File

@@ -1,4 +1,4 @@
require('dropbar').setup() require('dropbar').setup()
vim.ui.select = require('dropbar.utils.menu').select vim.ui.select = require('dropbar.utils.menu').select
vim.api.nvim_set_hl(0, 'DropBarMenuHoverEntry', { link = 'PmenuExtraSel' }) vim.api.nvim_set_hl(0, 'DropBarMenuHoverEntry', { link = 'PmenuExtraSel' })
vim.api.nvim_set_hl(0, 'WinBarNC', { link = 'Tag' })

View File

@@ -0,0 +1,19 @@
eslint.setup({
bin = 'eslint', -- or `eslint_d`
code_actions = {
enable = true,
apply_on_save = {
enable = true,
types = { "directive", "problem", "suggestion", "layout" },
},
disable_rule_comment = {
enable = true,
location = "separate_line", -- or `same_line`
},
},
diagnostics = {
enable = true,
report_unused_disable_directives = false,
run_on = "type", -- or `save`
},
})

View File

@@ -1,48 +1,47 @@
require('gitsigns').setup { require('gitsigns').setup {
signs = { signs = {
add = { text = '' }, add = { text = '' },
change = { text = '' }, change = { text = '' },
delete = { text = '' }, delete = { text = '' },
topdelete = { text = '' }, topdelete = { text = '' },
changedelete = { text = '' }, changedelete = { text = '' },
untracked = { text = ' ' }, untracked = { text = ' ' },
}, },
signs_staged = { signs_staged = {
add = { text = '' }, add = { text = '' },
change = { text = '' }, change = { text = '' },
delete = { text = '' }, delete = { text = '' },
topdelete = { text = '' }, topdelete = { text = '' },
changedelete = { text = '' }, changedelete = { text = '' },
untracked = { text = ' ' }, untracked = { text = ' ' },
}, },
signcolumn = true, signcolumn = true,
numhl = false, numhl = false,
linehl = false, linehl = false,
word_diff = false, word_diff = false,
watch_gitdir = { watch_gitdir = {
interval = 1000, interval = 1000,
follow_files = true, follow_files = true,
}, },
attach_to_untracked = true, attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = { current_line_blame_opts = {
virt_text = true, virt_text = true,
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
delay = 1000, delay = 1000,
ignore_whitespace = false, ignore_whitespace = false,
}, },
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>", current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>",
sign_priority = 6, sign_priority = 6,
status_formatter = nil, -- Use default status_formatter = nil, -- Use default
update_debounce = 200, update_debounce = 200,
max_file_length = 40000, max_file_length = 40000,
preview_config = { preview_config = {
-- Options passed to nvim_open_win -- Options passed to nvim_open_win
border = "rounded", border = "rounded",
style = "minimal", style = "minimal",
relative = "cursor", relative = "cursor",
row = 0, row = 0,
vcol = 1, vcol = 1,
}, },
yadm = { enable = false },
} }

View File

@@ -1,23 +1,17 @@
require("hover").setup { require("hover").setup {
init = function() init = function()
-- Require providers require("hover.providers.lsp")
require("hover.providers.lsp") require("hover.providers.diagnostic")
-- require('hover.providers.gh') require("hover.providers.dap")
-- require('hover.providers.gh_user') require("hover.providers.dictionary")
-- require('hover.providers.jira') end,
-- require('hover.providers.dap') preview_opts = {
-- require('hover.providers.fold_preview') border = 'single'
require('hover.providers.diagnostic') },
-- require('hover.providers.man') preview_window = false,
-- require('hover.providers.dictionary') title = true,
end, mouse_providers = {
preview_opts = { 'LSP'
border = 'single' },
}, mouse_delay = 1000
preview_window = false,
title = true,
mouse_providers = {
'LSP'
},
mouse_delay = 1000
} }

View File

@@ -0,0 +1,5 @@
require("ibl").setup({
exclude = {
filetypes = { "dashboard" },
}
})

View File

@@ -1,50 +1,54 @@
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = true
}
)
lspconfig.clangd.setup({})
lspconfig.lua_ls.setup({ lspconfig.lua_ls.setup({
settings = { settings = {
Lua = { Lua = {
hint = { hint = {
enable = true, enable = true,
}, },
}, },
} }
}) })
lspconfig.eslint.setup({ lspconfig.eslint.setup({
settings = { settings = {
codeActionOnSave = { codeActionOnSave = {
enable = true, enable = true,
mode = "all", mode = "all",
}, },
format = true, format = true,
} }
}) })
vim.lsp.enable('tailwindcss')
lspconfig.tailwindcss.setup({})
lspconfig.ts_ls.setup({ lspconfig.ts_ls.setup({
settings = { settings = {
typescript = { typescript = {
inlayHints = { inlayHints = {
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all' includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
includeInlayParameterNameHintsWhenArgumentMatchesName = false, includeInlayFunctionParameterTypeHints = true,
includeInlayFunctionParameterTypeHints = true, includeInlayVariableTypeHints = true,
includeInlayVariableTypeHints = true, includeInlayPropertyDeclarationTypeHints = true,
includeInlayVariableTypeHintsWhenTypeMatchesName = false, },
includeInlayPropertyDeclarationTypeHints = true, },
includeInlayFunctionLikeReturnTypeHints = true, javascript = {
includeInlayEnumMemberValueHints = true, inlayHints = {
}, includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
}, includeInlayFunctionParameterTypeHints = true,
javascript = { includeInlayVariableTypeHints = true,
inlayHints = { includeInlayPropertyDeclarationTypeHints = true,
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all' },
includeInlayParameterNameHintsWhenArgumentMatchesName = false, },
includeInlayVariableTypeHints = true, }
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
}
}) })

View File

@@ -1,5 +0,0 @@
local signs = { Error = "", Warn = "", Hint = "󱩎 ", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end

View File

@@ -1,59 +1,92 @@
local _colors = { "DiffAdd", "DiffChange", "RedrawDebugRecompose" }
require("lualine").setup({ require("lualine").setup({
options = { options = {
icons_enabled = true, icons_enabled = true,
theme = 'auto', theme = 'auto',
component_separators = { left = '', right = ''}, component_separators = { left = '', right = '' },
section_separators = { left = '', right = ''}, section_separators = { left = '', right = '' },
disabled_filetypes = { disabled_filetypes = {
statusline = {}, statusline = {},
winbar = {}, winbar = {},
}, },
ignore_focus = {}, ignore_focus = {},
always_divide_middle = true, always_divide_middle = true,
always_show_tabline = true, always_show_tabline = true,
globalstatus = true, globalstatus = true,
refresh = { refresh = {
statusline = 100, statusline = 100,
tabline = 100, tabline = 100,
winbar = 100, winbar = 100,
} }
}, },
sections = { sections = {
lualine_a = { lualine_a = {
{ {
function() function()
return "" return ""
end, end,
padding = { left = 0, right = 0 }, padding = { left = 0, right = 0 },
color = {}, color = {},
cond = nil, cond = nil,
}, },
}, },
lualine_b = {'branch'}, lualine_b = { 'branch' },
lualine_c = {'diff'}, lualine_c = {
lualine_x = {'encoding', 'filetype', 'diagnostics', 'lsp'}, {
lualine_y = {'progress'}, 'diff',
lualine_z = {'location'} colored = true, -- Displays a colored diff status if set to true
}, symbols = { added = '', modified = '', removed = '' }, -- Changes the symbols used by the diff.
inactive_sections = { source = nil, -- A function that works as a data source for diff.
lualine_a = { }
{ },
function() lualine_x = { '%S', 'encoding', 'filetype',
return "" {
end, 'diagnostics',
padding = { left = 0, right = 0 },
color = {}, sources = { 'nvim_diagnostic', 'coc' },
cond = nil,
}, sections = { 'error', 'warn', 'info', 'hint' },
},
lualine_b = {'branch'}, diagnostics_color = {
lualine_c = {'diff'}, error = 'DiagnosticError', -- Changes diagnostics' error color.
lualine_x = {'encoding', 'filetype', 'diagnostics', 'lsp'}, warn = 'DiagnosticWarn', -- Changes diagnostics' warn color.
lualine_y = {'progress'}, info = 'DiagnosticInfo', -- Changes diagnostics' info color.
lualine_z = {'location'} hint = 'DiagnosticHint', -- Changes diagnostics' hint color.
}, },
tabline = {}, symbols = {
winbar = {}, hint = '󰌵 ',
inactive_winbar = {}, info = '󰬐 ',
extensions = {} warn = '󰀧 ',
error = '󰅗 ',
},
colored = true, -- Displays diagnostics status in color if set to true.
update_in_insert = false, -- Update diagnostics in insert mode.
always_visible = false, -- Show diagnostics even if there are none.
}
},
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
inactive_sections = {
lualine_a = {
{
function()
return ""
end,
padding = { left = 0, right = 0 },
color = {},
cond = nil,
},
},
lualine_b = { 'branch' },
lualine_c = {},
lualine_x = { 'encoding', 'filetype', 'diagnostics', 'lsp' },
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}) })

View File

@@ -1,22 +0,0 @@
-- vscode format
require("luasnip.loaders.from_vscode").lazy_load { exclude = vim.g.vscode_snippets_exclude or {} }
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" }
-- snipmate format
require("luasnip.loaders.from_snipmate").load()
require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" }
-- lua format
require("luasnip.loaders.from_lua").load()
require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" }
vim.api.nvim_create_autocmd("InsertLeave", {
callback = function()
if
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
and not require("luasnip").session.jump_active
then
require("luasnip").unlink_current()
end
end,
})

View File

@@ -1,47 +1,46 @@
local navic = require("nvim-navic") local navic = require("nvim-navic")
navic.setup { navic.setup {
icons = { icons = {
File = "󰈙 ", File = "󰈙 ",
Module = "", Module = "",
Namespace = "󰌗 ", Namespace = "󰌗 ",
Package = "", Package = "",
Class = "󰌗 ", Class = "󰌗 ",
Method = "󰆧 ", Method = "󰆧 ",
Property = "", Property = "",
Field = "", Field = "",
Constructor = "", Constructor = "",
Enum = "󰕘", Enum = "󰕘",
Interface = "󰕘", Interface = "󰕘",
Function = "󰊕 ", Function = "󰊕 ",
Variable = "󰆧 ", Variable = "󰆧 ",
Constant = "󰏿 ", Constant = "󰏿 ",
String = "󰀬 ", String = "󰀬 ",
Number = "󰎠 ", Number = "󰎠 ",
Boolean = "", Boolean = "",
Array = "󰅪 ", Array = "󰅪 ",
Object = "󰅩 ", Object = "󰅩 ",
Key = "󰌋 ", Key = "󰌋 ",
Null = "󰟢 ", Null = "󰟢 ",
EnumMember = "", EnumMember = "",
Struct = "󰌗 ", Struct = "󰌗 ",
Event = "", Event = "",
Operator = "󰆕 ", Operator = "󰆕 ",
TypeParameter = "󰊄 ", TypeParameter = "󰊄 ",
}, },
lsp = { lsp = {
auto_attach = true, auto_attach = true,
preference = nil, preference = nil,
}, },
highlight = true, highlight = true,
seperator = '', seperator = '',
depth_limit = 0, depth_limit = 0,
depth_limit_indicator = "..", depth_limit_indicator = "..",
safe_output = true, safe_output = true,
lazy_update_context = false, lazy_update_context = false,
click = false, click = false,
format_text = function(text) format_text = function(text)
return text return text
end, end,
} }

View File

@@ -1,52 +1,65 @@
vim.fn.sign_define("LspDiagnosticsSignError",
{text = "󰅙 ", texthl = "LspDiagnosticsSignError"})
vim.fn.sign_define("LspDiagnosticsSignWarning",
{text = "󱇎 ", texthl = "LspDiagnosticsSignWarning"})
vim.fn.sign_define("LspDiagnosticsSignInformation",
{text = "󰰄 ", texthl = "LspDiagnosticsSignInformation"})
vim.fn.sign_define("LspDiagnosticsSignHint",
{text = "󰐗 ", texthl = "LspDiagnosticsSignHint"})
require("neo-tree").setup({ require("neo-tree").setup({
close_if_last_window = false, close_if_last_window = false,
popup_border_style = "rounded", enable_git_status = true,
enable_git_status = true, enable_diagnostics = true,
enable_diagnostics = true, source_selector = {
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, separator = { left = "", right = "" },
sort_case_insensitive = false, separator_active = false,
sort_function = nil , show_separator_on_edge = false,
default_component_configs = { },
indent = { popup_border_style = "NC",
with_expanders = true, open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
}, sort_case_insensitive = false,
icon = { sort_function = nil,
folder_closed = "󰉋", window = {
folder_open = "󰝰", separator_position = "left",
folder_empty = "󰉖", },
default = "*", default_component_configs = {
highlight = "NeoTreeFileIcon" diagnostics = {
}, symbols = {
modified = { hint = '󰌵',
symbol = "󰧞", info = '󰬐',
highlight = "NeoTreeModified", warn = '󰀧',
}, error = '󰅗',
name = { },
trailing_slash = false, highlights = {
use_git_status_colors = true, hint = "DiagnosticSignHint",
highlight = "NeoTreeFileName", info = "DiagnosticSignInfo",
}, warn = "DiagnosticSignWarn",
git_status = { error = "DiagnosticSignError",
symbols = { },
added = "󰜄", },
modified = "󰑕", indent = {
deleted = "󰅗", with_expanders = true,
renamed = "󰛂", },
untracked = "󰞋", icon = {
ignored = "󰿠", folder_closed = "󰉋",
unstaged = "󰄱", folder_open = "󰝰",
staged = "󰄵", folder_empty = "󰉖",
conflict = "", default = "*",
} highlight = "NeoTreeFileIcon"
}, },
}, modified = {
symbol = "󰧞",
highlight = "NeoTreeModified",
},
name = {
trailing_slash = false,
use_git_status_colors = true,
highlight = "NeoTreeFileName",
},
git_status = {
symbols = {
added = "󰜄",
modified = "󰑕",
deleted = "󰅗",
renamed = "󰛂",
untracked = "󰞋",
ignored = "󰿠",
unstaged = "󰄱",
staged = "󰄵",
conflict = "",
}
},
},
}) })

View File

@@ -1,15 +1,27 @@
require("noice").setup({ require("noice").setup({
lsp = { lsp = {
override = { override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true, ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true, ["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
}, },
}, },
presets = { presets = {
command_palette = true, -- position the cmdline and popupmenu together command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help lsp_doc_border = false, -- add a border to hover docs and signature help
}, },
views = {
cmdline_popup = {
border = {
style = "none",
padding = { 1, 2 },
},
filter_options = {},
win_options = {
winhighlight = "NormalFloat:NormalFloat,FloatBorder:FloatBorder",
},
},
},
}) })

View File

@@ -1,61 +0,0 @@
vim.o.foldcolumn = "auto:9"
vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
vim.o.foldenable = true
vim.o.fillchars = [[eob: ,fold: ,foldopen:󰅀,foldsep:│,foldclose:󰅂]]
vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
local handler = function(virtText, lnum, endLnum, width, truncate)
local newVirtText = {}
local totalLines = vim.api.nvim_buf_line_count(0)
local foldedLines = endLnum - lnum
local suffix = ("  %d %d%%"):format(foldedLines, foldedLines / totalLines * 100)
local sufWidth = vim.fn.strdisplaywidth(suffix)
local targetWidth = width - sufWidth
local curWidth = 0
for _, chunk in ipairs(virtText) do
local chunkText = chunk[1]
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
if targetWidth > curWidth + chunkWidth then
table.insert(newVirtText, chunk)
else
chunkText = truncate(chunkText, targetWidth - curWidth)
local hlGroup = chunk[2]
table.insert(newVirtText, { chunkText, hlGroup })
chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- str width returned from truncate() may less than 2nd argument, need padding
if curWidth + chunkWidth < targetWidth then
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
end
break
end
curWidth = curWidth + chunkWidth
end
local rAlignAppndx =
math.max(math.min(vim.opt.textwidth["_value"], width - 1) - curWidth - sufWidth, 0)
suffix = (" "):rep(rAlignAppndx) .. suffix
table.insert(newVirtText, { suffix, "MoreMsg" })
return newVirtText
end
require('ufo').setup({
fold_virt_text_handler = handler,
open_fold_hl_timeout = 400,
preview = {
win_config = {
border = { "", "", "", "", "", "", "", "" },
winblend = 0,
},
mappings = {
scrollU = "<C-u>",
scrollD = "<C-d>",
jumpTop = "[",
jumpBot = "]",
},
},
provider_selector = function(bufnr, filetype, buftype)
return { 'treesitter', 'indent' }
end
})

View File

@@ -1,37 +1,38 @@
local navic = require("nvim-navic") local navic = require("nvim-navic")
vim.g.rustaceanvim = { vim.g.rustaceanvim = {
tools = { server = {
autoSetHints = true, on_attach = function(client, bufnr)
inlay_hints = { navic.attach(client, bufnr)
show_parameter_hints = true, end,
parameter_hints_prefix = "in: ", -- "<- " settings = {
other_hints_prefix = "out: " -- "=> " ['rust-analyzer'] = {
} numThreads = 6,
}, cachePriming = {
server = { numThreads = false
on_attach = function(client, bufnr) },
navic.attach(client, bufnr) assist = {
end, importEnforceGranularity = true,
settings = { importPrefix = "create"
['rust-analyzer'] = { },
assist = { cargo = {
importEnforceGranularity = true, allFeatures = true,
importPrefix = "create" },
}, checkOnSave = {
cargo = { allFeatures = true }, command = "clippy",
checkOnSave = { allFeatures = true
-- default: `cargo check` },
command = "clippy", procMacro = {
allFeatures = true enable = true,
}, },
inlayHints = { inlayHints = {
lifetimeElisionHints = { parameterHints = false,
enable = true, lifetimeElisionHints = false,
useParameterNames = true chainingHints = false,
} bindingModeHints = false,
} renderColons = false,
} }
} }
} }
}
} }

View File

@@ -0,0 +1,86 @@
require("telescope").load_extension("ui-select")
require("telescope").setup({
defaults = {
borderchars = { " ", " ", " ", " ", " ", " ", " ", " " }
},
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown {
-- even more opts
}
-- pseudo code / specification for writing custom displays, like the one
-- for "codeactions"
-- specific_opts = {
-- [kind] = {
-- make_indexed = function(items) -> indexed_items, width,
-- make_displayer = function(widths) -> displayer
-- make_display = function(displayer) -> function(e)
-- make_ordinal = function(e) -> string
-- },
-- -- for example to disable the custom builtin "codeactions" display
-- do the following
-- codeactions = false,
-- }
}
}
})
local blend = 50
vim.api.nvim_create_autocmd("FileType", {
pattern = "TelescopePrompt",
callback = function(ctx)
local backdropName = "TelescopeBackdrop"
local telescopeBufnr = ctx.buf
-- `Telescope` does not set a zindex, so it uses the default value
-- of `nvim_open_win`, which is 50: https://neovim.io/doc/user/api.html#nvim_open_win()
local telescopeZindex = 50
local backdropBufnr = vim.api.nvim_create_buf(false, true)
local winnr = vim.api.nvim_open_win(backdropBufnr, false, {
relative = "editor",
border = "none",
row = 0,
col = 0,
width = vim.o.columns,
height = vim.o.lines,
focusable = false,
style = "minimal",
zindex = telescopeZindex - 1, -- ensure it's below the reference window
})
vim.api.nvim_set_hl(0, backdropName, { bg = "#000000", default = true })
vim.wo[winnr].winhighlight = "Normal:" .. backdropName
vim.wo[winnr].winblend = blend
vim.bo[backdropBufnr].buftype = "nofile"
-- close backdrop when the reference buffer is closed
vim.api.nvim_create_autocmd({ "WinClosed", "BufLeave" }, {
once = true,
buffer = telescopeBufnr,
callback = function()
if vim.api.nvim_win_is_valid(winnr) then vim.api.nvim_win_close(winnr, true) end
if vim.api.nvim_buf_is_valid(backdropBufnr) then
vim.api.nvim_buf_delete(backdropBufnr, { force = true })
end
end,
})
end,
})
vim.api.nvim_create_autocmd({ "ColorScheme", "VimEnter" }, {
group = vim.api.nvim_create_augroup('Color', {}),
pattern = "*",
callback = function()
vim.api.nvim_set_hl(0, "TelescopePreviewTitle", { link = "MiniStatuslineModeVisual" })
vim.api.nvim_set_hl(0, "TelescopePromptTitle", { link = "MiniStatuslineModeCommand" })
vim.api.nvim_set_hl(0, "TelescopeResultsTitle", { link = "MiniStatuslineModeReplace" })
vim.api.nvim_set_hl(0, "TelescopePromptNormal", { link = "StatusLine" })
vim.api.nvim_set_hl(0, "TelescopePromptBorder", { link = "StatusLine" })
vim.api.nvim_set_hl(0, "TelescopePreviewNormal", { link = "BufferLineHint" })
vim.api.nvim_set_hl(0, "TelescopePreviewBorder", { link = "BufferLineHint" })
end
})

View File

@@ -1,8 +1,11 @@
require'nvim-treesitter.configs'.setup { require 'nvim-treesitter.configs'.setup {
ensure_installed = { 'rust', 'c', 'lua', 'tsx', 'javascript', 'typescript' }, ensure_installed = { 'rust', 'c', 'lua', 'tsx', 'javascript', 'typescript' },
sync_install = false, sync_install = false,
auto_install = true, auto_install = true,
highlight = { highlight = {
enable = true, enable = true,
},
autotag = {
enable = true,
} }
} }

View File

@@ -0,0 +1,95 @@
local Utils = {}
function Utils.is_ft(b, ft)
return vim.bo[b].filetype == ft
end
function Utils.custom_filter(buf, buf_nums)
local logs = vim.tbl_filter(function(b)
return Utils.is_ft(b, "log")
end, buf_nums or {})
if vim.tbl_isempty(logs) then
return true
end
local tab_num = vim.fn.tabpagenr()
local last_tab = vim.fn.tabpagenr "$"
local is_log = Utils.is_ft(buf, "log")
if last_tab == 1 then
return true
end
-- only show log buffers in secondary tabs
return (tab_num == last_tab and is_log) or (tab_num ~= last_tab and not is_log)
end
function Utils.buf_kill(kill_command, bufnr, force)
local bo = vim.bo
local api = vim.api
local fmt = string.format
local fn = vim.fn
if bufnr == 0 or bufnr == nil then
bufnr = api.nvim_get_current_buf()
end
local bufname = api.nvim_buf_get_name(bufnr)
if not force then
local choice
if bo[bufnr].modified then
choice = fn.confirm(fmt([[Save changes to "%s"?]], bufname), "&Yes\n&No\n&Cancel")
if choice == 1 then
vim.api.nvim_buf_call(bufnr, function()
vim.cmd("w")
end)
elseif choice == 2 then
force = true
else
return
end
elseif api.nvim_get_option_value("buftype", { buf = 0 }) == "terminal" then
choice = fn.confirm(fmt([[Close "%s"?]], bufname), "&Yes\n&No\n&Cancel")
if choice == 1 then
force = true
else
return
end
end
end
-- Get list of windows IDs with the buffer to close
local windows = vim.tbl_filter(function(win)
return api.nvim_win_get_buf(win) == bufnr
end, api.nvim_list_wins())
if force then
kill_command = kill_command .. "!"
end
-- Get list of active buffers
local buffers = vim.tbl_filter(function(buf)
return api.nvim_buf_is_valid(buf) and bo[buf].buflisted
end, api.nvim_list_bufs())
-- If there is only one buffer (which has to be the current one), vim will
-- create a new buffer on :bd.
-- For more than one buffer, pick the previous buffer (wrapping around if necessary)
if #buffers > 1 and #windows > 0 then
for i, v in ipairs(buffers) do
if v == bufnr then
local prev_buf_idx = i == 1 and #buffers or (i - 1)
local prev_buffer = buffers[prev_buf_idx]
for _, win in ipairs(windows) do
api.nvim_win_set_buf(win, prev_buffer)
end
end
end
end
-- Check if buffer still exists, to ensure the target buffer wasn't killed
-- due to options like bufhidden=wipe.
if api.nvim_buf_is_valid(bufnr) and bo[bufnr].buflisted then
vim.cmd(string.format("%s %d", kill_command, bufnr))
end
end
return Utils

View File

@@ -1,4 +1,7 @@
local map = vim.keymap.set local map = vim.keymap.set;
local bl_utils = require("config.utils.bufferline")
local hover = require "hover"
map("n", ";", ":", { desc = "CMD enter command mode" }) map("n", ";", ":", { desc = "CMD enter command mode" })
@@ -29,29 +32,44 @@ map("n", "ca", "<cmd>RustLsp codeAction<cr>")
map("n", "<C-s>", "<cmd>w!<cr>") map("n", "<C-s>", "<cmd>w!<cr>")
map("i", "<C-s>", "<cmd>w!<cr>") map("i", "<C-s>", "<cmd>w!<cr>")
map("n", "<", "<cmd><gv<cr>") map("n", "<C-f>", "<C-q>")
map("n", ">", "<cmd>>gv<cr>") map("i", "<C-f>", "<C-q>")
map("n", "<leader>dr", "<cmd> DapContinue <cr>", { desc = "Continue debug" } ) map("n", "<leader>c", function(bufnr)
bl_utils.buf_kill("bd", bufnr, true)
end)
map("n", "do", function() map("n", "do", function()
require("dapui").open() require("dapui").open()
end, { desc = "Open DAP ui" }) end, { desc = "Open DAP ui" })
map("n", "dc", function() map("n", "dc", function()
require("dapui").close() require("dapui").close()
end, { desc = "Start or continue debug" }) end, { desc = "Start or continue debug" })
map("n", "dt", function() map("n", "dt", function()
require("dapui").toggle() require("dapui").toggle()
end, { desc = "Toggle DAP ui" }) end, { desc = "Toggle DAP ui" })
map("n", "<A-j>", "<cmd>m .+1<CR>==")
map("n", "<A-k>", "<cmd>m .-2<CR>==")
map("i", "<A-j>", "<Esc><cmd>m .+1<CR>==gi<cr>")
map("i", "<A-k>", "<Esc><cmd>m .-2<CR>==gi<cr>")
map("v", "<Tab>", ">gv")
map("v", "<S-Tab>", "<gv")
map("n", "<C-Up>", "<cmd>resize -2<CR>")
map("n", "<C-Down>", "<cmd>resize +2<CR>")
map("n", "<C-Right>", "<cmd>vertical resize -2<CR>")
map("n", "<C-Left>", "<cmd>vertical resize +2<CR>")
map("n", "<leader>nn", "<cmd>set norelativenumber<cr>")
map("n", "<leader>rn", "<cmd>set relativenumber<cr>") map("n", "<leader>rn", "<cmd>set relativenumber<cr>")
map("n", "<leader>an", "<cmd>set norelativenumber<cr>")
map("n", "tt", "<cmd>ToggleTerm<cr>") map("n", "tt", "<cmd>ToggleTerm<cr>")
map("n", "<C-{>", "<cmd>foldopen<cr>") map("n", "<C-{>", "<cmd>foldopen<cr>")
map("n", "<C-}>", "<cmd>foldclose<cr>") map("n", "<C-}>", "<cmd>foldclose<cr>")
map("n", "hh", require("hover").hover, {desc = "hover.nvim"}) map("n", "hh", hover.hover)
map("n", "hs", require("hover").hover_select, {desc = "hover.nvim (select)"}) map("n", "hs", hover.hover_select)
map("n", "<C-Tab>", function() require("hover").hover_switch("previous") end, {desc = "hover.nvim (previous source)"})
map("n", "<C-S-Tab>", function() require("hover").hover_switch("next") end, {desc = "hover.nvim (next source)"})
map("n", "vs", "<cmd> vsplit <cr>")
map("n", "ss", "<cmd> split <cr>")

View File

@@ -1,152 +1,142 @@
return { return {
{ {
'simrat39/inlay-hints.nvim', 'simrat39/inlay-hints.nvim',
}, },
{ {
"LunarVim/breadcrumbs.nvim", 'nvim-telescope/telescope-ui-select.nvim'
}, },
{ {
"akinsho/bufferline.nvim", "LunarVim/breadcrumbs.nvim",
}, },
{ {
"lewis6991/gitsigns.nvim" "akinsho/bufferline.nvim",
}, },
{ {
"lewis6991/hover.nvim", "onsails/lspkind.nvim"
}, },
{ {
"nvim-lualine/lualine.nvim", "lewis6991/gitsigns.nvim"
}, },
{ {
"akinsho/toggleterm.nvim", "lewis6991/hover.nvim",
}, },
{ {
"windwp/nvim-autopairs", "nvim-lualine/lualine.nvim",
}, },
{ {
'kevinhwang91/promise-async', "windwp/nvim-autopairs",
}, },
{ {
'theHamsta/nvim-dap-virtual-text', 'kevinhwang91/promise-async',
}, },
{ {
"hrsh7th/cmp-nvim-lsp", "SmiteshP/nvim-navic",
}, },
{ {
"SmiteshP/nvim-navic", 'theHamsta/nvim-dap-virtual-text',
}, },
{ {
"kyazdani42/nvim-web-devicons" "hrsh7th/cmp-nvim-lsp",
}, },
{ {
'NvChad/nvim-colorizer.lua', "kyazdani42/nvim-web-devicons"
}, },
{ {
'numToStr/Comment.nvim' 'NvChad/nvim-colorizer.lua',
}, },
{ {
"nvim-treesitter/nvim-treesitter", 'numToStr/Comment.nvim'
}, },
{ {
"vague2k/huez.nvim", "nvim-treesitter/nvim-treesitter",
}, },
{ {
"nvim-telescope/telescope.nvim", "vague2k/huez.nvim",
}, },
{ {
"williamboman/mason-lspconfig.nvim", "nvim-telescope/telescope.nvim",
}, },
{ {
"neovim/nvim-lspconfig", "williamboman/mason-lspconfig.nvim",
}, },
{ {
"mfussenegger/nvim-dap", "neovim/nvim-lspconfig",
event = "VeryLazy", },
}, {
{ "mfussenegger/nvim-dap",
"L3MON4D3/LuaSnip", event = "VeryLazy",
lazy = true, },
}, {
{ "L3MON4D3/LuaSnip",
'folke/lazydev.nvim', lazy = true,
ft = "lua", },
}, {
{ 'folke/lazydev.nvim',
'Bekaboo/dropbar.nvim', ft = "lua",
dependencies = { },
'nvim-telescope/telescope-fzf-native.nvim', {
build = 'make' "folke/noice.nvim",
}, event = "VeryLazy",
config = function() dependencies = {
local dropbar_api = require('dropbar.api') -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
vim.keymap.set('n', '<Leader>;', dropbar_api.pick, { desc = 'Pick symbols in winbar' }) "MunifTanjim/nui.nvim",
vim.keymap.set('n', '[;', dropbar_api.goto_context_start, { desc = 'Go to start of current context' }) }
vim.keymap.set('n', '];', dropbar_api.select_next_context, { desc = 'Select next context' }) },
end {
}, "nvim-neo-tree/neo-tree.nvim",
{ branch = "v2.x",
"folke/noice.nvim", dependencies = {
event = "VeryLazy", "nvim-lua/plenary.nvim",
dependencies = { "nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
"rcarriga/nvim-notify", },
}, },
}, {
{ "williamboman/mason.nvim",
"nvim-neo-tree/neo-tree.nvim", opts = {
branch = "v2.x", ensure_installed = {
dependencies = { "eslint-lsp",
"nvim-lua/plenary.nvim", "js-debug-adapter",
"nvim-tree/nvim-web-devicons", "prettier",
"MunifTanjim/nui.nvim", "tinymist",
}, "typescript-language-server",
}, }
{ }
"williamboman/mason.nvim", },
opts = { {
ensure_installed = { "rcarriga/nvim-dap-ui",
"eslint-lsp", dependencies = {
"js-debug-adapter", "nvim-neotest/nvim-nio",
"prettier", "mfussenegger/nvim-dap",
"tinymist", },
"typescript-language-server", event = "VeryLazy",
} config = function()
} require("dapui").setup()
}, end
{ },
"rcarriga/nvim-dap-ui", {
dependencies = { 'Bekaboo/dropbar.nvim',
"nvim-neotest/nvim-nio", dependencies = {
"mfussenegger/nvim-dap", 'nvim-telescope/telescope-fzf-native.nvim',
}, build = 'make'
event = "VeryLazy", },
config = function() config = function()
require("dapui").setup() local dropbar_api = require('dropbar.api')
end vim.keymap.set('n', '<Leader>;', dropbar_api.pick, { desc = 'Pick symbols in winbar' })
}, vim.keymap.set('n', '[;', dropbar_api.goto_context_start, { desc = 'Go to start of current context' })
{ vim.keymap.set('n', '];', dropbar_api.select_next_context, { desc = 'Select next context' })
"hrsh7th/nvim-cmp", end
event = "InsertEnter", },
dependencies = { {
{ "hrsh7th/nvim-cmp",
"L3MON4D3/LuaSnip", event = "InsertEnter",
dependencies = "rafamadriz/friendly-snippets", dependencies = {
opts = { history = true, updateevents = "TextChanged,TextChangedI" }, {
config = function(_, opts) "hrsh7th/cmp-nvim-lua",
require("luasnip").config.set_config(opts) "hrsh7th/cmp-nvim-lsp",
require "config.plugins.luasnip" "hrsh7th/cmp-buffer",
end, "hrsh7th/cmp-path",
}, },
{ },
"saadparwaiz1/cmp_luasnip", },
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
},
},
{
'kevinhwang91/nvim-ufo',
},
} }

View File

@@ -1,50 +1,63 @@
return { return {
{ {
'nvimdev/dashboard-nvim', "catppuccin/nvim",
event = 'VimEnter', name = "catppuccin",
dependencies = { { 'nvim-tree/nvim-web-devicons' } } priority = 1000
}, },
{ {
"kaarmu/typst.vim", "nvim-treesitter/playground"
lazy = true, },
}, {
{ "kaarmu/typst.vim",
'MunifTanjim/prettier.nvim', lazy = true,
lazy = true, },
}, {
{ 'MunifTanjim/prettier.nvim',
"savq/melange-nvim" lazy = true,
}, },
{ {
"mlaursen/vim-react-snippets", 'MunifTanjim/eslint.nvim',
lazy = true, lazy = true,
}, },
{ {
"windwp/nvim-ts-autotag", 'akinsho/toggleterm.nvim', version = "*", config = true
lazy = true, },
}, {
{ "mlaursen/vim-react-snippets",
"lukas-reineke/indent-blankline.nvim" lazy = true,
}, },
{ {
"mxsdev/nvim-dap-vscode-js", "windwp/nvim-ts-autotag",
lazy = true, lazy = true,
}, },
{ {
"windwp/nvim-autopairs", "lukas-reineke/indent-blankline.nvim",
lazy = true, main = "ibl",
event = "InsertEnter", },
config = true {
}, "sainnhe/gruvbox-material",
{ },
"microsoft/vscode-js-debug", {
lazy = true, "savq/melange-nvim"
build = "npm install --legacy-peer-deps && npx gulp vsDebugServerBundle && mv dist out" },
}, {
{ "mxsdev/nvim-dap-vscode-js",
"mrcjkb/rustaceanvim", lazy = true,
version = '^4', -- Recommended },
lazy = false, -- This plugin is already lazy {
ft = { "rust" }, "windwp/nvim-autopairs",
}, lazy = true,
event = "InsertEnter",
config = true
},
{
"microsoft/vscode-js-debug",
lazy = true,
build = "npm install --legacy-peer-deps && npx gulp vsDebugServerBundle && mv dist out"
},
{
'mrcjkb/rustaceanvim',
version = '^6', -- Recommended
lazy = false, -- This plugin is already lazy
}
} }