Compare commits
21 Commits
5f155a5880
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 94862a999b | |||
| 52b133918b | |||
| 43bf103431 | |||
| 1350be9290 | |||
| 8843432ef3 | |||
| 2cc40aa68f | |||
| 676c991a43 | |||
| 9ad4462e8c | |||
| 95a766f193 | |||
| 0bbed03377 | |||
| e8b9bfa907 | |||
| 0dcbddb8a6 | |||
| 7779261104 | |||
| 193b296118 | |||
| 9f07874772 | |||
| 9609e2d7eb | |||
| 3f05e62ac8 | |||
| cd7e91f688 | |||
| 813671fcb0 | |||
| 5a533becb0 | |||
| 08e8e21300 |
25
init.lua
25
init.lua
@@ -5,9 +5,22 @@ local vanila_vim_autostart_commands = {
|
|||||||
"set shiftwidth=4",
|
"set shiftwidth=4",
|
||||||
"set tabstop=4",
|
"set tabstop=4",
|
||||||
"set ttyfast",
|
"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 = " " }
|
vim.opt.fillchars = { eob = " " }
|
||||||
|
|
||||||
for _, cmd in pairs(vanila_vim_autostart_commands) do
|
for _, cmd in pairs(vanila_vim_autostart_commands) do
|
||||||
@@ -25,15 +38,17 @@ require("config.plugins.buffer")
|
|||||||
require("config.plugins.colorizer")
|
require("config.plugins.colorizer")
|
||||||
require("config.plugins.comment")
|
require("config.plugins.comment")
|
||||||
require("config.plugins.dap")
|
require("config.plugins.dap")
|
||||||
|
require("config.plugins.dropbar")
|
||||||
require("config.plugins.gitsigns")
|
require("config.plugins.gitsigns")
|
||||||
require("config.plugins.ibl")
|
require("config.plugins.ibl")
|
||||||
require("config.plugins.hover_actions")
|
require("config.plugins.hover_actions")
|
||||||
require("config.plugins.lsp_config")
|
require("config.plugins.lsp_config")
|
||||||
require("config.plugins.lsp_diagnostic")
|
|
||||||
require("config.plugins.lualine")
|
require("config.plugins.lualine")
|
||||||
require("config.plugins.navic")
|
|
||||||
require("config.plugins.noice")
|
require("config.plugins.noice")
|
||||||
require("toggleterm").setup()
|
require("config.plugins.navic")
|
||||||
|
require("toggleterm").setup({
|
||||||
|
direction = "float",
|
||||||
|
})
|
||||||
require("config.plugins.telescope")
|
require("config.plugins.telescope")
|
||||||
require("config.plugins.treesitter")
|
require("config.plugins.treesitter")
|
||||||
require("config.plugins.neotree")
|
require("config.plugins.neotree")
|
||||||
@@ -41,6 +56,8 @@ require("config.plugins.prettier")
|
|||||||
require("config.plugins.rustaceanvim")
|
require("config.plugins.rustaceanvim")
|
||||||
require("huez").setup({})
|
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", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
buffer = buffer,
|
buffer = buffer,
|
||||||
|
|||||||
@@ -1,96 +1,89 @@
|
|||||||
local cmp = require "cmp"
|
local cmp = require("cmp")
|
||||||
|
|
||||||
local kind_icons = {
|
local kind_icons = {
|
||||||
Text = "",
|
Text = "",
|
||||||
Method = "",
|
Method = "",
|
||||||
Function = "",
|
Function = "",
|
||||||
Constructor = "",
|
Constructor = "",
|
||||||
Field = "",
|
Field = "",
|
||||||
Variable = "",
|
Variable = "",
|
||||||
Class = "",
|
Class = "",
|
||||||
Interface = "",
|
Interface = "",
|
||||||
Module = "",
|
Module = "",
|
||||||
Property = "",
|
Property = "",
|
||||||
Unit = "",
|
Unit = "",
|
||||||
Value = "",
|
Value = "",
|
||||||
Enum = "",
|
Enum = "",
|
||||||
Keyword = "",
|
Keyword = "",
|
||||||
Snippet = "",
|
Snippet = "",
|
||||||
Color = "",
|
Color = "",
|
||||||
File = "",
|
File = "",
|
||||||
Reference = "",
|
Reference = "",
|
||||||
Folder = "",
|
Folder = "",
|
||||||
EnumMember = "",
|
EnumMember = "",
|
||||||
Constant = "",
|
Constant = "",
|
||||||
Struct = "",
|
Struct = "",
|
||||||
Event = "",
|
Event = "",
|
||||||
Operator = "",
|
Operator = "",
|
||||||
TypeParameter = "",
|
TypeParameter = "",
|
||||||
}
|
}
|
||||||
|
|
||||||
cmp.setup{
|
cmp.setup {
|
||||||
completion = { completeopt = "menu,menuone" },
|
completion = { completeopt = "menu,menuone" },
|
||||||
|
|
||||||
snippet = {
|
window = {
|
||||||
expand = function(args)
|
completion = {
|
||||||
require("luasnip").lsp_expand(args.body)
|
-- winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
|
||||||
end,
|
col_offset = -3,
|
||||||
},
|
side_padding = 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
formatting = {
|
formatting = {
|
||||||
format = function(entry, vim_item)
|
fields = { "kind", "abbr", "menu" },
|
||||||
-- Kind icons
|
format = function(entry, vim_item)
|
||||||
vim_item.kind = string.format('\t%s %s\t', kind_icons[vim_item.kind], vim_item.kind) -- This concatenates the icons with the name of the item kind
|
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, vim_item)
|
||||||
-- Source
|
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
||||||
vim_item.menu = ({
|
kind.kind = " " .. (strings[1] or "") .. " "
|
||||||
buffer = "[Buffer]",
|
kind.menu = " " .. (strings[2] or "")
|
||||||
nvim_lsp = "[LSP]",
|
|
||||||
luasnip = "[LuaSnip]",
|
|
||||||
nvim_lua = "[Lua]",
|
|
||||||
latex_symbols = "[LaTeX]",
|
|
||||||
})[entry.source.name]
|
|
||||||
return vim_item
|
|
||||||
end
|
|
||||||
},
|
|
||||||
|
|
||||||
mapping = {
|
return kind
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
end
|
||||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
},
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
["<C-e>"] = cmp.mapping.close(),
|
|
||||||
|
|
||||||
["<CR>"] = cmp.mapping.confirm {
|
mapping = {
|
||||||
behavior = cmp.ConfirmBehavior.Insert,
|
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||||
select = true,
|
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||||
},
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
["<C-e>"] = cmp.mapping.close(),
|
||||||
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<CR>"] = cmp.mapping.confirm {
|
||||||
if cmp.visible() then
|
behavior = cmp.ConfirmBehavior.Insert,
|
||||||
cmp.select_next_item()
|
select = true,
|
||||||
elseif require("luasnip").expand_or_jumpable() then
|
},
|
||||||
require("luasnip").expand_or_jump()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
|
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_next_item()
|
||||||
elseif require("luasnip").jumpable(-1) then
|
else
|
||||||
require("luasnip").jump(-1)
|
fallback()
|
||||||
else
|
end
|
||||||
fallback()
|
end, { "i", "s" }),
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
},
|
|
||||||
|
|
||||||
sources = {
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
{ name = "nvim_lsp" },
|
if cmp.visible() then
|
||||||
{ name = "luasnip" },
|
cmp.select_prev_item()
|
||||||
{ name = "buffer" },
|
else
|
||||||
{ name = "path" },
|
fallback()
|
||||||
},
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
},
|
||||||
|
|
||||||
|
sources = {
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "buffer" },
|
||||||
|
{ name = "path" },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
local dap = require('dap')
|
local dap = require('dap')
|
||||||
|
|
||||||
require("dap-vscode-js").setup({
|
require("dap-vscode-js").setup({
|
||||||
debugger_path = "/.local/share/lunarvim/site/pack/lazy/opt/vscode-js-debug",
|
debugger_path = "/.local/share/nvim/site/pack/lazy/opt/vscode-js-debug",
|
||||||
debugger_cmd = { "js-debug-adapter" },
|
debugger_cmd = { "js-debug-adapter" },
|
||||||
adapters = { 'node-terminal' },
|
adapters = { 'node-terminal' },
|
||||||
})
|
})
|
||||||
@@ -28,7 +28,7 @@ dap.adapters["pwa-node"] = {
|
|||||||
port = "${port}",
|
port = "${port}",
|
||||||
executable = {
|
executable = {
|
||||||
command = "node",
|
command = "node",
|
||||||
args = { os.getenv("HOME") .. "/.local/share/lvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}" },
|
args = { os.getenv("HOME") .. "/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}" },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,13 +45,13 @@ dap.configurations.javascript = {
|
|||||||
dap.adapters.chrome = {
|
dap.adapters.chrome = {
|
||||||
type = "executable",
|
type = "executable",
|
||||||
command = "node",
|
command = "node",
|
||||||
args = { os.getenv("HOME") .. "/.local/share/lvim/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js" },
|
args = { os.getenv("HOME") .. "/.local/share/nvim/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js" },
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.adapters.firefox = {
|
dap.adapters.firefox = {
|
||||||
type = 'executable',
|
type = 'executable',
|
||||||
command = 'node',
|
command = 'node',
|
||||||
args = { os.getenv('HOME') .. '/.local/share/lvim/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js' },
|
args = { os.getenv('HOME') .. '/.local/share/nvim/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js' },
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.configurations.typescriptreact = {
|
dap.configurations.typescriptreact = {
|
||||||
@@ -75,7 +75,7 @@ dap.configurations.typescriptreact = {
|
|||||||
request = "launch",
|
request = "launch",
|
||||||
url = 'http://localhost:3000',
|
url = 'http://localhost:3000',
|
||||||
webRoot = '${workspaceFolder}',
|
webRoot = '${workspaceFolder}',
|
||||||
firefoxExecutable = '/usr/bin/waterfox',
|
firefoxExecutable = '/usr/bin/firefox',
|
||||||
pathMappings = {
|
pathMappings = {
|
||||||
{
|
{
|
||||||
url = "webpack://_n_e/",
|
url = "webpack://_n_e/",
|
||||||
@@ -91,7 +91,6 @@ 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
|
||||||
|
|||||||
4
lua/config/plugins/dropbar.lua
Normal file
4
lua/config/plugins/dropbar.lua
Normal 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' })
|
||||||
19
lua/config/plugins/eslint.lua
Normal file
19
lua/config/plugins/eslint.lua
Normal 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`
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
|
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||||
|
vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||||
|
virtual_text = true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
lspconfig.clangd.setup({})
|
lspconfig.clangd.setup({})
|
||||||
|
|
||||||
lspconfig.lua_ls.setup({
|
lspconfig.lua_ls.setup({
|
||||||
@@ -22,30 +28,26 @@ lspconfig.eslint.setup({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.lsp.enable('tailwindcss')
|
||||||
|
|
||||||
|
lspconfig.tailwindcss.setup({})
|
||||||
|
|
||||||
lspconfig.ts_ls.setup({
|
lspconfig.ts_ls.setup({
|
||||||
settings = {
|
settings = {
|
||||||
typescript = {
|
typescript = {
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
||||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
includeInlayVariableTypeHints = true,
|
includeInlayVariableTypeHints = true,
|
||||||
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
|
||||||
includeInlayEnumMemberValueHints = true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
javascript = {
|
javascript = {
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
includeInlayParameterNameHints = "all", -- 'none' | 'literals' | 'all'
|
||||||
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
|
|
||||||
includeInlayVariableTypeHints = true,
|
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
|
includeInlayVariableTypeHints = true,
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
|
||||||
includeInlayEnumMemberValueHints = true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
local _colors = { "DiffAdd", "DiffChange", "RedrawDebugRecompose" }
|
local _colors = { "DiffAdd", "DiffChange", "RedrawDebugRecompose" }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require("lualine").setup({
|
require("lualine").setup({
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
@@ -42,7 +40,31 @@ require("lualine").setup({
|
|||||||
source = nil, -- A function that works as a data source for diff.
|
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_y = { 'progress' },
|
||||||
lualine_z = { 'location' }
|
lualine_z = { 'location' }
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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,
|
|
||||||
})
|
|
||||||
@@ -1,47 +1,46 @@
|
|||||||
local navic = require("nvim-navic")
|
local navic = require("nvim-navic")
|
||||||
|
|
||||||
navic.setup {
|
navic.setup {
|
||||||
icons = {
|
icons = {
|
||||||
File = " ",
|
File = " ",
|
||||||
Module = " ",
|
Module = " ",
|
||||||
Namespace = " ",
|
Namespace = " ",
|
||||||
Package = " ",
|
Package = " ",
|
||||||
Class = " ",
|
Class = " ",
|
||||||
Method = " ",
|
Method = " ",
|
||||||
Property = " ",
|
Property = " ",
|
||||||
Field = " ",
|
Field = " ",
|
||||||
Constructor = " ",
|
Constructor = " ",
|
||||||
Enum = "",
|
Enum = "",
|
||||||
Interface = "",
|
Interface = "",
|
||||||
Function = " ",
|
Function = " ",
|
||||||
Variable = " ",
|
Variable = " ",
|
||||||
Constant = " ",
|
Constant = " ",
|
||||||
String = " ",
|
String = " ",
|
||||||
Number = " ",
|
Number = " ",
|
||||||
Boolean = "◩ ",
|
Boolean = "◩ ",
|
||||||
Array = " ",
|
Array = " ",
|
||||||
Object = " ",
|
Object = " ",
|
||||||
Key = " ",
|
Key = " ",
|
||||||
Null = " ",
|
Null = " ",
|
||||||
EnumMember = " ",
|
EnumMember = " ",
|
||||||
Struct = " ",
|
Struct = " ",
|
||||||
Event = " ",
|
Event = " ",
|
||||||
Operator = " ",
|
Operator = " ",
|
||||||
TypeParameter = " ",
|
TypeParameter = " ",
|
||||||
},
|
},
|
||||||
lsp = {
|
lsp = {
|
||||||
auto_attach = true,
|
auto_attach = true,
|
||||||
preference = nil,
|
preference = nil,
|
||||||
},
|
},
|
||||||
highlight = true,
|
highlight = true,
|
||||||
seperator = ' ',
|
seperator = ' ',
|
||||||
depth_limit = 0,
|
depth_limit = 0,
|
||||||
depth_limit_indicator = "..",
|
depth_limit_indicator = "..",
|
||||||
safe_output = true,
|
safe_output = true,
|
||||||
lazy_update_context = false,
|
lazy_update_context = false,
|
||||||
click = false,
|
click = false,
|
||||||
format_text = function(text)
|
format_text = function(text)
|
||||||
return text
|
return text
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +1,65 @@
|
|||||||
vim.fn.sign_define("LspDiagnosticsSignError",
|
|
||||||
{text = " ", texthl = "LspDiagnosticsSignError"})
|
|
||||||
vim.fn.sign_define("LspDiagnosticsSignWarning",
|
|
||||||
{text = " ", texthl = "LspDiagnosticsSignWarning"})
|
|
||||||
vim.fn.sign_define("LspDiagnosticsSignInformation",
|
|
||||||
{text = " ", texthl = "LspDiagnosticsSignInformation"})
|
|
||||||
vim.fn.sign_define("LspDiagnosticsSignHint",
|
|
||||||
{text = " ", texthl = "LspDiagnosticsSignHint"})
|
|
||||||
|
|
||||||
require("neo-tree").setup({
|
require("neo-tree").setup({
|
||||||
close_if_last_window = false,
|
close_if_last_window = false,
|
||||||
popup_border_style = "rounded",
|
enable_git_status = true,
|
||||||
enable_git_status = true,
|
enable_diagnostics = true,
|
||||||
enable_diagnostics = true,
|
source_selector = {
|
||||||
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
|
separator = { left = "", right = "" },
|
||||||
sort_case_insensitive = false,
|
separator_active = false,
|
||||||
sort_function = nil ,
|
show_separator_on_edge = false,
|
||||||
default_component_configs = {
|
},
|
||||||
indent = {
|
popup_border_style = "NC",
|
||||||
with_expanders = true,
|
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
|
||||||
},
|
sort_case_insensitive = false,
|
||||||
icon = {
|
sort_function = nil,
|
||||||
folder_closed = "",
|
window = {
|
||||||
folder_open = "",
|
separator_position = "left",
|
||||||
folder_empty = "",
|
},
|
||||||
default = "*",
|
default_component_configs = {
|
||||||
highlight = "NeoTreeFileIcon"
|
diagnostics = {
|
||||||
},
|
symbols = {
|
||||||
modified = {
|
hint = '',
|
||||||
symbol = "",
|
info = '',
|
||||||
highlight = "NeoTreeModified",
|
warn = '',
|
||||||
},
|
error = '',
|
||||||
name = {
|
},
|
||||||
trailing_slash = false,
|
highlights = {
|
||||||
use_git_status_colors = true,
|
hint = "DiagnosticSignHint",
|
||||||
highlight = "NeoTreeFileName",
|
info = "DiagnosticSignInfo",
|
||||||
},
|
warn = "DiagnosticSignWarn",
|
||||||
git_status = {
|
error = "DiagnosticSignError",
|
||||||
symbols = {
|
},
|
||||||
added = "",
|
},
|
||||||
modified = "",
|
indent = {
|
||||||
deleted = "",
|
with_expanders = true,
|
||||||
renamed = "",
|
},
|
||||||
untracked = "",
|
icon = {
|
||||||
ignored = "",
|
folder_closed = "",
|
||||||
unstaged = "",
|
folder_open = "",
|
||||||
staged = "",
|
folder_empty = "",
|
||||||
conflict = "",
|
default = "*",
|
||||||
}
|
highlight = "NeoTreeFileIcon"
|
||||||
},
|
},
|
||||||
},
|
modified = {
|
||||||
|
symbol = "",
|
||||||
|
highlight = "NeoTreeModified",
|
||||||
|
},
|
||||||
|
name = {
|
||||||
|
trailing_slash = false,
|
||||||
|
use_git_status_colors = true,
|
||||||
|
highlight = "NeoTreeFileName",
|
||||||
|
},
|
||||||
|
git_status = {
|
||||||
|
symbols = {
|
||||||
|
added = "",
|
||||||
|
modified = "",
|
||||||
|
deleted = "",
|
||||||
|
renamed = "",
|
||||||
|
untracked = "",
|
||||||
|
ignored = "",
|
||||||
|
unstaged = "",
|
||||||
|
staged = "",
|
||||||
|
conflict = "",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ vim.g.rustaceanvim = {
|
|||||||
end,
|
end,
|
||||||
settings = {
|
settings = {
|
||||||
['rust-analyzer'] = {
|
['rust-analyzer'] = {
|
||||||
procMacro = {
|
numThreads = 6,
|
||||||
enable = true,
|
cachePriming = {
|
||||||
|
numThreads = false
|
||||||
},
|
},
|
||||||
assist = {
|
assist = {
|
||||||
importEnforceGranularity = true,
|
importEnforceGranularity = true,
|
||||||
@@ -21,11 +22,15 @@ vim.g.rustaceanvim = {
|
|||||||
command = "clippy",
|
command = "clippy",
|
||||||
allFeatures = true
|
allFeatures = true
|
||||||
},
|
},
|
||||||
|
procMacro = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
lifetimeElisionHints = {
|
parameterHints = false,
|
||||||
enable = true,
|
lifetimeElisionHints = false,
|
||||||
useParameterNames = true
|
chainingHints = false,
|
||||||
}
|
bindingModeHints = false,
|
||||||
|
renderColons = false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,29 @@
|
|||||||
|
require("telescope").load_extension("ui-select")
|
||||||
|
|
||||||
require("telescope").setup({
|
require("telescope").setup({
|
||||||
defaults = {
|
defaults = {
|
||||||
borderchars = { " ", " ", " ", " ", " ", " ", " ", " " }
|
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,
|
||||||
|
-- }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -34,8 +34,6 @@ map("i", "<C-s>", "<cmd>w!<cr>")
|
|||||||
|
|
||||||
map("n", "<C-f>", "<C-q>")
|
map("n", "<C-f>", "<C-q>")
|
||||||
map("i", "<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)
|
map("n", "<leader>c", function(bufnr)
|
||||||
bl_utils.buf_kill("bd", bufnr, true)
|
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-j>", "<cmd>m .+1<CR>==")
|
||||||
map("n", "<A-k>", "<cmd>m .-2<CR>==")
|
map("n", "<A-k>", "<cmd>m .-2<CR>==")
|
||||||
map("i", "<A-j>", "<Esc><cmd>m .+1<CR>==gi")
|
map("i", "<A-j>", "<Esc><cmd>m .+1<CR>==gi<cr>")
|
||||||
map("i", "<A-k>", "<Esc><cmd>m .-2<CR>==gi")
|
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-Up>", "<cmd>resize -2<CR>")
|
||||||
map("n", "<C-Down>", "<cmd>resize +2<CR>")
|
map("n", "<C-Down>", "<cmd>resize +2<CR>")
|
||||||
|
|||||||
@@ -1,11 +1,19 @@
|
|||||||
return {
|
return {
|
||||||
|
|
||||||
{
|
{
|
||||||
'simrat39/inlay-hints.nvim',
|
'simrat39/inlay-hints.nvim',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope-ui-select.nvim'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"LunarVim/breadcrumbs.nvim",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"onsails/lspkind.nvim"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim"
|
"lewis6991/gitsigns.nvim"
|
||||||
},
|
},
|
||||||
@@ -21,15 +29,15 @@ return {
|
|||||||
{
|
{
|
||||||
'kevinhwang91/promise-async',
|
'kevinhwang91/promise-async',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"SmiteshP/nvim-navic",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'theHamsta/nvim-dap-virtual-text',
|
'theHamsta/nvim-dap-virtual-text',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"SmiteshP/nvim-navic",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"kyazdani42/nvim-web-devicons"
|
"kyazdani42/nvim-web-devicons"
|
||||||
},
|
},
|
||||||
@@ -47,9 +55,6 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
dependencies = {
|
|
||||||
'nvim-telescope/telescope-ui-select.nvim',
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
@@ -109,21 +114,24 @@ return {
|
|||||||
require("dapui").setup()
|
require("dapui").setup()
|
||||||
end
|
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",
|
"hrsh7th/nvim-cmp",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
dependencies = {
|
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-lua",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-buffer",
|
"hrsh7th/cmp-buffer",
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
return {
|
return {
|
||||||
|
{
|
||||||
|
"catppuccin/nvim",
|
||||||
|
name = "catppuccin",
|
||||||
|
priority = 1000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-treesitter/playground"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"kaarmu/typst.vim",
|
"kaarmu/typst.vim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
@@ -7,6 +15,10 @@ return {
|
|||||||
'MunifTanjim/prettier.nvim',
|
'MunifTanjim/prettier.nvim',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'MunifTanjim/eslint.nvim',
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'akinsho/toggleterm.nvim', version = "*", config = true
|
'akinsho/toggleterm.nvim', version = "*", config = true
|
||||||
},
|
},
|
||||||
@@ -21,9 +33,9 @@ return {
|
|||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
main = "ibl",
|
main = "ibl",
|
||||||
---@module "ibl"
|
},
|
||||||
---@type ibl.config
|
{
|
||||||
opts = {},
|
"sainnhe/gruvbox-material",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"savq/melange-nvim"
|
"savq/melange-nvim"
|
||||||
@@ -45,7 +57,7 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
'mrcjkb/rustaceanvim',
|
'mrcjkb/rustaceanvim',
|
||||||
version = '^5', -- Recommended
|
version = '^6', -- Recommended
|
||||||
lazy = false, -- This plugin is already lazy
|
lazy = false, -- This plugin is already lazy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user