Compare commits

...

51 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
8dacb00b4d feat(lsp): add lsp configs for inline hints in js and lua files 2024-12-23 01:04:50 +04:00
6be1e7e268 feat: add some plugins 2024-12-23 01:03:59 +04:00
d8daf61525 ??? 2024-12-23 01:03:41 +04:00
7019e4e902 feat: remove rustaceanvim bind for hover actions 2024-12-23 01:03:36 +04:00
9aee982481 feat(init file): add autostart commands, change sequence of import config and etc. 2024-12-23 01:03:14 +04:00
9fb66c5fd8 feat(ufo): move config from core plugins file to separate plugin config file 2024-12-23 01:01:57 +04:00
ce5ddb9b89 feat(rust): add hints and navic for rustaceanvim 2024-12-23 01:01:10 +04:00
3b1a2e37ca feat(init screen): use dashboard instead alpha-nvim 2024-12-23 01:00:32 +04:00
04fba535ff feat(hover): add plugin 2024-12-23 00:59:51 +04:00
046942c93f feat(dashboard): add config for dashboard plugin 2024-12-23 00:58:15 +04:00
9830c20eb6 feat: remove comments 2024-12-23 00:57:57 +04:00
1edafd6d41 feat: get back noice plugin 2024-12-14 02:55:19 +04:00
fe031e5bf5 ??? 2024-12-14 02:54:50 +04:00
2606c2f6c7 feat: get back noice plugin 2024-12-14 02:54:39 +04:00
1ef25aed50 feat: get back noice config 2024-12-14 02:54:26 +04:00
8f0c29527d feat: reduce dropbar config 2024-12-14 02:53:56 +04:00
bbd28672d5 fix(mapping): remap multi-line and single-line comment 2024-12-14 02:53:37 +04:00
28 changed files with 1101 additions and 739 deletions

View File

