Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

omnifunc doesn't provide completions when language server gives back filterText #21418

Closed
tinhajj opened this issue Dec 14, 2022 · 3 comments
Closed
Labels
bug issues reporting wrong behavior lsp

Comments

@tinhajj
Copy link

tinhajj commented Dec 14, 2022

Neovim version (nvim -v)

0.8.1

Language server name/version

tsserver 2.0.0 and beyond

Operating system/version

windows and mac

Steps to reproduce using "nvim -u minimal_init.lua"

my minimal_init.lua

comment the '--cmd =' line depending on if you're on unix or windows.

vim.lsp.set_log_level("debug")

local start = function()
	vim.lsp.start({
		name = 'typescript language server',
		--cmd = {'cmd.exe', '/C', 'typescript-language-server', '--stdio'},
		cmd = {'typescript-language-server', '--stdio'},
		root_dir = vim.fs.dirname(vim.fs.find({'tsconfig.json'}, { upward = true })[1]),
	})
end

vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
	pattern = {"*.ts"},
	callback = start,
})

When I try and do omnifunc completions on a string type or array type I get back no results. When I check the LspLogs I do see that tsserver is giving back results. I think somehow the 'prefix' is getting confused and nvim is inadvertently filtering all the completion items.

Heres a zip that has the minimal_init.lua and the typescript project I was testing with in main.ts on my windows machine
tstest.zip

Expected behavior

Expected the completion items to show up

Actual behavior

All completion items were filtered out

Log file

https://gist.github.com/tinhajj/1d9f2f6378cba52d38ee6587e5f1ab71

@tinhajj tinhajj added bug issues reporting wrong behavior lsp labels Dec 14, 2022
@tinhajj
Copy link
Author

tinhajj commented Jan 9, 2023

Is anyone able to copy my steps and reproduce?

@tinhajj tinhajj closed this as completed Jan 9, 2023
@tinhajj
Copy link
Author

tinhajj commented Jan 9, 2023

Reopening misclicked

@tinhajj tinhajj reopened this Jan 9, 2023
@mfussenegger
Copy link
Member

As far as I can tell this is fixed on master. If not, please shout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior lsp
Projects
None yet
Development

No branches or pull requests

2 participants