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