mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
ref(nvim): formatted entire config
This commit is contained in:
parent
57db1d60e4
commit
d83c5c1ace
16 changed files with 280 additions and 280 deletions
|
|
@ -2,5 +2,5 @@ require "nvim-autopairs".setup()
|
|||
|
||||
-- Intergration with `cmp`
|
||||
local cmp = require "cmp"
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
|
|
|
|||
|
|
@ -9,88 +9,88 @@ local f = ls.function_node
|
|||
local c = ls.choice_node
|
||||
local d = ls.dynamic_node
|
||||
local r = ls.restore_node
|
||||
local l = require("luasnip.extras").lambda
|
||||
local rep = require("luasnip.extras").rep
|
||||
local p = require("luasnip.extras").partial
|
||||
local m = require("luasnip.extras").match
|
||||
local n = require("luasnip.extras").nonempty
|
||||
local dl = require("luasnip.extras").dynamic_lambda
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local fmta = require("luasnip.extras.fmt").fmta
|
||||
local types = require("luasnip.util.types")
|
||||
local conds = require("luasnip.extras.conditions")
|
||||
local conds_expand = require("luasnip.extras.conditions.expand")
|
||||
local l = require "luasnip.extras".lambda
|
||||
local rep = require "luasnip.extras".rep
|
||||
local p = require "luasnip.extras".partial
|
||||
local m = require "luasnip.extras".match
|
||||
local n = require "luasnip.extras".nonempty
|
||||
local dl = require "luasnip.extras".dynamic_lambda
|
||||
local fmt = require "luasnip.extras.fmt".fmt
|
||||
local fmta = require "luasnip.extras.fmt".fmta
|
||||
local types = require "luasnip.util.types"
|
||||
local conds = require "luasnip.extras.conditions"
|
||||
local conds_expand = require "luasnip.extras.conditions.expand"
|
||||
|
||||
require "luasnip.loaders.from_vscode".lazy_load({ paths = { "./snippets" } })
|
||||
require "luasnip.loaders.from_vscode".lazy_load { paths = { "./snippets" } }
|
||||
|
||||
-- Some hack
|
||||
ls.config.set_config({
|
||||
region_check_events = 'InsertEnter',
|
||||
delete_check_events = 'InsertLeave'
|
||||
})
|
||||
ls.config.set_config {
|
||||
region_check_events = "InsertEnter",
|
||||
delete_check_events = "InsertLeave",
|
||||
}
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match "%s" == nil
|
||||
end
|
||||
|
||||
local function show_date()
|
||||
return " " .. os.date("(year: %Y, month: %m, day:%d, hour: %H, minute: %M, second: %S)")
|
||||
return " " .. os.date "(year: %Y, month: %m, day:%d, hour: %H, minute: %M, second: %S)"
|
||||
end
|
||||
ls.add_snippets("typst", {
|
||||
s("entry", {
|
||||
t({
|
||||
t {
|
||||
"#entry(",
|
||||
""
|
||||
}),
|
||||
"",
|
||||
},
|
||||
f(show_date),
|
||||
t({
|
||||
t {
|
||||
"",
|
||||
")[",
|
||||
"",
|
||||
}),
|
||||
},
|
||||
i(0),
|
||||
t({ "", "]" })
|
||||
t { "", "]" },
|
||||
}),
|
||||
})
|
||||
|
||||
local function list_rec()
|
||||
return sn(nil, {
|
||||
c(1, {
|
||||
t(""),
|
||||
sn(nil, { t({ "", "- " }), i(1), d(2, list_rec, {}), }),
|
||||
t "",
|
||||
sn(nil, { t { "", "- " }, i(1), d(2, list_rec, {}) }),
|
||||
}),
|
||||
});
|
||||
end
|
||||
local function enum_rec()
|
||||
return sn(nil, {
|
||||
c(1, {
|
||||
t(""),
|
||||
sn(nil, { t({ "", "+ " }), i(1), d(2, enum_rec, {}), }),
|
||||
t "",
|
||||
sn(nil, { t { "", "+ " }, i(1), d(2, enum_rec, {}) }),
|
||||
}),
|
||||
});
|
||||
end
|
||||
local function wrapped_rec()
|
||||
return sn(nil, {
|
||||
c(1, {
|
||||
t(""),
|
||||
sn(nil, { t({ "", "" }), i(1), t([[\]]), d(2, wrapped_rec, {}), }),
|
||||
t "",
|
||||
sn(nil, { t { "", "" }, i(1), t [[\]], d(2, wrapped_rec, {}) }),
|
||||
}),
|
||||
});
|
||||
end
|
||||
ls.add_snippets("all", {
|
||||
s("-", {
|
||||
t({ "- " }), i(1),
|
||||
t { "- " }, i(1),
|
||||
d(2, list_rec, {}),
|
||||
i(0),
|
||||
}),
|
||||
s("+", {
|
||||
t({ "+ " }), i(1),
|
||||
t { "+ " }, i(1),
|
||||
d(2, enum_rec, {}),
|
||||
i(0),
|
||||
}),
|
||||
s("wrapped", {
|
||||
i(1), t([[\]]),
|
||||
i(1), t [[\]],
|
||||
d(2, wrapped_rec, {}),
|
||||
i(0),
|
||||
}),
|
||||
|
|
@ -130,14 +130,14 @@ end
|
|||
ls.add_snippets("all", {
|
||||
s("banner", {
|
||||
f(horizon, { 1 }),
|
||||
t({ "", "" }),
|
||||
t { "", "" },
|
||||
f(left), i(1), f(right),
|
||||
t({ "", "" }),
|
||||
t { "", "" },
|
||||
f(horizon, { 1 }),
|
||||
})
|
||||
}),
|
||||
})
|
||||
|
||||
cmp.setup({
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
ls.lsp_expand(args.body)
|
||||
|
|
@ -168,10 +168,10 @@ cmp.setup({
|
|||
if ls.choice_active() then
|
||||
ls.change_choice(1)
|
||||
elseif cmp.visible() then
|
||||
cmp.mapping.confirm({
|
||||
cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true
|
||||
})()
|
||||
select = true,
|
||||
}()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
|
|
@ -180,10 +180,10 @@ cmp.setup({
|
|||
if ls.choice_active() then
|
||||
ls.change_choice(-1)
|
||||
elseif cmp.visible() then
|
||||
cmp.mapping.confirm({
|
||||
cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true
|
||||
})()
|
||||
select = true,
|
||||
}()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
|
|
@ -194,4 +194,4 @@ cmp.setup({
|
|||
{ name = "nvim_lsp" },
|
||||
{ name = "buffer", keyword_length = 7 },
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ local default = {
|
|||
always_update = true,
|
||||
}
|
||||
|
||||
require "colorizer".setup({
|
||||
require "colorizer".setup {
|
||||
filetypes = {
|
||||
'*',
|
||||
"*",
|
||||
},
|
||||
user_default_options = default,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
require "gitsigns".setup({
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '-' },
|
||||
topdelete = { text = '-' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '·' },
|
||||
},
|
||||
signcolumn = false, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
interval = 2500,
|
||||
follow_files = true
|
||||
},
|
||||
attach_to_untracked = true,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'right_align', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 0,
|
||||
ignore_whitespace = false,
|
||||
},
|
||||
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
|
||||
})
|
||||
require "gitsigns".setup {
|
||||
signs = {
|
||||
add = { text = "+" },
|
||||
change = { text = "~" },
|
||||
delete = { text = "-" },
|
||||
topdelete = { text = "-" },
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "·" },
|
||||
},
|
||||
signcolumn = false, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
interval = 2500,
|
||||
follow_files = true,
|
||||
},
|
||||
attach_to_untracked = true,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = "right_align", -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 0,
|
||||
ignore_whitespace = false,
|
||||
},
|
||||
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,15 +5,15 @@ local mark = require "harpoon.mark"
|
|||
local map = vim.keymap.set
|
||||
|
||||
-- add and view
|
||||
map({ 'n', 'i' }, '<A-c>', function() mark.add_file() end)
|
||||
map({ 'n', 'i' }, '<A-g>', function() ui.toggle_quick_menu() end)
|
||||
map({ "n", "i" }, "<A-c>", function() mark.add_file() end)
|
||||
map({ "n", "i" }, "<A-g>", function() ui.toggle_quick_menu() end)
|
||||
|
||||
-- switch it up!
|
||||
map({ 'n', 'i' }, '<A-h>', function() ui.nav_file(1) end)
|
||||
map({ 'n', 'i' }, '<A-t>', function() ui.nav_file(2) end)
|
||||
map({ 'n', 'i' }, '<A-n>', function() ui.nav_file(3) end)
|
||||
map({ 'n', 'i' }, '<A-s>', function() ui.nav_file(4) end)
|
||||
map({ 'n', 'i' }, '<A-m>', function() ui.nav_file(5) end)
|
||||
map({ 'n', 'i' }, '<A-w>', function() ui.nav_file(6) end)
|
||||
map({ 'n', 'i' }, '<A-v>', function() ui.nav_file(7) end)
|
||||
map({ 'n', 'i' }, '<A-z>', function() ui.nav_file(8) end)
|
||||
map({ "n", "i" }, "<A-h>", function() ui.nav_file(1) end)
|
||||
map({ "n", "i" }, "<A-t>", function() ui.nav_file(2) end)
|
||||
map({ "n", "i" }, "<A-n>", function() ui.nav_file(3) end)
|
||||
map({ "n", "i" }, "<A-s>", function() ui.nav_file(4) end)
|
||||
map({ "n", "i" }, "<A-m>", function() ui.nav_file(5) end)
|
||||
map({ "n", "i" }, "<A-w>", function() ui.nav_file(6) end)
|
||||
map({ "n", "i" }, "<A-v>", function() ui.nav_file(7) end)
|
||||
map({ "n", "i" }, "<A-z>", function() ui.nav_file(8) end)
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ require "ibl".setup {
|
|||
enabled = true,
|
||||
show_start = false,
|
||||
show_end = false,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
local map = vim.keymap.set
|
||||
|
||||
require("fidget").setup {
|
||||
require "fidget".setup {
|
||||
text = { spinner = "dots" },
|
||||
}
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ local on_attach = function(client, bufno)
|
|||
map("n", "<leader>r", vim.lsp.buf.rename, opts)
|
||||
map("n", "<leader>f", function() vim.lsp.buf.format { async = true } end, opts)
|
||||
|
||||
local navic = require("nvim-navic")
|
||||
local navic = require "nvim-navic"
|
||||
if client.server_capabilities.documentSymbolProvider then
|
||||
navic.attach(client, bufno)
|
||||
end
|
||||
|
|
@ -69,7 +69,7 @@ capabilities.textDocument.foldingRange = {
|
|||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
}
|
||||
local ufo = require("ufo")
|
||||
local ufo = require "ufo"
|
||||
ufo.setup()
|
||||
|
||||
----------------------
|
||||
|
|
@ -232,7 +232,7 @@ local jdtls_group = vim.api.nvim_create_augroup("jdtls", { clear = true })
|
|||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "java" },
|
||||
callback = function()
|
||||
require("jdtls").start_or_attach(config)
|
||||
require "jdtls".start_or_attach(config)
|
||||
end,
|
||||
group = jdtls_group,
|
||||
})
|
||||
|
|
@ -263,12 +263,12 @@ metals_config.on_attach = function(client, bufnr)
|
|||
map("n", "<leader>ws", metals.hover_worksheet)
|
||||
|
||||
map("n", "<leader>dc", require "dap".continue)
|
||||
map("n", "<leader>dr", require("dap").repl.toggle)
|
||||
map("n", "<leader>dK", require("dap.ui.widgets").hover)
|
||||
map("n", "<leader>dt", require("dap").toggle_breakpoint)
|
||||
map("n", "<leader>dso", require("dap").step_over)
|
||||
map("n", "<leader>dsi", require("dap").step_into)
|
||||
map("n", "<leader>dl", require("dap").run_last)
|
||||
map("n", "<leader>dr", require "dap".repl.toggle)
|
||||
map("n", "<leader>dK", require "dap.ui.widgets".hover)
|
||||
map("n", "<leader>dt", require "dap".toggle_breakpoint)
|
||||
map("n", "<leader>dso", require "dap".step_over)
|
||||
map("n", "<leader>dsi", require "dap".step_into)
|
||||
map("n", "<leader>dl", require "dap".run_last)
|
||||
|
||||
on_attach(client, bufnr)
|
||||
end
|
||||
|
|
@ -291,14 +291,14 @@ vim.g.haskell_tools = {
|
|||
},
|
||||
hls = {
|
||||
on_attach = function(client, bufnr)
|
||||
local ht = require("haskell-tools")
|
||||
local ht = require "haskell-tools"
|
||||
local opts = { buffer = bufnr }
|
||||
|
||||
map("n", "<leader>hs", ht.hoogle.hoogle_signature, opts)
|
||||
map("n", "<leader>he", ht.lsp.buf_eval_all, opts)
|
||||
map("n", "<leader>hr", ht.repl.toggle, opts)
|
||||
|
||||
vim.cmd("setlocal shiftwidth=2")
|
||||
vim.cmd "setlocal shiftwidth=2"
|
||||
on_attach(client, bufnr)
|
||||
end,
|
||||
default_settings = {
|
||||
|
|
|
|||
|
|
@ -1,107 +1,107 @@
|
|||
local function diagnostic_message()
|
||||
local row, _ = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
local ds = vim.diagnostic.get(0, { lnum = row - 1 })
|
||||
if #ds >= 1 then
|
||||
return ds[1].message
|
||||
else
|
||||
return ""
|
||||
end
|
||||
local row, _ = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
local ds = vim.diagnostic.get(0, { lnum = row - 1 })
|
||||
if #ds >= 1 then
|
||||
return ds[1].message
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end
|
||||
|
||||
local curry_theme = {
|
||||
normal = {
|
||||
a = { bg = "#e4e4e5" },
|
||||
b = { bg = "#e4e4e5" },
|
||||
c = { bg = "#e4e4e5" },
|
||||
x = { bg = "#e4e4e5" },
|
||||
y = { bg = "#e4e4e5" },
|
||||
z = { bg = "#e4e4e5" },
|
||||
},
|
||||
insert = {
|
||||
a = { bg = "#e4e4e5" },
|
||||
b = { bg = "#e4e4e5" },
|
||||
c = { bg = "#e4e4e5" },
|
||||
x = { bg = "#e4e4e5" },
|
||||
y = { bg = "#e4e4e5" },
|
||||
z = { bg = "#e4e4e5" },
|
||||
},
|
||||
visual = {
|
||||
a = { bg = "#e4e4e5" },
|
||||
b = { bg = "#e4e4e5" },
|
||||
c = { bg = "#e4e4e5" },
|
||||
x = { bg = "#e4e4e5" },
|
||||
y = { bg = "#e4e4e5" },
|
||||
z = { bg = "#e4e4e5" },
|
||||
},
|
||||
replace = {
|
||||
a = { bg = "#e4e4e5" },
|
||||
b = { bg = "#e4e4e5" },
|
||||
c = { bg = "#e4e4e5" },
|
||||
x = { bg = "#e4e4e5" },
|
||||
y = { bg = "#e4e4e5" },
|
||||
z = { bg = "#e4e4e5" },
|
||||
},
|
||||
inactive = {
|
||||
a = { bg = "#e4e4e5" },
|
||||
b = { bg = "#e4e4e5" },
|
||||
c = { bg = "#e4e4e5" },
|
||||
x = { bg = "#e4e4e5" },
|
||||
y = { bg = "#e4e4e5" },
|
||||
z = { bg = "#e4e4e5" },
|
||||
},
|
||||
normal = {
|
||||
a = { bg = "#e4e4e5" },
|
||||
b = { bg = "#e4e4e5" },
|
||||
c = { bg = "#e4e4e5" },
|
||||
x = { bg = "#e4e4e5" },
|
||||
y = { bg = "#e4e4e5" },
|
||||
z = { bg = "#e4e4e5" },
|
||||
},
|
||||
insert = {
|
||||
a = { bg = "#e4e4e5" },
|
||||
b = { bg = "#e4e4e5" },
|
||||
c = { bg = "#e4e4e5" },
|
||||
x = { bg = "#e4e4e5" },
|
||||
y = { bg = "#e4e4e5" },
|
||||
z = { bg = "#e4e4e5" },
|
||||
},
|
||||
visual = {
|
||||
a = { bg = "#e4e4e5" },
|
||||
b = { bg = "#e4e4e5" },
|
||||
c = { bg = "#e4e4e5" },
|
||||
x = { bg = "#e4e4e5" },
|
||||
y = { bg = "#e4e4e5" },
|
||||
z = { bg = "#e4e4e5" },
|
||||
},
|
||||
replace = {
|
||||
a = { bg = "#e4e4e5" },
|
||||
b = { bg = "#e4e4e5" },
|
||||
c = { bg = "#e4e4e5" },
|
||||
x = { bg = "#e4e4e5" },
|
||||
y = { bg = "#e4e4e5" },
|
||||
z = { bg = "#e4e4e5" },
|
||||
},
|
||||
inactive = {
|
||||
a = { bg = "#e4e4e5" },
|
||||
b = { bg = "#e4e4e5" },
|
||||
c = { bg = "#e4e4e5" },
|
||||
x = { bg = "#e4e4e5" },
|
||||
y = { bg = "#e4e4e5" },
|
||||
z = { bg = "#e4e4e5" },
|
||||
},
|
||||
}
|
||||
|
||||
require "lualine".setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = curry_theme,
|
||||
component_separators = {},
|
||||
section_separators = {},
|
||||
disabled_filetypes = {
|
||||
statusline = { "fugitive" },
|
||||
winbar = { "fugitive" },
|
||||
require "lualine".setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = curry_theme,
|
||||
component_separators = {},
|
||||
section_separators = {},
|
||||
disabled_filetypes = {
|
||||
statusline = { "fugitive" },
|
||||
winbar = { "fugitive" },
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {
|
||||
{
|
||||
"diagnostics",
|
||||
colored = true,
|
||||
symbols = { error = 'E', warn = 'W', info = '·', hint = 'H' }
|
||||
},
|
||||
diagnostic_message
|
||||
sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {
|
||||
{
|
||||
"diagnostics",
|
||||
colored = true,
|
||||
symbols = { error = "E", warn = "W", info = "·", hint = "H" },
|
||||
},
|
||||
diagnostic_message,
|
||||
},
|
||||
lualine_c = { "navic" },
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = { "progress" },
|
||||
},
|
||||
lualine_c = { "navic", },
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = { "progress" }
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {
|
||||
{
|
||||
"diagnostics",
|
||||
colored = false,
|
||||
symbols = { error = 'E', warn = 'W', info = '·', hint = 'H' }
|
||||
},
|
||||
diagnostic_message
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {
|
||||
{
|
||||
"diagnostics",
|
||||
colored = false,
|
||||
symbols = { error = "E", warn = "W", info = "·", hint = "H" },
|
||||
},
|
||||
diagnostic_message,
|
||||
},
|
||||
lualine_c = { "navic" },
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = { "progress" },
|
||||
},
|
||||
lualine_c = { "navic", },
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = { "progress" }
|
||||
},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
tabline = {},
|
||||
extensions = {}
|
||||
})
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require "no-neck-pain".setup {
|
||||
width = 75,
|
||||
buffers = {
|
||||
right = { enabled = false, }
|
||||
}
|
||||
right = { enabled = false },
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ table.insert(vimgrep_arguments, "--hidden") -- search hidden
|
|||
table.insert(vimgrep_arguments, "--glob") -- ignore git
|
||||
table.insert(vimgrep_arguments, "!**/.git/*")
|
||||
|
||||
ts.setup({
|
||||
ts.setup {
|
||||
defaults = {
|
||||
vimgrep_arguments = vimgrep_arguments,
|
||||
mappings = {
|
||||
|
|
@ -24,24 +24,24 @@ ts.setup({
|
|||
pickers = {
|
||||
find_files = {
|
||||
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Enable telescope fzf native, if installed
|
||||
pcall(require "telescope".load_extension, 'fzf')
|
||||
pcall(require "telescope".load_extension, "fzf")
|
||||
|
||||
|
||||
map('n', '<leader>?', builtin.oldfiles)
|
||||
map('n', '<leader>/',
|
||||
map("n", "<leader>?", builtin.oldfiles)
|
||||
map("n", "<leader>/",
|
||||
function()
|
||||
builtin.current_buffer_fuzzy_find(themes.get_dropdown { previewer = false })
|
||||
end
|
||||
)
|
||||
map('n', '<leader>sf', builtin.find_files)
|
||||
map('n', '<leader>gf', builtin.git_files)
|
||||
map('n', '<leader>sh', builtin.help_tags)
|
||||
map('n', '<leader>sw', builtin.grep_string)
|
||||
map('n', '<leader>sg', builtin.live_grep)
|
||||
map('n', '<leader>sd', builtin.diagnostics)
|
||||
map('n', '<leader>b', builtin.buffers)
|
||||
map("n", "<leader>sf", builtin.find_files)
|
||||
map("n", "<leader>gf", builtin.git_files)
|
||||
map("n", "<leader>sh", builtin.help_tags)
|
||||
map("n", "<leader>sw", builtin.grep_string)
|
||||
map("n", "<leader>sg", builtin.live_grep)
|
||||
map("n", "<leader>sd", builtin.diagnostics)
|
||||
map("n", "<leader>b", builtin.buffers)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
require "treesitter-context".setup({
|
||||
require "treesitter-context".setup {
|
||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||
max_lines = 7, -- How many lines the window should span. Values < = 0 mean no limit.
|
||||
min_window_height = 0, -- Minimum editor window height to enable context. Values < = 0 mean no limit.
|
||||
line_numbers = true,
|
||||
multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line
|
||||
trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||
mode = 'topline', -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||
trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||
mode = "topline", -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||
zindex = 20, -- The Z-index of the context window
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
require("nvim-treesitter.configs").setup({
|
||||
require "nvim-treesitter.configs".setup {
|
||||
ensure_installed = {},
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
|
|
@ -6,4 +6,4 @@ require("nvim-treesitter.configs").setup({
|
|||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue