quangnguyen30192 / cmp-nvim-tags Goto Github PK
View Code? Open in Web Editor NEWtags sources for nvim-cmp
License: Apache License 2.0
tags sources for nvim-cmp
License: Apache License 2.0
Hi, it is stuck/draggy when using tags as cmp source. Is it possible to async or optimize the performance?
I'm using cmp-nvim-tags
with vim-gutentags
and in typescript files(tsx) I have cursor freeze when I'm typing more then 4 symbols.
Source config:
sources = cmp.config.sources({
{ name = 'tags', max_item_count = max_item_count },
}),
As in the trouble shooting issue, the performance problem happened after nvim-0.9
is very likely caused by neovim setting tagfunc to vim.lsp.tagfunc
, we shouldn't change the default option, and instead we should only provide a way to alternate the behavior and add updates to the troubleshooting section.
The setup assumes that all info is 1. given by vim-gutentags or 2. self-contained in the file.
If one needs to work with incomplete tags info, the typical workaround is to open a buffer (of any size) to make the default vim inbuld C-n
/C-p
search through those.
However, nvim-cmp
with default autocompletion overlaps those keymaps.
The alternative is to use vim-gutentags to enforce by path settings that everything relevant is contained in the tags files.
cmp-nvim-tags/lua/cmp_nvim_tags/init.lua
Line 57 in 51cb13c
Hi
there seems to be an issue with cmp-nvim-tags and the latest Neovim Nightly build (NVIM v0.8.0-dev-nightly-8-g001f19de2):
When selecting / jumping into a ctag item the following error is prompted:
...neovim/HEAD-001f19d_1/share/nvim/runtime/lua/vim/lsp.lua:1726: in function 'buf_request'
...neovim/HEAD-001f19d_1/share/nvim/runtime/lua/vim/lsp.lua:1786: in function 'buf_request_all'
...neovim/HEAD-001f19d_1/share/nvim/runtime/lua/vim/lsp.lua:1809: in function 'buf_request_sync'
...EAD-001f19d_1/share/nvim/runtime/lua/vim/lsp/tagfunc.lua:48: in function 'query_workspace_symbols'
...EAD-001f19d_1/share/nvim/runtime/lua/vim/lsp/tagfunc.lua:71: in function <...EAD-001f19d_1/share/nvim/runtime/lua/vim/lsp/tagfunc.lua:66>
[C]: in function 'taglist'
...ig/nvim/plugged/cmp-nvim-tags/lua/cmp_nvim_tags/init.lua:9: in function 'buildDocumentation'
...ig/nvim/plugged/cmp-nvim-tags/lua/cmp_nvim_tags/init.lua:95: in function 'resolve'
...Feek/.config/nvim/plugged/nvim-cmp/lua/cmp/source.lua:348: in function 'resolve'
.../Feek/.config/nvim/plugged/nvim-cmp/lua/cmp/entry.lua:459: in function 'resolve'
...s/Feek/.config/nvim/plugged/nvim-cmp/lua/cmp/view.lua:234: in function 'fn'
...pe/.config/nvim/plugged/nvim-cmp/lua/cmp/utils/async.lua:41: in function <...pe/.config/nvim/plugged/nvim-cmp/lua/cmp/utils/async.lua:39>
This source is useful but the nvim-cmp user can't find it by topics.
Thank you.
In theory one should be able to use treesitter to get the current scope attached to the cursor and filter search results based on that.
Do there exist any experiments with performance numbers based on that approach?
It is very frustrating to get completion results for things, which are never in scope (although only a lsp can rule this out in all cases for macro resolution).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.