neovim refactor
This commit is contained in:
1 parent
b12c211a69
commit
883f9d26c2
25 files changed
+1154
-880
No files matched your search
@@ -1,19 +1,7 @@
|
||||
require("blink.compat").setup({})
|
||||
|
||||
require("lz.n").load({
|
||||
{
|
||||
"friendly-snippets",
|
||||
},
|
||||
{
|
||||
"luasnip",
|
||||
event = { "InsertEnter", "CmdlineEnter" },
|
||||
before = function()
|
||||
require("lz.n").trigger_load("friendly-snippets")
|
||||
end,
|
||||
after = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
-- Load custom lua snippets
|
||||
require("luasnip.loaders.from_lua").load({ paths = { vim.fn.stdpath("config") .. "/snippets" } })
|
||||
end,
|
||||
},
|
||||
{ "friendly-snippets" },
|
||||
{
|
||||
"colorful-menu.nvim",
|
||||
event = { "InsertEnter", "CmdlineEnter" },
|
||||
@@ -24,41 +12,18 @@ require("lz.n").load({
|
||||
{
|
||||
"blink.cmp",
|
||||
event = { "InsertEnter", "CmdlineEnter" },
|
||||
before = function()
|
||||
-- Trigger lazydev so it's ready for blink source
|
||||
require("lz.n").trigger_load({ "lazydev.nvim", "luasnip", "colorful-menu.nvim" })
|
||||
end,
|
||||
after = function()
|
||||
require("blink.cmp").setup({
|
||||
keymap = {
|
||||
preset = "default",
|
||||
|
||||
-- [Up/Down]
|
||||
["<C-j>"] = { "select_next", "fallback" },
|
||||
["<C-k>"] = { "select_prev", "fallback" }, -- Overrides Signature Help
|
||||
|
||||
-- [Insert Suggestion]
|
||||
["<tab>"] = { "select_and_accept", "fallback" },
|
||||
|
||||
-- [Remap Signature Help]
|
||||
-- Since we took <C-k>, let's move signature help to <C-g> (optional)
|
||||
["<C-k>"] = { "select_prev", "fallback" },
|
||||
["<Tab>"] = { "select_and_accept", "fallback" },
|
||||
["<C-g>"] = { "show_signature", "hide_signature", "fallback" },
|
||||
},
|
||||
|
||||
appearance = {
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
|
||||
completion = {
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 500,
|
||||
window = {
|
||||
border = "none",
|
||||
},
|
||||
},
|
||||
documentation = { auto_show = true },
|
||||
menu = {
|
||||
border = "none",
|
||||
draw = {
|
||||
columns = { { "kind_icon" }, { "label", gap = 1 } },
|
||||
components = {
|
||||
@@ -74,38 +39,30 @@ require("lz.n").load({
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
cmdline = {
|
||||
completion = {
|
||||
menu = {
|
||||
auto_show = true,
|
||||
},
|
||||
},
|
||||
completion = { menu = { auto_show = true } },
|
||||
keymap = { preset = "inherit" },
|
||||
},
|
||||
|
||||
sources = {
|
||||
default = {
|
||||
"lsp",
|
||||
"path",
|
||||
"snippets",
|
||||
"lazydev",
|
||||
default = { "lsp", "path", "snippets" },
|
||||
per_filetype = {
|
||||
lua = { inherit_defaults = true, "lazydev" },
|
||||
sql = { inherit_defaults = true, "vim-dadbod-completion" },
|
||||
mysql = { inherit_defaults = true, "vim-dadbod-completion" },
|
||||
plsql = { inherit_defaults = true, "vim-dadbod-completion" },
|
||||
},
|
||||
providers = {
|
||||
lazydev = { module = "lazydev.integrations.blink", score_offset = 100 },
|
||||
},
|
||||
},
|
||||
|
||||
snippets = { preset = "luasnip" },
|
||||
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||
|
||||
signature = {
|
||||
enabled = true,
|
||||
window = {
|
||||
border = "none",
|
||||
lazydev = {
|
||||
module = "lazydev.integrations.blink",
|
||||
score_offset = 100,
|
||||
},
|
||||
["vim-dadbod-completion"] = {
|
||||
name = "vim-dadbod-completion",
|
||||
module = "blink.compat.source",
|
||||
},
|
||||
},
|
||||
},
|
||||
signature = { enabled = true },
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user