@@ -1,33 +1,68 @@
local vanila_vim_autostart_commands = {
"set number",
"set clipboard=unnamedplus",
"set nowrap"
"set nowrap",
"set shiftwidth=4",
"set tabstop=4",
"set ttyfast",
}
for _, cmd in pairs(vanila_vim_autostart_commands) do
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
vim.cmd(cmd)
end
if vim.lsp.inlay_hint then
vim.lsp.inlay_hint.enable(true, { 0 })
end
require("config.lazy")
require("mappings")
require("config.plugins.acmp")
require("config.plugins.autotag")
require("config.plugins.autocomplete")
require("config.plugins.bufferline")
require("config.plugins.buffer")
require("config.plugins.colorizer")
require("config.plugins.comment")
require("config.plugins.dap")
require("config.plugins.dropbar")
require("config.plugins.gitsigns")
require("ibl").setup()
require("config.plugins.ibl")
require("config.plugins.hover_actions")
require("config.plugins.lsp_config")
require("config.plugins.lualine")
require("config.plugins.navic")
require("toggleterm").setup()
require("config.plugins.noice")
require("config.plugins.navic")
require("toggleterm").setup({
direction = "float",
})
require("config.plugins.telescope")
require("config.plugins.treesitter")
require("config.plugins.neotree")
require("config.plugins.nvimufo")
require("config.plugins.prettier")
require("config.plugins.rustaceanvim")
require("huez").setup({})
require("config.plugins.dropbar")
vim.api.nvim_set_hl(0, 'WinBar', { link = 'BufferLineCloseButtonSelected' })
vim.api.nvim_set_hl(0, 'WinBarNC', { link = "BufferLineCloseButtonSelected" })
vim.api.nvim_create_autocmd("BufWritePre", {
buffer = buffer,
callback = function()
vim.lsp.buf.format { async = false }
end
})
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 = {
Text = "",
Method = "󰆧",
Function = "󰊕",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "󰜢",
Unit = "",
Value = "󰎠",
Enum = "",
Keyword = "󰌋",
Snippet = "",
Color = "󰏘",
File = "󰈙",
Reference = "",
Folder = "󰉋",
EnumMember = "",
Constant = "󰏿",
Struct = "",
Event = "",
Operator = "󰆕",
TypeParameter = "󰅲",
Text = "",
Method = "󰆧",
Function = "󰊕",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "󰜢",
Unit = "",
Value = "󰎠",
Enum = "",
Keyword = "󰌋",
Snippet = "",
Color = "󰏘",
File = "󰈙",
Reference = "",
Folder = "󰉋",
EnumMember = "",
Constant = "󰏿",
Struct = "",
Event = "",
Operator = "󰆕",
TypeParameter = "󰅲",
}
cmp.setup{
completion = { completeopt = "menu,menuone" },
cmp.setup {
completion = { completeopt = "menu,menuone" },
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
window = {
completion = {
-- winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
col_offset = -3,
side_padding = 0,
},
},
formatting = {
format = function(entry, vim_item)
-- Kind icons
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
-- Source
vim_item.menu = ({
buffer = "[Buffer]",
nvim_lsp = "[LSP]",
luasnip = "[LuaSnip]",
nvim_lua = "[Lua]",
latex_symbols = "[LaTeX]",
})[entry.source.name]
return vim_item
end
},
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, vim_item)
local strings = vim.split(kind.kind, "%s", { trimempty = true })
kind.kind = " " .. (strings[1] or "") .. " "
kind.menu = " " .. (strings[2] or "")
mapping = {
["<C-p>"] = cmp.mapping.select_prev_item(),
["<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(),
return kind
end
},
["<CR>"] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Insert,
select = true,
},
mapping = {
["<C-p>"] = cmp.mapping.select_prev_item(),
["<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)
if cmp.visible() then
cmp.select_next_item()
elseif require("luasnip").expand_or_jumpable() then
require("luasnip").expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
["<CR>"] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Insert,
select = true,
},
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif require("luasnip").jumpable(-1) then
require("luasnip").jump(-1)
else
fallback()
end
end, { "i", "s" }),
},
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { "i", "s" }),
sources = {
{ name = "nvim_lsp" },
{ name = "buffer" },
{ name = "path" },
},
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
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({
opts = {
enable_close = true,
enable_rename = true,
enable_close_on_slash = false
},
opts = {
enable_close = true,
enable_rename = true,
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,43 +1,10 @@
require("Comment").setup({
---Add a space b/w comment and the line
require('Comment').setup({
padding = true,
---Whether the cursor should stay at its position
sticky = true,
---Lines to be ignored while (un)comment
ignore = nil,
---LHS of toggle mappings in NORMAL mode
toggler = {
---Line-comment toggle keymap
line = '<leader>/',
---Block-comment toggle keymap
block = '<leader>/',
},
---LHS of operator-pending mappings in NORMAL and VISUAL mode
opleader = {
---Line-comment keymap
line = 'gc',
---Block-comment keymap
block = 'gb',
line = '<leader>/',
},
---LHS of extra mappings
extra = {
---Add comment on the line above
above = 'gcO',
---Add comment on the line below
below = 'gco',
---Add comment at the end of line
eol = 'gcA',
},
---Enable keybindings
---NOTE: If given `false` then the plugin won't create any mappings
mappings = {
---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
basic = true,
---Extra mapping; `gco`, `gcO`, `gcA`
extra = true,
},
---Function to call before (un)comment
pre_hook = nil,
---Function to call after (un)comment
post_hook = nil,
})

View File

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

View File

@@ -1,10 +1,4 @@
vim.api.nvim_create_autocmd({ 'BufReadPost', 'BufNewFile', 'BufWritePost' }, {
once = true,
group = vim.api.nvim_create_augroup('DropBarSetup', {}),
callback = function()
if vim.g.loaded_dropbar then
return
end
require('dropbar').setup()
end,
})
require('dropbar').setup()
vim.ui.select = require('dropbar.utils.menu').select
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 {
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '' },
topdelete = { text = '' },
changedelete = { text = '' },
untracked = { text = ' ' },
},
signs_staged = {
add = { text = '' },
change = { text = '' },
delete = { text = '' },
topdelete = { text = '' },
changedelete = { text = '' },
untracked = { text = ' ' },
},
signcolumn = true,
numhl = false,
linehl = false,
word_diff = false,
watch_gitdir = {
interval = 1000,
follow_files = true,
},
attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
},
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>",
sign_priority = 6,
status_formatter = nil, -- Use default
update_debounce = 200,
max_file_length = 40000,
preview_config = {
-- Options passed to nvim_open_win
border = "rounded",
style = "minimal",
relative = "cursor",
row = 0,
vcol = 1,
},
yadm = { enable = false },
signs = {
add = { text = '' },
change = { text = '' },
delete = { text = '' },
topdelete = { text = '' },
changedelete = { text = '' },
untracked = { text = ' ' },
},
signs_staged = {
add = { text = '' },
change = { text = '' },
delete = { text = '' },
topdelete = { text = '' },
changedelete = { text = '' },
untracked = { text = ' ' },
},
signcolumn = true,
numhl = false,
linehl = false,
word_diff = false,
watch_gitdir = {
interval = 1000,
follow_files = true,
},
attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
},
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>",
sign_priority = 6,
status_formatter = nil, -- Use default
update_debounce = 200,
max_file_length = 40000,
preview_config = {
-- Options passed to nvim_open_win
border = "rounded",
style = "minimal",
relative = "cursor",
row = 0,
vcol = 1,
},
}

View File

@@ -0,0 +1,17 @@
require("hover").setup {
init = function()
require("hover.providers.lsp")
require("hover.providers.diagnostic")
require("hover.providers.dap")
require("hover.providers.dictionary")
end,
preview_opts = {
border = 'single'
},
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

@@ -0,0 +1,54 @@
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({
settings = {
Lua = {
hint = {
enable = true,
},
},
}
})
lspconfig.eslint.setup({
settings = {
codeActionOnSave = {
enable = true,
mode = "all",
},
format = true,
}
})
vim.lsp.enable('tailwindcss')
lspconfig.tailwindcss.setup({})
lspconfig.ts_ls.setup({
settings = {
typescript = {
inlayHints = {
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = true,
},
},
javascript = {
inlayHints = {
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayPropertyDeclarationTypeHints = 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({
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
always_show_tabline = true,
globalstatus = true,
refresh = {
statusline = 100,
tabline = 100,
winbar = 100,
}
},
sections = {
lualine_a = {
{
function()
return ""
end,
padding = { left = 0, right = 0 },
color = {},
cond = nil,
},
},
lualine_b = {'branch'},
lualine_c = {'diff'},
lualine_x = {'encoding', 'filetype', 'diagnostics', 'lsp'},
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 = {'diff'},
lualine_x = {'encoding', 'filetype', 'diagnostics', 'lsp'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' },
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
always_show_tabline = true,
globalstatus = true,
refresh = {
statusline = 100,
tabline = 100,
winbar = 100,
}
},
sections = {
lualine_a = {
{
function()
return ""
end,
padding = { left = 0, right = 0 },
color = {},
cond = nil,
},
},
lualine_b = { 'branch' },
lualine_c = {
{
'diff',
colored = true, -- Displays a colored diff status if set to true
symbols = { added = '', modified = '', removed = '' }, -- Changes the symbols used by the diff.
source = nil, -- A function that works as a data source for diff.
}
},
lualine_x = { '%S', 'encoding', 'filetype',
{
'diagnostics',
sources = { 'nvim_diagnostic', 'coc' },
sections = { 'error', 'warn', 'info', 'hint' },
diagnostics_color = {
error = 'DiagnosticError', -- Changes diagnostics' error color.
warn = 'DiagnosticWarn', -- Changes diagnostics' warn color.
info = 'DiagnosticInfo', -- Changes diagnostics' info color.
hint = 'DiagnosticHint', -- Changes diagnostics' hint color.
},
symbols = {
hint = '󰌵 ',
info = '󰬐 ',
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")
navic.setup {
icons = {
File = "󰈙 ",
Module = "",
Namespace = "󰌗 ",
Package = "",
Class = "󰌗 ",
Method = "󰆧 ",
Property = "",
Field = "",
Constructor = "",
Enum = "󰕘",
Interface = "󰕘",
Function = "󰊕 ",
Variable = "󰆧 ",
Constant = "󰏿 ",
String = "󰀬 ",
Number = "󰎠 ",
Boolean = "",
Array = "󰅪 ",
Object = "󰅩 ",
Key = "󰌋 ",
Null = "󰟢 ",
EnumMember = "",
Struct = "󰌗 ",
Event = "",
Operator = "󰆕 ",
TypeParameter = "󰊄 ",
},
lsp = {
auto_attach = true,
preference = nil,
},
highlight = true,
seperator = '',
depth_limit = 0,
depth_limit_indicator = "..",
safe_output = true,
lazy_update_context = false,
click = false,
format_text = function(text)
return text
end,
icons = {
File = "󰈙 ",
Module = "",
Namespace = "󰌗 ",
Package = "",
Class = "󰌗 ",
Method = "󰆧 ",
Property = "",
Field = "",
Constructor = "",
Enum = "󰕘",
Interface = "󰕘",
Function = "󰊕 ",
Variable = "󰆧 ",
Constant = "󰏿 ",
String = "󰀬 ",
Number = "󰎠 ",
Boolean = "",
Array = "󰅪 ",
Object = "󰅩 ",
Key = "󰌋 ",
Null = "󰟢 ",
EnumMember = "",
Struct = "󰌗 ",
Event = "",
Operator = "󰆕 ",
TypeParameter = "󰊄 ",
},
lsp = {
auto_attach = true,
preference = nil,
},
highlight = true,
seperator = '',
depth_limit = 0,
depth_limit_indicator = "..",
safe_output = true,
lazy_update_context = false,
click = false,
format_text = function(text)
return text
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({
close_if_last_window = false,
popup_border_style = "rounded",
enable_git_status = true,
enable_diagnostics = true,
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
sort_case_insensitive = false,
sort_function = nil ,
default_component_configs = {
indent = {
with_expanders = true,
},
icon = {
folder_closed = "󰉋",
folder_open = "󰝰",
folder_empty = "󰉖",
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 = "",
}
},
},
close_if_last_window = false,
enable_git_status = true,
enable_diagnostics = true,
source_selector = {
separator = { left = "", right = "" },
separator_active = false,
show_separator_on_edge = false,
},
popup_border_style = "NC",
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
sort_case_insensitive = false,
sort_function = nil,
window = {
separator_position = "left",
},
default_component_configs = {
diagnostics = {
symbols = {
hint = '󰌵',
info = '󰬐',
warn = '󰀧',
error = '󰅗',
},
highlights = {
hint = "DiagnosticSignHint",
info = "DiagnosticSignInfo",
warn = "DiagnosticSignWarn",
error = "DiagnosticSignError",
},
},
indent = {
with_expanders = true,
},
icon = {
folder_closed = "󰉋",
folder_open = "󰝰",
folder_empty = "󰉖",
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

@@ -0,0 +1,27 @@
require("noice").setup({
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
},
presets = {
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
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,28 +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)
require('ufo').setup({
open_fold_hl_timeout = 400,
close_fold_kinds = { "imports", "comment" },
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,18 +1,38 @@
local navic = require("nvim-navic")
vim.g.rustaceanvim = {
server = {
on_attach = function(client, bufnr)
navic.attach(client, bufnr)
end,
filetypes = {"rust"},
settings = {
-- rust-analyzer language server configuration
['rust-analyzer'] = {
cargo = {
allFeatures = true,
},
},
},
},
server = {
on_attach = function(client, bufnr)
navic.attach(client, bufnr)
end,
settings = {
['rust-analyzer'] = {
numThreads = 6,
cachePriming = {
numThreads = false
},
assist = {
importEnforceGranularity = true,
importPrefix = "create"
},
cargo = {
allFeatures = true,
},
checkOnSave = {
command = "clippy",
allFeatures = true
},
procMacro = {
enable = true,
},
inlayHints = {
parameterHints = false,
lifetimeElisionHints = false,
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' },
sync_install = false,
auto_install = true,
highlight = {
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" })
@@ -25,28 +28,48 @@ map("n", "<F5>", "<cmd>DapToggleBreakpoint<cr>")
map("n", "mk", "<cmd>RustLsp moveItem upcr>")
map("n", "m,", "<cmd>RustLsp moveItem down<cr>")
map("n", "rs", "<cmd>RustLsp run<cr>")
map("n", "hh", "<cmd>RustLsp hover actions<cr>")
map("n", "ca", "<cmd>RustLsp codeAction<cr>")
map("n", "<C-s>", "<cmd>w!<cr>")
map("i", "<C-s>", "<cmd>w!<cr>")
map("n", "<", "<cmd><gv<cr>")
map("n", ">", "<cmd>>gv<cr>")
map("n", "<C-f>", "<C-q>")
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()
require("dapui").open()
require("dapui").open()
end, { desc = "Open DAP ui" })
map("n", "dc", function()
require("dapui").close()
require("dapui").close()
end, { desc = "Start or continue debug" })
map("n", "dt", function()
require("dapui").toggle()
require("dapui").toggle()
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>an", "<cmd>set norelativenumber<cr>")
map("n", "tt", "<cmd>ToggleTerm<cr>")
map("n", "<C-{>", "<cmd>foldopen<cr>")
map("n", "<C-}>", "<cmd>foldclose<cr>")
map("n", "hh", hover.hover)
map("n", "hs", hover.hover_select)
map("n", "vs", "<cmd> vsplit <cr>")
map("n", "ss", "<cmd> split <cr>")

View File

@@ -1,177 +1,142 @@
return {
{
"LunarVim/breadcrumbs.nvim",
},
{
"akinsho/bufferline.nvim",
},
{
"lewis6991/gitsigns.nvim"
},
{
"nvim-lualine/lualine.nvim",
},
{
"akinsho/toggleterm.nvim",
},
{
"windwp/nvim-autopairs",
},
{
'kevinhwang91/promise-async',
},
{
'theHamsta/nvim-dap-virtual-text',
},
{
"hrsh7th/cmp-nvim-lsp",
},
{
"SmiteshP/nvim-navic",
},
{
"kyazdani42/nvim-web-devicons"
},
{
'NvChad/nvim-colorizer.lua',
},
{
'numToStr/Comment.nvim'
},
{
"nvim-treesitter/nvim-treesitter",
},
{
"vague2k/huez.nvim",
},
{
"nvim-telescope/telescope.nvim",
},
{
"neovim/nvim-lspconfig",
dependencies = { "williamboman/mason-lspconfig.nvim", },
},
{
"mfussenegger/nvim-dap",
event = "VeryLazy",
},
{
"L3MON4D3/LuaSnip",
lazy = true,
},
{
'Bekaboo/dropbar.nvim',
-- optional, but required for fuzzy finder support
dependencies = {
'nvim-telescope/telescope-fzf-native.nvim',
build = 'make'
},
config = function()
local dropbar_api = require('dropbar.api')
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' })
end
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
},
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"eslint-lsp",
"js-debug-adapter",
"prettier",
"tinymist",
"typescript-language-server",
}
}
},
{
"rcarriga/nvim-dap-ui",
dependencies = {
"nvim-neotest/nvim-nio",
"mfussenegger/nvim-dap",
},
event = "VeryLazy",
config = function()
require("dapui").setup()
end
},
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
{
"L3MON4D3/LuaSnip",
dependencies = "rafamadriz/friendly-snippets",
opts = { history = true, updateevents = "TextChanged,TextChangedI" },
config = function(_, opts)
require("luasnip").config.set_config(opts)
require "config.plugins.luasnip"
end,
},
{
"saadparwaiz1/cmp_luasnip",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
},
},
{
'kevinhwang91/nvim-ufo',
lazy = true,
config = function(_, opts)
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
opts["fold_virt_text_handler"] = handler
require("ufo").setup(opts)
vim.keymap.set("n", "K", function()
local winid = require("ufo").peekFoldedLinesUnderCursor()
if not winid then
-- vim.lsp.buf.hover()
vim.cmd [[ Lspsaga hover_doc ]]
end
end)
end,
},
{
'simrat39/inlay-hints.nvim',
},
{
'nvim-telescope/telescope-ui-select.nvim'
},
{
"LunarVim/breadcrumbs.nvim",
},
{
"akinsho/bufferline.nvim",
},
{
"onsails/lspkind.nvim"
},
{
"lewis6991/gitsigns.nvim"
},
{
"lewis6991/hover.nvim",
},
{
"nvim-lualine/lualine.nvim",
},
{
"windwp/nvim-autopairs",
},
{
'kevinhwang91/promise-async',
},
{
"SmiteshP/nvim-navic",
},
{
'theHamsta/nvim-dap-virtual-text',
},
{
"hrsh7th/cmp-nvim-lsp",
},
{
"kyazdani42/nvim-web-devicons"
},
{
'NvChad/nvim-colorizer.lua',
},
{
'numToStr/Comment.nvim'
},
{
"nvim-treesitter/nvim-treesitter",
},
{
"vague2k/huez.nvim",
},
{
"nvim-telescope/telescope.nvim",
},
{
"williamboman/mason-lspconfig.nvim",
},
{
"neovim/nvim-lspconfig",
},
{
"mfussenegger/nvim-dap",
event = "VeryLazy",
},
{
"L3MON4D3/LuaSnip",
lazy = true,
},
{
'folke/lazydev.nvim',
ft = "lua",
},
{
"folke/noice.nvim",
event = "VeryLazy",
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
}
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
},
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"eslint-lsp",
"js-debug-adapter",
"prettier",
"tinymist",
"typescript-language-server",
}
}
},
{
"rcarriga/nvim-dap-ui",
dependencies = {
"nvim-neotest/nvim-nio",
"mfussenegger/nvim-dap",
},
event = "VeryLazy",
config = function()
require("dapui").setup()
end
},
{
'Bekaboo/dropbar.nvim',
dependencies = {
'nvim-telescope/telescope-fzf-native.nvim',
build = 'make'
},
config = function()
local dropbar_api = require('dropbar.api')
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' })
end
},
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
{
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
},
},
}

View File

@@ -1,50 +1,63 @@
return {
{
"goolord/alpha-nvim",
config = function ()
require'alpha'.setup(require'alpha.themes.dashboard'.config)
end
},
{
"kaarmu/typst.vim",
lazy = true,
},
{
'MunifTanjim/prettier.nvim',
lazy = true,
},
{
"savq/melange-nvim"
},
{
"mlaursen/vim-react-snippets",
lazy = true,
},
{
"windwp/nvim-ts-autotag",
lazy = true,
},
{
"lukas-reineke/indent-blankline.nvim"
},
{
"mxsdev/nvim-dap-vscode-js",
lazy = true,
},
{
"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 = '^4', -- Recommended
lazy = false, -- This plugin is already lazy
},
{
"catppuccin/nvim",
name = "catppuccin",
priority = 1000
},
{
"nvim-treesitter/playground"
},
{
"kaarmu/typst.vim",
lazy = true,
},
{
'MunifTanjim/prettier.nvim',
lazy = true,
},
{
'MunifTanjim/eslint.nvim',
lazy = true,
},
{
'akinsho/toggleterm.nvim', version = "*", config = true
},
{
"mlaursen/vim-react-snippets",
lazy = true,
},
{
"windwp/nvim-ts-autotag",
lazy = true,
},
{
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
},
{
"sainnhe/gruvbox-material",
},
{
"savq/melange-nvim"
},
{
"mxsdev/nvim-dap-vscode-js",
lazy = true,
},
{
"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
}
}