style(nvim): format with stylua
This commit is contained in:
parent
c40352a364
commit
5c79abffeb
@ -28,15 +28,15 @@ cmp.setup({
|
||||
}
|
||||
|
||||
local extra_kind_icons = {
|
||||
TypeParameter = ""
|
||||
TypeParameter = "",
|
||||
}
|
||||
|
||||
local selection = selections[entry.source.name]
|
||||
if not selection then
|
||||
local kind = require("lspkind").cmp_format({
|
||||
mode = "symbol_text",
|
||||
maxwidth = 50,
|
||||
})(entry, vim_item)
|
||||
mode = "symbol_text",
|
||||
maxwidth = 50,
|
||||
})(entry, vim_item)
|
||||
local strings = vim.split(kind.kind, "%s", { trimempty = true })
|
||||
if not strings[2] then
|
||||
strings[2] = strings[1]
|
||||
@ -90,7 +90,7 @@ cmp.setup({
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs( -4), { "i", "c" }),
|
||||
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }),
|
||||
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }),
|
||||
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
|
||||
["<C-y>"] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
||||
@ -107,8 +107,8 @@ cmp.setup({
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<C-S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.jumpable( -1) then
|
||||
luasnip.jump( -1)
|
||||
if luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
@ -123,16 +123,16 @@ cmp.setup({
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable( -1) then
|
||||
luasnip.jump( -1)
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp", priority = 11 },
|
||||
{ name = "luasnip", priority = 10 }, -- For luasnip users.
|
||||
{ name = "nvim_lsp", priority = 11 },
|
||||
{ name = "luasnip", priority = 10 }, -- For luasnip users.
|
||||
{ name = "fuzzy_buffer", priority = 9, keyword_length = 3, max_item_count = 10 },
|
||||
{
|
||||
name = "rg",
|
||||
@ -140,12 +140,12 @@ cmp.setup({
|
||||
keyword_length = 3,
|
||||
max_item_count = 10,
|
||||
},
|
||||
{ name = "path", priority = 6 },
|
||||
{ name = "zsh", priority = 5 },
|
||||
{ name = "path", priority = 6 },
|
||||
{ name = "zsh", priority = 5 },
|
||||
{ name = "emoji", keyword_length = 2 },
|
||||
{ name = "neorg" },
|
||||
{ name = "calc" },
|
||||
{ name = "npm", keyword_length = 2 },
|
||||
{ name = "npm", keyword_length = 2 },
|
||||
{ name = "spell", keyword_length = 2 },
|
||||
}),
|
||||
sorting = {
|
||||
|
@ -23,11 +23,10 @@ dap.adapters.coreclr = {
|
||||
args = { "--interpreter=vscode" },
|
||||
}
|
||||
|
||||
|
||||
dap.adapters.bashdb = {
|
||||
type = 'executable',
|
||||
command = vim.fn.stdpath("data") .. '/mason/packages/bash-debug-adapter/bash-debug-adapter',
|
||||
name = 'bashdb'
|
||||
type = "executable",
|
||||
command = vim.fn.stdpath("data") .. "/mason/packages/bash-debug-adapter/bash-debug-adapter",
|
||||
name = "bashdb",
|
||||
}
|
||||
|
||||
-- configurations
|
||||
@ -116,23 +115,23 @@ dap.configurations.cs = config
|
||||
dap.configurations.fsharp = config
|
||||
|
||||
dap.configurations.sh = {
|
||||
{
|
||||
type = 'bashdb';
|
||||
request = 'launch';
|
||||
name = "Launch file";
|
||||
showDebugOutput = true;
|
||||
pathBashdb = vim.fn.stdpath("data") .. '/mason/packages/bash-debug-adapter/extension/bashdb_dir/bashdb';
|
||||
pathBashdbLib = vim.fn.stdpath("data") .. '/mason/packages/bash-debug-adapter/extension/bashdb_dir';
|
||||
trace = true;
|
||||
file = "${file}";
|
||||
program = "${file}";
|
||||
cwd = '${workspaceFolder}';
|
||||
pathCat = "cat";
|
||||
pathBash = "/bin/bash";
|
||||
pathMkfifo = "mkfifo";
|
||||
pathPkill = "pkill";
|
||||
args = {};
|
||||
env = {};
|
||||
terminalKind = "integrated";
|
||||
}
|
||||
{
|
||||
type = "bashdb",
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
showDebugOutput = true,
|
||||
pathBashdb = vim.fn.stdpath("data") .. "/mason/packages/bash-debug-adapter/extension/bashdb_dir/bashdb",
|
||||
pathBashdbLib = vim.fn.stdpath("data") .. "/mason/packages/bash-debug-adapter/extension/bashdb_dir",
|
||||
trace = true,
|
||||
file = "${file}",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
pathCat = "cat",
|
||||
pathBash = "/bin/bash",
|
||||
pathMkfifo = "mkfifo",
|
||||
pathPkill = "pkill",
|
||||
args = {},
|
||||
env = {},
|
||||
terminalKind = "integrated",
|
||||
},
|
||||
}
|
||||
|
@ -17,10 +17,10 @@ require("kanagawa").setup({
|
||||
theme = {
|
||||
all = {
|
||||
ui = {
|
||||
bg_gutter = 'NONE'
|
||||
}
|
||||
}
|
||||
}
|
||||
bg_gutter = "NONE",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
overrides = function(palette)
|
||||
local colors = palette.palette
|
||||
@ -127,7 +127,7 @@ require("kanagawa").setup({
|
||||
FloatTitle = { bg = "NONE" },
|
||||
DiffviewFilePanelTitle = { fg = colors.crystalBlue },
|
||||
Headline = { bg = colors.sumiInk2 },
|
||||
HeadlineReversed = { bg = colors.sumiInk1 }
|
||||
HeadlineReversed = { bg = colors.sumiInk1 },
|
||||
}
|
||||
|
||||
return overrides
|
||||
|
@ -1,9 +1,7 @@
|
||||
local nvim_treesitter = require("nvim-treesitter.configs")
|
||||
|
||||
nvim_treesitter.setup({
|
||||
ensure_installed = {
|
||||
"norg",
|
||||
},
|
||||
ensure_installed = { "norg" },
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = function(_, buf)
|
||||
@ -14,23 +12,20 @@ nvim_treesitter.setup({
|
||||
end
|
||||
end,
|
||||
},
|
||||
matchup = {
|
||||
enable = true,
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
matchup = { enable = true },
|
||||
autotag = { enable = true },
|
||||
indent = { enable = true },
|
||||
rainbow = {
|
||||
enable = true,
|
||||
query = "rainbow-parens",
|
||||
strategy = {
|
||||
on_attach = function()
|
||||
if vim.fn.line('$') < 1000 then
|
||||
if vim.fn.line("$") < 1000 then
|
||||
require("ts-rainbow.strategy.local")
|
||||
elseif vim.fn.line('$') < 10000 then
|
||||
elseif vim.fn.line("$") < 10000 then
|
||||
require("ts-rainbow.strategy.global")
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -205,7 +205,7 @@ lazy.setup({
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
"debugloop/telescope-undo.nvim",
|
||||
{ "nvim-telescope/telescope-smart-history.nvim", dependencies = "tami5/sqlite.lua" },
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
},
|
||||
config = function()
|
||||
require("plugins.configs.telescope-nvim")
|
||||
@ -332,7 +332,7 @@ lazy.setup({
|
||||
event = "VeryLazy",
|
||||
dependencies = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" },
|
||||
},
|
||||
{ "tzachar/cmp-fuzzy-path", dependencies = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } },
|
||||
{ "tzachar/cmp-fuzzy-path", dependencies = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } },
|
||||
{
|
||||
"saecki/crates.nvim",
|
||||
event = "VeryLazy",
|
||||
@ -403,8 +403,8 @@ lazy.setup({
|
||||
setopt = true,
|
||||
relculright = false,
|
||||
segments = {
|
||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||
{ text = { builtin.lnumfunc }, click = "v:lua.ScLa" },
|
||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||
{ text = { builtin.lnumfunc }, click = "v:lua.ScLa" },
|
||||
{ text = { " ", builtin.foldfunc, " " }, click = "v:lua.ScFa" },
|
||||
},
|
||||
})
|
||||
@ -484,7 +484,7 @@ lazy.setup({
|
||||
"AckslD/nvim-neoclip.lua",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
{ "tami5/sqlite.lua", module = "sqlite" },
|
||||
{ "tami5/sqlite.lua", module = "sqlite" },
|
||||
{ "nvim-telescope/telescope.nvim" },
|
||||
},
|
||||
config = function()
|
||||
@ -608,7 +608,7 @@ lazy.setup({
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
vim.cmd.VMTheme("codedark")
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
-- Maintain last cursor position in files
|
||||
@ -803,8 +803,8 @@ lazy.setup({
|
||||
{ cursor = "●", texthl = "SmoothCursorTrailMedium" },
|
||||
{ cursor = "●", texthl = "SmoothCursorTrailMedium" },
|
||||
{ cursor = "•", texthl = "SmoothCursorTrailSmall" },
|
||||
{ cursor = ".", texthl = "SmoothCursorTrailXSmall" },
|
||||
{ cursor = ".", texthl = "SmoothCursorTrailXSmall" },
|
||||
{ cursor = ".", texthl = "SmoothCursorTrailXSmall" },
|
||||
{ cursor = ".", texthl = "SmoothCursorTrailXSmall" },
|
||||
},
|
||||
},
|
||||
disabled_filetypes = { "NeogitNotification" },
|
||||
@ -847,7 +847,7 @@ lazy.setup({
|
||||
{
|
||||
"lukas-reineke/headlines.nvim",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
config = true
|
||||
config = true,
|
||||
},
|
||||
}, {
|
||||
checker = {
|
||||
|
Loading…
Reference in New Issue
Block a user