fix duplicate entry for completion
This commit is contained in:
parent
4cc7dd1837
commit
c585a59e16
|
@ -5,3 +5,4 @@ nvim
|
|||
|
||||
spell/
|
||||
lazy-lock.json
|
||||
.repro
|
||||
|
|
|
@ -6,6 +6,7 @@ return { -- blink autocompletion
|
|||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
completion = {
|
||||
documentation = { auto_show = true },
|
||||
list = {
|
||||
selection = {
|
||||
preselect = false,
|
||||
|
@ -20,9 +21,6 @@ return { -- blink autocompletion
|
|||
appearance = {
|
||||
nerd_font_variant = 'normal',
|
||||
},
|
||||
completion = {
|
||||
documentation = { auto_show = true },
|
||||
},
|
||||
sources = {
|
||||
-- add lazydev to your completion providers
|
||||
default = { 'lazydev', 'lsp', 'path', 'snippets', 'buffer' },
|
||||
|
|
|
@ -94,10 +94,12 @@ return {
|
|||
},
|
||||
}
|
||||
-- Godot's LSP - Requires Godot to be running
|
||||
if vim.fn.has 'win32' == 1 then
|
||||
if vim.fn.has 'win32' then
|
||||
require('lspconfig')['gdscript'].setup {
|
||||
cmd = { 'ncat', '127.0.0.1', '6005' },
|
||||
capabilities = require('blink.cmp').get_lsp_capabilities(),
|
||||
filetypes = { 'gd', 'gdscript', 'gdscript3' },
|
||||
root_dir = require('lspconfig.util').root_pattern('project.godot', '.git'),
|
||||
name = 'godot',
|
||||
}
|
||||
else
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
-- Run with `nvim -u repro.lua`
|
||||
|
||||
vim.env.LAZY_STDPATH = '.repro'
|
||||
load(vim.fn.system 'curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua')()
|
||||
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require('lazy.minit').repro {
|
||||
spec = {
|
||||
{
|
||||
'saghen/blink.cmp',
|
||||
-- please test on `main` if possible
|
||||
-- otherwise, remove this line and set `version = '*'`
|
||||
build = 'cargo build --release',
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
opts = {
|
||||
servers = {
|
||||
lua_ls = {},
|
||||
gdscript = {
|
||||
cmd = { 'ncat', '127.0.0.1', '6005' },
|
||||
name = 'godot',
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local lspconfig = require 'lspconfig'
|
||||
for server, config in pairs(opts.servers) do
|
||||
-- passing config.capabilities to blink.cmp merges with the capabilities in your
|
||||
-- `opts[server].capabilities, if you've defined it
|
||||
config.capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||
lspconfig[server].setup(config)
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Reference in New Issue