-
Notifications
You must be signed in to change notification settings - Fork 56
Popup every time asking about Request Actions
#88
Comments
You can set |
You;re probably setting it worng. What does your lspconfig look like? |
-- IMPORTANT: make sure to setup neodev BEFORE lspconfig
require("neodev").setup({
-- add any options here, or leave empty to use the default settings
})
-- then setup your lsp server as usual
local lspconfig = require("lspconfig")
-- example to setup sumneko and enable call snippets
lspconfig.sumneko_lua.setup({
settings = {
Lua = {
workspace = {
checkThirdParty = false,
},
completion = {
callSnippet = "Replace",
},
},
},
}) |
Thanks for the fast reply btw! |
that looks right to me. It's exactly the same as I set it. Do you also have a |
Oh! I realized what the issue was, I was setting it wrong! Super sorry for not doing my due diligence! |
For anyone that finds this in the future, setting it as shown above works fine. My issue was unrelated in my config, writing over that configuration. |
Glad you got it fixed! |
Spent a couple hours running up against an issue with this behavior and wanted to post a specific example of how In my case, it wasn't really the order of plugins loading, but that I called My config goal was Click to expand the spec that reproduces this issue spec={
{
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
{ "folke/neodev.nvim",opts={} }
},
config = function()
---@diagnostic disable-next-line: missing-parameter
local runtime_path = vim.split(package.path, ";")
table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua")
require'lspconfig'.lua_ls.setup({
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
path = runtime_path,
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {'vim'},
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false,
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
completion = {
callSnippet = "Replace",
},
},
},
})
end
},
{
"hrsh7th/nvim-cmp",
event = "VeryLazy",
dependencies = {
'hrsh7th/cmp-nvim-lsp', -- no setup()
'hrsh7th/cmp-buffer', -- no setup()
'hrsh7th/cmp-path', -- no setup()
'hrsh7th/cmp-cmdline', -- no setup()
},
config = function()
local cmp = require'cmp'
-- without noselect, nvim-cmp breaks C-X_C-L and C-X_C-P completion.
-- See issue #1326 in hrsh7th/nvim-cmp github
vim.opt.completeopt = 'menu,menuone,noselect'
-- Global setup.
cmp.setup({
mapping = cmp.mapping.preset.insert({
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}),
sources = cmp.config.sources(
{
{ name = 'nvim_lsp' },
{ name = 'luasnip' }, -- For luasnip users.
},
{
{ name = 'buffer' },
}
)
})
-- `/` cmdline setup.
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- `:` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' , keyword_pattern=[=[[^[:blank:]\!]*]=] }
})
})
-- Setup lspconfig.
local capabilities = require('cmp_nvim_lsp').default_capabilities()
require('lspconfig')["lua_ls"].setup {
capabilities = capabilities
}
end,
},
},
Reader, it was not fine. Notice that there are 2
To fix
|
With the default config from the README, I get
This message every time I load a lua file in my nvim config. No matter what I select, the popup continues to happen. It goes away once I remove the neodev setup call and just have the lspconfig setup.
I've tried adding the
checkThirdParty = false
field in theworkpace
field in the lspconfig setup call, but it makes no difference. Am I doing something wrong?Thanks for the plugin and all the hard work! Sorry If i missed something dumb!
The text was updated successfully, but these errors were encountered: