Compare commits
7 Commits
7464d8afcd
...
5f155a5880
Author | SHA1 | Date | |
---|---|---|---|
|
5f155a5880 | ||
|
ff20726ade | ||
|
d35acd0125 | ||
|
3c5dde045b | ||
|
e87eae6dd8 | ||
|
e8dc4c05a0 | ||
|
26dd461682 |
10
init.lua
10
init.lua
|
@ -4,6 +4,8 @@ local vanila_vim_autostart_commands = {
|
||||||
"set nowrap",
|
"set nowrap",
|
||||||
"set shiftwidth=4",
|
"set shiftwidth=4",
|
||||||
"set tabstop=4",
|
"set tabstop=4",
|
||||||
|
"set ttyfast",
|
||||||
|
"set clipboard=unnamedplus"
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.opt.fillchars = { eob = " " }
|
vim.opt.fillchars = { eob = " " }
|
||||||
|
@ -17,10 +19,9 @@ if vim.lsp.inlay_hint then
|
||||||
end
|
end
|
||||||
|
|
||||||
require("config.lazy")
|
require("config.lazy")
|
||||||
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")
|
||||||
|
@ -33,13 +34,13 @@ require("config.plugins.lualine")
|
||||||
require("config.plugins.navic")
|
require("config.plugins.navic")
|
||||||
require("config.plugins.noice")
|
require("config.plugins.noice")
|
||||||
require("toggleterm").setup()
|
require("toggleterm").setup()
|
||||||
|
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_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
buffer = buffer,
|
buffer = buffer,
|
||||||
|
@ -47,5 +48,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")
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
-- require'cmp'.setup {
|
|
||||||
-- sources = {
|
|
||||||
-- { name = 'nvim_lsp' }
|
|
||||||
-- }
|
|
||||||
-- }
|
|
|
@ -89,6 +89,7 @@ cmp.setup{
|
||||||
|
|
||||||
sources = {
|
sources = {
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "luasnip" },
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
},
|
},
|
||||||
|
|
|
@ -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,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -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/lunarvim/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/lvim/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/lvim/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/lvim/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/waterfox',
|
||||||
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;
|
||||||
|
@ -91,9 +91,9 @@ 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)
|
||||||
|
|
||||||
|
|
|
@ -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,4 +0,0 @@
|
||||||
require('dropbar').setup()
|
|
||||||
vim.ui.select = require('dropbar.utils.menu').select
|
|
||||||
vim.api.nvim_set_hl(0, 'DropBarMenuHoverEntry', { link = 'PmenuExtraSel' })
|
|
||||||
|
|
|
@ -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 },
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
require("hover").setup {
|
require("hover").setup {
|
||||||
init = function()
|
init = function()
|
||||||
require("hover.providers.lsp")
|
require("hover.providers.lsp")
|
||||||
require('hover.providers.diagnostic')
|
require("hover.providers.diagnostic")
|
||||||
|
require("hover.providers.dap")
|
||||||
|
require("hover.providers.dictionary")
|
||||||
end,
|
end,
|
||||||
preview_opts = {
|
preview_opts = {
|
||||||
border = 'single'
|
border = 'single'
|
||||||
|
|
|
@ -1,50 +1,52 @@
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
|
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,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
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,
|
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
includeInlayVariableTypeHints = true,
|
includeInlayVariableTypeHints = true,
|
||||||
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
includeInlayEnumMemberValueHints = true,
|
includeInlayEnumMemberValueHints = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
javascript = {
|
javascript = {
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
||||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
||||||
includeInlayVariableTypeHints = true,
|
includeInlayVariableTypeHints = true,
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
includeInlayEnumMemberValueHints = true,
|
includeInlayEnumMemberValueHints = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,59 +1,70 @@
|
||||||
|
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 = { 'encoding', 'filetype', 'diagnostics', 'lsp' },
|
||||||
return " "
|
lualine_y = { 'progress' },
|
||||||
end,
|
lualine_z = { 'location' }
|
||||||
padding = { left = 0, right = 0 },
|
},
|
||||||
color = {},
|
inactive_sections = {
|
||||||
cond = nil,
|
lualine_a = {
|
||||||
},
|
{
|
||||||
},
|
function()
|
||||||
lualine_b = {'branch'},
|
return " "
|
||||||
lualine_c = {'diff'},
|
end,
|
||||||
lualine_x = {'encoding', 'filetype', 'diagnostics', 'lsp'},
|
padding = { left = 0, right = 0 },
|
||||||
lualine_y = {'progress'},
|
color = {},
|
||||||
lualine_z = {'location'}
|
cond = nil,
|
||||||
},
|
},
|
||||||
tabline = {},
|
},
|
||||||
winbar = {},
|
lualine_b = { 'branch' },
|
||||||
inactive_winbar = {},
|
lualine_c = {},
|
||||||
extensions = {}
|
lualine_x = { 'encoding', 'filetype', 'diagnostics', 'lsp' },
|
||||||
|
lualine_y = { 'progress' },
|
||||||
|
lualine_z = { 'location' }
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
winbar = {},
|
||||||
|
inactive_winbar = {},
|
||||||
|
extensions = {}
|
||||||
})
|
})
|
||||||
|
|
|
@ -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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -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
|
|
||||||
})
|
|
|
@ -1,25 +1,22 @@
|
||||||
local navic = require("nvim-navic")
|
local navic = require("nvim-navic")
|
||||||
|
|
||||||
vim.g.rustaceanvim = {
|
vim.g.rustaceanvim = {
|
||||||
tools = {
|
|
||||||
autoSetHints = true,
|
|
||||||
inlay_hints = {
|
|
||||||
show_parameter_hints = true,
|
|
||||||
parameter_hints_prefix = "in: ", -- "<- "
|
|
||||||
other_hints_prefix = "out: " -- "=> "
|
|
||||||
}
|
|
||||||
},
|
|
||||||
server = {
|
server = {
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
navic.attach(client, bufnr)
|
navic.attach(client, bufnr)
|
||||||
end,
|
end,
|
||||||
settings = {
|
settings = {
|
||||||
['rust-analyzer'] = {
|
['rust-analyzer'] = {
|
||||||
|
procMacro = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
assist = {
|
assist = {
|
||||||
importEnforceGranularity = true,
|
importEnforceGranularity = true,
|
||||||
importPrefix = "create"
|
importPrefix = "create"
|
||||||
},
|
},
|
||||||
cargo = { allFeatures = true },
|
cargo = {
|
||||||
|
allFeatures = true,
|
||||||
|
},
|
||||||
checkOnSave = {
|
checkOnSave = {
|
||||||
command = "clippy",
|
command = "clippy",
|
||||||
allFeatures = true
|
allFeatures = true
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
require("telescope").setup({
|
||||||
|
defaults = {
|
||||||
|
borderchars = { " ", " ", " ", " ", " ", " ", " ", " " }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
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
|
||||||
|
})
|
|
@ -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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
local map = vim.keymap.set
|
local map = vim.keymap.set;
|
||||||
|
|
||||||
local bl_utils = require("config.utils.bufferline")
|
local bl_utils = require("config.utils.bufferline")
|
||||||
local hover = require "hover"
|
local hover = require "hover"
|
||||||
|
@ -32,6 +32,8 @@ 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", "<C-f>", "<C-q>")
|
||||||
|
map("i", "<C-f>", "<C-q>")
|
||||||
map("n", "<", "<cmd><gv<cr>")
|
map("n", "<", "<cmd><gv<cr>")
|
||||||
map("n", ">", "<cmd>>gv<cr>")
|
map("n", ">", "<cmd>>gv<cr>")
|
||||||
|
|
||||||
|
@ -39,8 +41,6 @@ map("n", "<leader>c", function(bufnr)
|
||||||
bl_utils.buf_kill("bd", bufnr, true)
|
bl_utils.buf_kill("bd", bufnr, true)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
map("n", "<leader>dr", "<cmd> DapContinue <cr>", { desc = "Continue debug" })
|
|
||||||
|
|
||||||
map("n", "do", function()
|
map("n", "do", function()
|
||||||
require("dapui").open()
|
require("dapui").open()
|
||||||
end, { desc = "Open DAP ui" })
|
end, { desc = "Open DAP ui" })
|
||||||
|
@ -61,7 +61,7 @@ map("n", "<C-Down>", "<cmd>resize +2<CR>")
|
||||||
map("n", "<C-Right>", "<cmd>vertical resize -2<CR>")
|
map("n", "<C-Right>", "<cmd>vertical resize -2<CR>")
|
||||||
map("n", "<C-Left>", "<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>nn", "<cmd>set norelativenumber<cr>")
|
||||||
map("n", "<leader>rn", "<cmd>set relativenumber<cr>")
|
map("n", "<leader>rn", "<cmd>set relativenumber<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>")
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
return {
|
return {
|
||||||
|
|
||||||
{
|
{
|
||||||
'simrat39/inlay-hints.nvim',
|
'simrat39/inlay-hints.nvim',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"LunarVim/breadcrumbs.nvim",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
},
|
},
|
||||||
|
@ -44,14 +42,14 @@ return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"catppuccin/nvim"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"vague2k/huez.nvim",
|
"vague2k/huez.nvim",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = {
|
||||||
|
'nvim-telescope/telescope-ui-select.nvim',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
@ -71,26 +69,13 @@ return {
|
||||||
'folke/lazydev.nvim',
|
'folke/lazydev.nvim',
|
||||||
ft = "lua",
|
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",
|
"folke/noice.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
"rcarriga/nvim-notify",
|
}
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
return {
|
return {
|
||||||
{
|
|
||||||
'nvimdev/dashboard-nvim',
|
|
||||||
event = 'VimEnter',
|
|
||||||
dependencies = { { 'nvim-tree/nvim-web-devicons' } }
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"kaarmu/typst.vim",
|
"kaarmu/typst.vim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
|
@ -12,9 +7,6 @@ return {
|
||||||
'MunifTanjim/prettier.nvim',
|
'MunifTanjim/prettier.nvim',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"savq/melange-nvim"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'akinsho/toggleterm.nvim', version = "*", config = true
|
'akinsho/toggleterm.nvim', version = "*", config = true
|
||||||
},
|
},
|
||||||
|
@ -27,7 +19,14 @@ return {
|
||||||
lazy = true,
|
lazy = true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim"
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
main = "ibl",
|
||||||
|
---@module "ibl"
|
||||||
|
---@type ibl.config
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"savq/melange-nvim"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mxsdev/nvim-dap-vscode-js",
|
"mxsdev/nvim-dap-vscode-js",
|
||||||
|
@ -45,10 +44,8 @@ return {
|
||||||
build = "npm install --legacy-peer-deps && npx gulp vsDebugServerBundle && mv dist out"
|
build = "npm install --legacy-peer-deps && npx gulp vsDebugServerBundle && mv dist out"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"mrcjkb/rustaceanvim",
|
'mrcjkb/rustaceanvim',
|
||||||
version = '^4', -- Recommended
|
version = '^5', -- Recommended
|
||||||
lazy = false, -- This plugin is already lazy
|
lazy = false, -- This plugin is already lazy
|
||||||
ft = { "rust" },
|
}
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue