Compare commits
34
Commits
canary
..
1edafd6d41
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1edafd6d41 | ||
|
|
fe031e5bf5 | ||
|
|
2606c2f6c7 | ||
|
|
1ef25aed50 | ||
|
|
8f0c29527d | ||
|
|
bbd28672d5 | ||
|
|
079ea655e0 | ||
|
|
7b0855cb23 | ||
|
|
5471764258 | ||
|
|
ef9e0a50b9 | ||
|
|
bb64365d25 | ||
|
|
ec99f601a0 | ||
|
|
dfd0917f9a | ||
|
|
f7a98dcb28 | ||
|
|
90bafafb4c | ||
|
|
660dcc4b1e | ||
|
|
cf07a38ecf | ||
|
|
9a2464e2d7 | ||
|
|
5604b29cdc | ||
|
|
41c5b46733 | ||
|
|
aad624221a | ||
|
|
2730bbd210 | ||
|
|
3da16ca21b | ||
|
|
d801a059ef | ||
|
|
260c70c958 | ||
|
|
6a612b80f8 | ||
|
|
330861bd93 | ||
|
|
813f95e06e | ||
|
|
94dc47f8bb | ||
|
|
70f66adb59 | ||
|
|
726248c2f3 | ||
|
|
9d47133ba1 | ||
|
|
aa13916e94 | ||
|
|
45a1b2c9a8 |
No files matched your search
@@ -0,0 +1,3 @@
|
||||
.neoconf.json
|
||||
.stylua.toml
|
||||
lazy-lock.json
|
||||
@@ -1,22 +1,17 @@
|
||||
local vanila_vim_autostart_commands = {
|
||||
"set number",
|
||||
"set clipboard=unnamedplus",
|
||||
"set nowrap",
|
||||
"set shiftwidth=4",
|
||||
"set tabstop=4",
|
||||
"set number",
|
||||
"set clipboard=unnamedplus",
|
||||
"set nowrap"
|
||||
}
|
||||
|
||||
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 })
|
||||
vim.cmd(cmd)
|
||||
end
|
||||
|
||||
require("config.lazy")
|
||||
|
||||
require("mappings")
|
||||
|
||||
require("config.plugins.acmp")
|
||||
require("config.plugins.autotag")
|
||||
require("config.plugins.autocomplete")
|
||||
@@ -25,9 +20,7 @@ require("config.plugins.colorizer")
|
||||
require("config.plugins.comment")
|
||||
require("config.plugins.dap")
|
||||
require("config.plugins.gitsigns")
|
||||
require("config.plugins.ibl")
|
||||
require("config.plugins.hover_actions")
|
||||
require("config.plugins.lsp_config")
|
||||
require("ibl").setup()
|
||||
require("config.plugins.lsp_diagnostic")
|
||||
require("config.plugins.lualine")
|
||||
require("config.plugins.navic")
|
||||
@@ -35,17 +28,8 @@ require("config.plugins.noice")
|
||||
require("toggleterm").setup()
|
||||
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")
|
||||
require("config.plugins.dashboard")
|
||||
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
buffer = buffer,
|
||||
callback = function()
|
||||
vim.lsp.buf.format { async = false }
|
||||
end
|
||||
})
|
||||
|
||||
require("mappings")
|
||||
require("config.plugins.dropbar")
|
||||
@@ -1,89 +1,27 @@
|
||||
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 },
|
||||
},
|
||||
|
||||
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,
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,10 +1,43 @@
|
||||
require('Comment').setup({
|
||||
require("Comment").setup({
|
||||
---Add a space b/w comment and the line
|
||||
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 = '<leader>/',
|
||||
---Block-comment keymap
|
||||
block = '<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,
|
||||
})
|
||||
@@ -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',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
require("hover").setup {
|
||||
init = function()
|
||||
require("hover.providers.lsp")
|
||||
end,
|
||||
preview_opts = {
|
||||
border = 'single'
|
||||
},
|
||||
preview_window = false,
|
||||
title = true,
|
||||
mouse_providers = {
|
||||
'LSP'
|
||||
},
|
||||
mouse_delay = 1000
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
require("ibl").setup({
|
||||
exclude = {
|
||||
filetypes = { "dashboard" },
|
||||
}
|
||||
})
|
||||
@@ -1,50 +0,0 @@
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
lspconfig.lua_ls.setup({
|
||||
settings = {
|
||||
Lua = {
|
||||
hint = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
lspconfig.eslint.setup({
|
||||
settings = {
|
||||
codeActionOnSave = {
|
||||
enable = true,
|
||||
mode = "all",
|
||||
},
|
||||
format = true,
|
||||
}
|
||||
})
|
||||
|
||||
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,
|
||||
includeInlayPropertyDeclarationTypeHints = true,
|
||||
includeInlayFunctionLikeReturnTypeHints = true,
|
||||
includeInlayEnumMemberValueHints = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,28 @@
|
||||
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
|
||||
})
|
||||
@@ -1,37 +1,18 @@
|
||||
local navic = require("nvim-navic")
|
||||
|
||||
vim.g.rustaceanvim = {
|
||||
tools = {
|
||||
autoSetHints = true,
|
||||
inlay_hints = {
|
||||
show_parameter_hints = true,
|
||||
parameter_hints_prefix = "in: ", -- "<- "
|
||||
other_hints_prefix = "out: " -- "=> "
|
||||
}
|
||||
},
|
||||
server = {
|
||||
on_attach = function(client, bufnr)
|
||||
navic.attach(client, bufnr)
|
||||
navic.attach(client, bufnr)
|
||||
end,
|
||||
filetypes = {"rust"},
|
||||
settings = {
|
||||
-- rust-analyzer language server configuration
|
||||
['rust-analyzer'] = {
|
||||
assist = {
|
||||
importEnforceGranularity = true,
|
||||
importPrefix = "create"
|
||||
cargo = {
|
||||
allFeatures = true,
|
||||
},
|
||||
cargo = { allFeatures = true },
|
||||
checkOnSave = {
|
||||
-- default: `cargo check`
|
||||
command = "clippy",
|
||||
allFeatures = true
|
||||
},
|
||||
inlayHints = {
|
||||
lifetimeElisionHints = {
|
||||
enable = true,
|
||||
useParameterNames = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
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
|
||||
+8
-27
@@ -1,6 +1,6 @@
|
||||
local map = vim.keymap.set
|
||||
local bl_utils = require("config.utils.bufferline")
|
||||
local hover = require "hover"
|
||||
|
||||
|
||||
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
|
||||
@@ -27,6 +27,7 @@ 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>")
|
||||
@@ -34,40 +35,20 @@ map("i", "<C-s>", "<cmd>w!<cr>")
|
||||
map("n", "<", "<cmd><gv<cr>")
|
||||
map("n", ">", "<cmd>>gv<cr>")
|
||||
|
||||
map("n", "<leader>c", function(bufnr)
|
||||
bl_utils.buf_kill("bd", bufnr, true)
|
||||
end)
|
||||
|
||||
map("n", "<leader>dr", "<cmd> DapContinue <cr>", { desc = "Continue debug" })
|
||||
map("n", "<leader>dr", "<cmd> DapContinue <cr>", { desc = "Continue debug" } )
|
||||
|
||||
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")
|
||||
map("i", "<A-k>", "<Esc><cmd>m .-2<CR>==gi")
|
||||
|
||||
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>an", "<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>")
|
||||
+182
-150
@@ -1,152 +1,184 @@
|
||||
return {
|
||||
{
|
||||
'simrat39/inlay-hints.nvim',
|
||||
},
|
||||
{
|
||||
"LunarVim/breadcrumbs.nvim",
|
||||
},
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
},
|
||||
{
|
||||
"lewis6991/gitsigns.nvim"
|
||||
},
|
||||
{
|
||||
"lewis6991/hover.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",
|
||||
},
|
||||
{
|
||||
"catppuccin/nvim"
|
||||
},
|
||||
{
|
||||
"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",
|
||||
},
|
||||
{
|
||||
'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
|
||||
},
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"rcarriga/nvim-notify",
|
||||
},
|
||||
},
|
||||
{
|
||||
"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",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"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',
|
||||
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
|
||||
},
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"rcarriga/nvim-notify",
|
||||
},
|
||||
},
|
||||
{
|
||||
"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,
|
||||
},
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
return {
|
||||
{
|
||||
'nvimdev/dashboard-nvim',
|
||||
event = 'VimEnter',
|
||||
dependencies = { { 'nvim-tree/nvim-web-devicons' } }
|
||||
"goolord/alpha-nvim",
|
||||
config = function ()
|
||||
require'alpha'.setup(require'alpha.themes.dashboard'.config)
|
||||
end
|
||||
},
|
||||
{
|
||||
"kaarmu/typst.vim",
|
||||
@@ -44,7 +45,6 @@ return {
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = '^4', -- Recommended
|
||||
lazy = false, -- This plugin is already lazy
|
||||
ft = { "rust" },
|
||||
lazy = false, -- This plugin is already lazy
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user