Compare commits

...

18 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
15 changed files with 240 additions and 177 deletions

View File

@@ -5,9 +5,21 @@ local vanila_vim_autostart_commands = {
"set shiftwidth=4",
"set tabstop=4",
"set ttyfast",
"set clipboard=unnamedplus"
}
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 = " " }
@@ -18,6 +30,7 @@ end
if vim.lsp.inlay_hint then
vim.lsp.inlay_hint.enable(true, { 0 })
end
require("config.lazy")
require("config.plugins.autotag")
require("config.plugins.autocomplete")
@@ -25,15 +38,17 @@ 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("config.plugins.ibl")
require("config.plugins.hover_actions")
require("config.plugins.lsp_config")
require("config.plugins.lsp_diagnostic")
require("config.plugins.lualine")
require("config.plugins.navic")
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.neotree")
@@ -41,6 +56,9 @@ require("config.plugins.prettier")
require("config.plugins.rustaceanvim")
require("huez").setup({})
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()

View File

@@ -1,4 +1,4 @@
local cmp = require "cmp"
local cmp = require("cmp")
local kind_icons = {
Text = "",
@@ -31,11 +31,6 @@ local kind_icons = {
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",
@@ -72,8 +67,6 @@ cmp.setup {
["<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
@@ -82,8 +75,6 @@ cmp.setup {
["<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
@@ -92,7 +83,6 @@ cmp.setup {
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
},

View File

@@ -1,7 +1,7 @@
local dap = require('dap')
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" },
adapters = { 'node-terminal' },
})
@@ -28,7 +28,7 @@ dap.adapters["pwa-node"] = {
port = "${port}",
executable = {
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}" },
}
}
@@ -45,13 +45,13 @@ dap.configurations.javascript = {
dap.adapters.chrome = {
type = "executable",
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 = {
type = 'executable',
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 = {
@@ -75,7 +75,7 @@ dap.configurations.typescriptreact = {
request = "launch",
url = 'http://localhost:3000',
webRoot = '${workspaceFolder}',
firefoxExecutable = '/usr/bin/waterfox',
firefoxExecutable = '/usr/bin/firefox',
pathMappings = {
{
url = "webpack://_n_e/",
@@ -91,7 +91,6 @@ require("dapui").setup()
local dap, dapui = require("dap"), require("dapui")
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open({})
end

View File

@@ -0,0 +1,4 @@
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,5 +1,11 @@
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({
@@ -22,30 +28,26 @@ lspconfig.eslint.setup({
}
})
vim.lsp.enable('tailwindcss')
lspconfig.tailwindcss.setup({})
lspconfig.ts_ls.setup({
settings = {
typescript = {
inlayHints = {
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHints = true,
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayEnumMemberValueHints = true,
},
},
javascript = {
inlayHints = {
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayVariableTypeHints = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
includeInlayVariableTypeHints = true,
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,7 +1,5 @@
local _colors = { "DiffAdd", "DiffChange", "RedrawDebugRecompose" }
require("lualine").setup({
options = {
icons_enabled = true,
@@ -42,7 +40,31 @@ require("lualine").setup({
source = nil, -- A function that works as a data source for diff.
}
},
lualine_x = { 'encoding', 'filetype', 'diagnostics', 'lsp' },
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' }
},

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

@@ -44,4 +44,3 @@ navic.setup {
return text
end,
}

View File

@@ -1,21 +1,34 @@
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,
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,
},

View File

@@ -7,8 +7,9 @@ vim.g.rustaceanvim = {
end,
settings = {
['rust-analyzer'] = {
procMacro = {
enable = true,
numThreads = 6,
cachePriming = {
numThreads = false
},
assist = {
importEnforceGranularity = true,
@@ -21,11 +22,15 @@ vim.g.rustaceanvim = {
command = "clippy",
allFeatures = true
},
inlayHints = {
lifetimeElisionHints = {
procMacro = {
enable = true,
useParameterNames = true
}
},
inlayHints = {
parameterHints = false,
lifetimeElisionHints = false,
chainingHints = false,
bindingModeHints = false,
renderColons = false,
}
}
}

View File

@@ -34,8 +34,6 @@ map("i", "<C-s>", "<cmd>w!<cr>")
map("n", "<C-f>", "<C-q>")
map("i", "<C-f>", "<C-q>")
map("n", "<", "<cmd><gv<cr>")
map("n", ">", "<cmd>>gv<cr>")
map("n", "<leader>c", function(bufnr)
bl_utils.buf_kill("bd", bufnr, true)
@@ -53,8 +51,11 @@ 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")
map("i", "<A-k>", "<Esc><cmd>m .-2<CR>==gi")
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>")

View File

@@ -5,6 +5,9 @@ return {
{
'nvim-telescope/telescope-ui-select.nvim'
},
{
"LunarVim/breadcrumbs.nvim",
},
{
"akinsho/bufferline.nvim",
},
@@ -26,15 +29,15 @@ return {
{
'kevinhwang91/promise-async',
},
{
"SmiteshP/nvim-navic",
},
{
'theHamsta/nvim-dap-virtual-text',
},
{
"hrsh7th/cmp-nvim-lsp",
},
{
"SmiteshP/nvim-navic",
},
{
"kyazdani42/nvim-web-devicons"
},
@@ -111,21 +114,24 @@ return {
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 = {
{
"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",

View File

@@ -1,4 +1,12 @@
return {
{
"catppuccin/nvim",
name = "catppuccin",
priority = 1000
},
{
"nvim-treesitter/playground"
},
{
"kaarmu/typst.vim",
lazy = true,
@@ -7,6 +15,10 @@ return {
'MunifTanjim/prettier.nvim',
lazy = true,
},
{
'MunifTanjim/eslint.nvim',
lazy = true,
},
{
'akinsho/toggleterm.nvim', version = "*", config = true
},
@@ -45,7 +57,7 @@ return {
},
{
'mrcjkb/rustaceanvim',
version = '^5', -- Recommended
version = '^6', -- Recommended
lazy = false, -- This plugin is already lazy
}
}