add blink complete for nvim
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
|
||||
"catppuccin": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||
|
||||
19
nvim/.config/nvim/lua/plugins/blink.lua
Normal file
19
nvim/.config/nvim/lua/plugins/blink.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
'saghen/blink.cmp',
|
||||
dependencies = { 'rafamadriz/friendly-snippets' },
|
||||
version = '1.*',
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
keymap = { preset = 'super-tab' },
|
||||
appearance = {
|
||||
nerd_font_variant = 'mono'
|
||||
},
|
||||
completion = { documentation = { auto_show = false } },
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
||||
},
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" }
|
||||
},
|
||||
opts_extend = { "sources.default" }
|
||||
}
|
||||
@@ -1,32 +1,35 @@
|
||||
return {
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
version = "^1.0.0",
|
||||
config = function()
|
||||
require('mason').setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
version = "^1.0.0",
|
||||
opts = {},
|
||||
config = function()
|
||||
require('mason-lspconfig').setup({
|
||||
ensure_installed = { "lua_ls", "ts_ls" }
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
version = "^1.0.0",
|
||||
config = function()
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.lua_ls.setup({})
|
||||
lspconfig.ts_ls.setup({})
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
version = "^1.0.0",
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
version = "^1.0.0",
|
||||
opts = {},
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls", "ts_ls" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = { "saghen/blink.cmp" },
|
||||
version = "^1.0.0",
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, {})
|
||||
end
|
||||
}
|
||||
lspconfig.lua_ls.setup({ capabilities = capabilities })
|
||||
lspconfig.ts_ls.setup({ capabilities = capabilities })
|
||||
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, {})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user