nvim-lua / completion-nvim Goto Github PK
View Code? Open in Web Editor NEWA async completion framework aims to provide completion to neovim's built in LSP written in Lua
License: Apache License 2.0
A async completion framework aims to provide completion to neovim's built in LSP written in Lua
License: Apache License 2.0
Hi,
the plugin works great on my local machine. But after setting it up on ssh (with fresh installs of dotnet and nvim-lsp + pyls_ms) I continuously run into
/nvim/plugged/completion-nvim//lua/completion/hover.lua:344: attempt to call field 'make_text_document_params' (a nil value)
The LSP is working (linting, vim.lsp.buf.'function' for renaming, go-to definition, hover, etc.), but - as you'd expect from the error - hover at completion does not work.
Many thanks for your help!
Versions:
NVIM v0.5.0-477-gf9055c585
dotnet - v3.1.3 SDK
I've tried the following with a minimal example.
nvim -u test.vim pyproj/test.py
test.vim:
let g:python3_host_prog = '/home/inco/.pyenv/shims/python'
call plug#begin('~/.vim/plugged')
Plug 'neovim/nvim-lsp'
Plug 'haorenW1025/completion-nvim'
call plug#end()
lua require'nvim_lsp'.pyls.setup{on_attach=require'completion'.on_attach}
au Filetype python setl omnifunc=v:lua.vim.lsp.omnifunc
" Use <Tab> and <S-Tab> to navigate through popup menu
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" Set completeopt to have a better completion experience
set completeopt=menuone,noinsert,noselect
Checkhealth tells me plys and everything else works.
I've created a virtual environment for neovim. Maybe it helps to reproduce what's wrong.
ArchLinux specific:
# pacman -S pyenv
yay -S pyenv-virtualenv
Create and activate virtual environment for python 3.7
pyenv install 3.7.7
pyenv virtualenv 3.7.7 neovim3
pyenv activate neovim3
Install related packages for neovim and pyls
pip install --upgrade pip
pip install neovim
pip install 'python-language-server[all]'
pip install -U setuptools
pip install pyls-mypy pyls-isort pyls-black
python -m pyls --help
which python
Add the vitrual python path to the neovim host config
let g:python3_host_prog = '/home/inco/.pyenv/shims/python'
When i type no autocompletion starts.
I guess import
should already expandable on imp
.
PS: When i use your current configuration the completion on .vim files works perfectly.
Hi @haorenW1025 , firstly thank you for super completion plugin. I use it on daily basis for home and work tasks.
Unfortunately, when i try to complete path for example: "~/Directory/With spaces/", the Directory
part is suggested correctly but completion of inner directory is divided into two suggestions: 'With', 'spaces'.
I tried look to source code and it seems that you use system ls
command to retrieve list of files/directories and after that you match listed files by %S+
which matches only one word without spaces. Pity i can't help since i don't know lua language.
Also sorry for my English language :)
I'm attempting to make the switch from deoplete-lsp
to this plugin (nice work, by the way), but I'm having some difficulties getting completion working.
In a mostly clean (no plugins, some config) runtime of nvim v0.5.0-482-ga6071ac04
, the completion menu doesn't appear as I type. I have verified that I have an attached client, unlike the problem described in #46, and I can confirm that my language server is sending responses to completion requests. There are two things that I notice:
:lua print(vim.inspect(vim.lsp.buf_get_clients()))
Error executing vim.schedule lua callback: shared.lua:486: s: expected string, got userdata
This particular language server works with deoplete-lsp
and another VSCode client, but just in case it could be useful, the completion response is attached below.
If I can provide more info please let me know.
Content-Type: application/vscode-jsonrpc; charset=utf8
Content-Length: 4292
{"id":10,"result":{"isIncomplete":false,"items":[{"label":"getUri","kind":2,"detail":"public getUri(): string","documentation":"","sortText":null,"filterText":null,"insertText":"getUri","textEdit":null,"additionalTextEdits":null,"command":null,"data":null,"insertTextFormat":1},{"labe
l":"getSource","kind":2,"detail":"public getSource(): string","documentation":"","sortText":null,"filterText":null,"insertText":"getSource","textEdit":null,"additionalTextEdits":null,"command":null,"data":null,"insertTextFormat":1},{"label":"getNodes","kind":2,"detail":"public getNod
es(): array","documentation":"\/**\n * @return NodeAbstract[]\n *\/","sortText":null,"filterText":null,"insertText":"getNodes","textEdit":null,"additionalTextEdits":null,"command":null,"data":null,"insertTextFormat":1},{"label":"getNodesAtCursor","kind":2,"detail":"public getNodesAtC
ursor(LanguageServer\\CursorPosition $cursorPosition): array","documentation":"\/**\n * @return NodeAbstract[]\n *\/","sortText":null,"filterText":null,"insertText":"getNodesAtCursor","textEdit":null,"additionalTextEdits":null,"command":null,"data":null,"insertTextFormat":1},{"label"
:"getNodesBesideCursor","kind":2,"detail":"public getNodesBesideCursor(LanguageServer\\CursorPosition $cursorPosition): array","documentation":"\/**\n * @return NodeAbstract[]\n *\/","sortText":null,"filterText":null,"insertText":"getNodesBesideCursor","textEdit":null,"additionalText
Edits":null,"command":null,"data":null,"insertTextFormat":1},{"label":"getClassName","kind":2,"detail":"public getClassName(): string","documentation":"","sortText":null,"filterText":null,"insertText":"getClassName","textEdit":null,"additionalTextEdits":null,"command":null,"data":nul
l,"insertTextFormat":1},{"label":"getMethod","kind":2,"detail":"public getMethod(string $methodName): PhpParser\\Node\\Stmt\\ClassMethod","documentation":"","sortText":null,"filterText":null,"insertText":"getMethod","textEdit":null,"additionalTextEdits":null,"command":null,"data":nul
l,"insertTextFormat":1},{"label":"getClassProperty","kind":2,"detail":"public getClassProperty(string $propertyName): PhpParser\\Node\\Stmt\\Property","documentation":"","sortText":null,"filterText":null,"insertText":"getClassProperty","textEdit":null,"additionalTextEdits":null,"comm
and":null,"data":null,"insertTextFormat":1},{"label":"findNodes","kind":2,"detail":"public findNodes(string $class): array","documentation":"\/**\n * @return NodeAbstract[]\n *\/","sortText":null,"filterText":null,"insertText":"findNodes","textEdit":null,"additionalTextEdits":null,"c
ommand":null,"data":null,"insertTextFormat":1},{"label":"searchNodes","kind":2,"detail":"public searchNodes(callable $criteria): array","documentation":"\/**\n * @return NodeAbstract[]\n *\/","sortText":null,"filterText":null,"insertText":"searchNodes","textEdit":null,"additionalText
Edits":null,"command":null,"data":null,"insertTextFormat":1},{"label":"getUseStatements","kind":2,"detail":"public getUseStatements(): array","documentation":"\/**\n * @return NodeAbstract[]\n *\/","sortText":null,"filterText":null,"insertText":"getUseStatements","textEdit":null,"add
itionalTextEdits":null,"command":null,"data":null,"insertTextFormat":1},{"label":"getConstructorNode","kind":2,"detail":"public getConstructorNode(): PhpParser\\Node\\Stmt\\ClassMethod","documentation":"","sortText":null,"filterText":null,"insertText":"getConstructorNode","textEdit":
null,"additionalTextEdits":null,"command":null,"data":null,"insertTextFormat":1},{"label":"getNamespace","kind":2,"detail":"public getNamespace(): string","documentation":"","sortText":null,"filterText":null,"insertText":"getNamespace","textEdit":null,"additionalTextEdits":null,"comm
and":null,"data":null,"insertTextFormat":1},{"label":"getCursorPosition","kind":2,"detail":"public getCursorPosition(int $line, int $character): LanguageServer\\CursorPosition","documentation":"\/**\n * Calculate the cursor position relative to the beginning of the file.\n *\n * This
method removes all characters proceeding the $character at $line\n * and counts the total length of the final string.\n *\/","sortText":null,"filterText":null,"insertText":"getCursorPosition","textEdit":null,"additionalTextEdits":null,"command":null,"data":null,"insertTextFormat":1}
]},"error":null,"jsonrpc":"2.0"}Content-Type: application/vscode-jsonrpc; charset=utf8
I'd like to not have confirm key set and just go through the menu using the default <C-n>
& <C-p>
.
Currently setting g:completion_confirm_key = ""
causes an error, It would be great if this disabled the mapping instead.
Hi! First of all, thanks for this nice plugin. Works neat!
When I'm programming in JavaScript, when suggestion for objects appear (e.g. after typing obj.
), many variables show up in the suggestions, most are of kind File
, while the ones of kind Field
(the object fields) get lost throughout all suggestions.
Now, I'm not sure what's the ideal solution, but it would be nice if kinds like Field
had priority over ones like File
, so the first suggestions that show up are the object fields.
Hi guys. Following on #52 that had an issue with vimls providing -1 as start/end of highlight range, I had a similar bug on pyls.
I'm working on a codebase I didn't write of a somewhat beginner python developer, and I had a sample similar to the following:
if True:
'''
some text
'''
print("hello_world")
On this sample of code (that shouldn't happen), pyls sends:
{
code = "W0105",
message = "[pointless-string-statement] String statement has no effect",
range = {
end = {
character = 8,
line = 3
},
start = {
character = -1,
line = 3
}
},
severity = 2,
source = "pylint"
}
The problematic line here is start.character = -1
. This value goes to the function responsible for highlighting, that throws:
Error executing vim.schedule lua callback: ...are/nvim/plugged/diagnostic-nvim/lua/diagnostic/util.lua:17: Column value outside range
Please note that this function is a copy from nvim's runtime, so without the plugin, it's neovim's identical function that throws that error:
Error executing vim.schedule lua callback: /usr/local/share/nvim/runtime/lua/vim/lsp/util.lua:628: Column value outside range
So #52 was solved by a server-side issue (that was extremely quickly fixed on vimls side), I guess this should be the preferred way to solve this issue as well (I will forward it to pyls).
However, as other cases like this one might appear, could it be interesting to find a non-intrusive way to log this error, as it was actually spamming my messages and made coding quite difficult.
P.S: I'm posting the issue here and not in diagnostic-nvim
as it follows #52.
I've been using coc.nvim for a long time. And I really like it's behaviour
That's why I use set completeopt=menuone,noinsert
instead of completeopt=menuone,noinsert,noselect
. The problem now that ultisnips does not work with these settings, snippets don't expand.
Setting let g:completion_enable_snippet = 'UltiSnips'
without ultisnips triggers the following error:
onnue : UltiSnips#SnippetsInCurrentScope
in general i dont mind these but due to the nature of the plugin, vim loops over the error and it becomes hard to quit. Maybe it could ignore the error and provide a check via checkhealth (see :help health-dev
).
Hi,
what do you think about showing selected complete item info
property as signature beside the autocompletion, in situations where it is not empty? I have a custom completion that provides info
with some details, but i'm not sure how to show it.
When using the recommended settings in the readme in order to use <Tab>
to filter through the completion options, I get odd behavior when I filter through the completion items only if there is something that already exists where I'm trying to completion. For example:
import jav@@
At this point above, I can circulate through the options with no issue, and select the one that I want.
After I complete java
, if I think attempt to continue to completion, I get odd behavior when doing completions:
import java.ti@@
Here is a couple gifs of the behavior I'm referring to:
How to reproduce
This is happening with Metals. Probably the easiest way to reproduce this would be to do the following:
LspInstall metals
, which which will install metals.build.sbt
file, nvim build.sbt
. Then you can issue a :BuildImport
command which will import the build.Expected behavior
I would expect the completions to work the same if it is a base completion or one coming after a .
I noticed today when I had my terminal split that the hover window was going off too far to the right. I'm not 100% sure what is actually causing this, but it also caused an Error
to appear as well. Here is a screen shot of what I mean for the window going too far:
The arrow is pointing towards the edge of my terminal, and see how it's cutting the floating window. Then the following Error
is appearing:
Error executing vim.schedule lua callback: ...pp/.vim/plugged/completion-nvim/lua/completion/hover.lua:220: 'width' key must be a positive Integer
If you need any help with reproduction or any more details, please let me know. I'm using this with Metals installed via LspInstall
from neovim/nvim-lsp
.
Thanks for you great work!
Some LSP servers provide a list of reasonable trigger characters as part of their completionProvider
capabilities. If this is the case, completion-nvim should use them as the default in place of .
. (See https://github.com/prabirshrestha/asyncomplete-lsp.vim/blob/5c470ae8e58c8762dc4c669b38fa5649b57f53e3/plugin/asyncomplete-lsp.vim#L30 for reference.)
Hey, Love the plugin!
Having a small problem that I'm not sure why this is happening. Whenever I type something that doesn't exist in the current buffer (or as a valid completion) I get a message on every keystroke like
|| Pattern not found
|| Pattern not found
|| Pattern not found
|| Pattern not found
Is there some configuration option you know of that I might have missed?
Completeopt is what is recommended in the setup guide.
Thanks
(This issue follows the suggestions made here)
Hello, thanks for the plugin, I'm really impatient to use it as my daily driver !
The thing is that for now it does not support neosnippets, which would be great, is it possible to implement this, and how can I help on this ?
Version info (latest versions as of today):
NVIM v0.5.0-05fd64777
LuaJIT 2.0.5
completion-nvim: d9be95662fddaee96d59c1322c751b7dffcc28cf
Full error output:
Error detected while processing /Users/matt.bailey/test.vim:
line 5:
E5108: Error executing lua ...iley/.config/nvim/plugged/completion-nvim/lua/source.lua:117: Key not found: completion_chain_complete_list
Press ENTER or type command to continue
testing vimrc (as suggested):
call plug#begin('~/.config/nvim/plugged')
Plug 'neovim/nvim-lsp'
Plug 'haorenW1025/completion-nvim'
call plug#end()
lua require'nvim_lsp'.sumneko_lua.setup{on_attach=require'completion'.on_attach}
au Filetype lua setl omnifunc=v:lua.vim.lsp.omnifunc
" Use <Tab> and <S-Tab> to navigate through popup menu
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
" Set completeopt to have a better completion experience
set completeopt=menuone,noinsert,noselect
I don't know why, but this plugin breaks the jiangmiao/auto-pairs
feature of breaking a new statement in a new line when the user presses ENTER:
Before install this plugin:
// from
it('test', () => {<cursor><CR>})
//to
it('test', () => {
<cursor>
})
After install this plugin:
// from
it('test', () => {<cursor><CR>})
//to
it('test', () => {
<cursor>})
Do you have any idea how can I solve that?
Thank you. I'm able to use the native nvim-lsp
thanks to your plugin.
It would be very helpful to be able to set up this or keep it by default.
I think:
Hi,
would you consider adding a relative file path completion as an optional source?
Something like this.
I tried adding it myself, but since i don't know lua, everything turned out to be calls to vimscript.
I don't know if you've ever tried mucomplete, but the completion mecanism there is really nice, and only using built-in features.
The way it works is it tries each completion method in a predefined list, and offers you :
It is really useful for two reasons :
Thanks for your nice and lightweight plugin!
It realy works great with nvim-lsp. I would like to integrate additional completion sources like other words in the current or other buffers, or from different tmux panes. Is there already support for these kind of sources? How can I include these?
Hi, not a critical issue but the wording is confusing:
completion-nvim requires several autocommands set up to work properly
it seems to work fine without any autocommands; the autocommand is only required for use w/o lsp. diagnostic-nvim
has the same wording, and also works fine w/o autocommands.
At random I get this error:
Error executing vim.schedule lua callback: .../nvim/pack/packager/start/completion-nvim/lua/source.lua:73: attempt to index a nil value
I can reproduce it 100% of the time by editing lua files, and for some other file types happens randomly. Note that I don't have lsp for lua set up, so maybe that's the issue.
This is my config:
let g:completion_chain_complete_list = {
\ 'default': [
\ {'complete_items': ['lsp', 'snippet', 'path']},
\ {'mode': 'tags'},
\ {'mode': 'keyn'},
\ {'mode': '<c-p>'},
\ ]}
I just used Plug without properly configuring the plugin (I know), yet it would be cool to avoid these errors:
|| Erreur détectée en traitant function completion_treesitter#highlight_usages :
|| ligne 1 :
|| E5108: Error executing lua ...l/share/nvim/site/completion-treesitter/lua/ts_utils.lua:91: attempt to index a nil value
|| Erreur détectée en traitant function completion_treesitter#highlight_usages :
|| ligne 6 :
|| E714: Liste requise
|| Erreur détectée en traitant function completion_treesitter#highlight_usages :
|| ligne 13 :
|| E5108: Error executing lua ...l/share/nvim/site/completion-treesitter/lua/ts_utils.lua:91: attempt to index a nil value
|| Erreur détectée en traitant function completion_treesitter#highlight_usages :
|| ligne 13 :
|| E714: Liste requise
|| Erreur détectée en traitant function completion_treesitter#highlight_usages :
|| ligne 15 :
|| E121: Undefined variable: l:start
|| Erreur détectée en traitant function completion_treesitter#highlight_usages :
|| ligne 15 :
|| E116: Arguments invalides pour la fonction empty
|| Erreur détectée en traitant function completion_treesitter#highlight_usages :
|| ligne 15 :
|| E15: Expression invalide : !empty(l:start) && !empty(l:end) && l:start[0] == l:end[0] && ( g:complete_ts_highlight_at_point || !(( l:start[0] + 1 ) == l:cur_line && l:start[1] < l:cur_col && ( l:end[1] + 1 ) > l:cur_col) )
Hi,
I think this is an upstream issue in neovim's lsp, but maybe you know what's exactly causing it.
I'm getting this error with vimls
.
Error executing vim.schedule lua callback: /usr/local/share/nvim/runtime/lua/vim/lsp/util.lua:641: Column value outside range
I get it when I type this:
function! s:map_item()
Once I close the parenthesis (or auto pairs does that for me, I tried both), Error appears. Error continues to appear if i continue typing abort
.
I get the following when using microsoft/python-language-server before the server is fully ready. So if I for example start typing immediately after opening a file. Seems like it's specific to ms-pyls though.
Error executing vim.schedule lua callback: ...vim/pack/packager/opt/completion-nvim/lua/source/lsp.lua:14: bad argument
#1
to 'pairs'
(table expected, got nil)
I may be totally missing something here, but I'm continually getting the same error, and I'm unsure what's causing it. I tried using the minimal test.vim
that you have in your wiki, and I still get the error.
I installed metals using the LspInstall metals
command outlined in nvim-lsp
and the only thing I have in my minimal test.vim
file is different is the following line changed for metals.
lua require'nvim_lsp'.metals.setup{on_attach=require'completion'.on_attach}
When I open a .scala
file, I can see in the server trace file that everything has started as expected but the moment I start typing I am greeted with this:
Error executing vim.schedule lua callback: /Users/ckipp/.vim/plugged/completion-nvim/lua/utility.lua:30: attempt to call field 'tbl_filter' (a nil value)
Any insight would be greatly appreciated.
I'm on:
Neovim 0.5 will be integrated to treesitter through a lua api.
As the plugin is in lua, and focused for now on Neovim 0.5, it would be great to integrate the plugin with Treesitter, to provide syntax aware completion. This plus chained completion (#4) could allow us to bring, different combinations of completion mecanisms depending on the current syntax element.
Hi,
When i initially started using the plugin with ultisnips, my snippets completion was sorted ok. Now, i noticed it's not sorted correctly. Is this something that is handled by completion-nvim or it's just printed out how ultisnips returns it?
I would expect items to be sorted like this:
cl
cla
clac
clax
clearq
click
clone
Similar to the option to enable/disable completion in comments, it would be nice with an option to also enable/disable them in strings. Mostly for the same reasons they're annoying in comments.
Hi, I just found another of your plugins.
https://github.com/haorenW1025/diagnostic-nvim
Follows the same setup how we could integrate both, thanks!
I have a setup where I use autocompletion for lsp suggestions (latex-lsp/texlab), but also rely on omnicompletion from a filetype plugin (lervag/vimtex), which has better (but slower) substring matching on menu
strings as well.
However, this no longer works when completion-nvim
is active; if I press <c-x c-o>
, the omnicomplete suggestions pop up briefly, but then vanish again. This only happens if the typed string does not match any autocomplete candidates; if it does (because some candidates start with the string), the auto-complete suggestions are correctly replaced with the omnicomplete ones.
(This doesn't happen with other autocomplete plugins like ncm2 or asyncomplete.)
Is there a way to navigate the arguments of a function that are completed?
For example for python itertools.chain
completes to:
itertools.chain(${1:*iterables})${0}
Is there a way to, after triggering completion, to move the cursor to each of the arguments? Similar to how it works for UltiSnips?
If not, can the arguments be disabled.
As it is now it takes more time to clean up than having no completion. :)
Thanks for the nice plugin!
Hi, well done for this plugin, it's excellent!
I have an issue with the signature help floating window that does not disappear is some cases. The main one happens when I add parentheses when calling a method or function and then remove these parentheses.
For example, in javascript calling console.log()
makes the floating window appears, removing the ()
does not make it disappear. It only goes away when I exit the insert mode.
I suspect it comes from this line https://github.com/haorenW1025/completion-nvim/blob/master/lua/signature_help.lua#L84 but I'm not enough familiar with vim scripting or lua to come up with the appropriate fix.
Creating this as a result of the flowing thread:
https://www.reddit.com/r/neovim/comments/fhcdzu/a_async_completion_framework_aims_to_support/
Hi,
thanks for this cool plugin!
Unfortunately does the automatic extension of snippets which are marked like that by UltiSnips not work anymore when the PUM is visible. How can I restore that?
Hi,
is there a reason to enable focus on hover windows?
It happens to me sometimes to focus it and then i need to close it manually.
Hi, thank you for this plugin! Would it be possible to implement a setting similar to let g:float_preview#docked = 1
on ncm2?
Is your feature request related to a problem? Please describe.
Current the built-in lsp support doesn't take into account that completions may have additionalTextEdits
in them. I created a feature request for this already in nvim, and you can see the suggestion for a work around here. When playing around with it I realized that you already have something pretty similar to this with your confirmCompltion()
function.
It'd be cool to also have this check for additionalTextEdits
, and if so, apply them.
Describe the solution you'd like
Piggyback off confirmCompletion()
and account for additionalTextEdits
.
Describe alternatives you've considered
Locally listen for CompleteDone
and have a function locally that does this.
Hi,
First of all, thanks for creating this plugin, I've been looking for a good, fast, and minimal autocomplete plugin for Neovim's native LSP implementation for a while, this one fits the bill nicely! :)
Just one small feature request: would it be possible add a configurable amount of delay between pressing a key and having the completion pop-up window open?
It's a little distracting to be typing away and having the box constantly flickering away below the cursor. Adding maybe 150-200ms delay would help a great deal with my focus.
Thanks.
Would like to use NeoVim LSP completion. Came across the official docs and your solution which seems to be the only completion plugin using the native LSP client.
I don't know much about NeoVim completions so I'm just trying to find my way. I have a couple of questions:
Would really appreciate some guidance, in the meantime I'll continue to educate myself.
Hi,
If I select a completion item then press left open bracket, the signature popup appears.
But if I select a completion item then press CR with g:completion_enable_auto_paren = 1
set, the parenthesis are added, but the signature popup does NOT appear.
I'm using the latest master pull, as of 2 hours ago.
Thanks!
.vimrc
let g:completion_chain_complete_list = {
\ 'default' : {
\ 'default': [
\ {'complete_items': ['lsp', 'snippet']},
\ {'mode': '<c-p>'},
\ {'mode': '<c-n>'}],
\ 'comment': [],
\ 'string': []
\ }
\ }
let g:completion_enable_auto_hover = 0
let g:completion_enable_auto_paren = 1
let g:completion_enable_auto_popup = 1
let g:completion_enable_auto_signature = 1
let g:completion_enable_snippet = 0
let g:completion_timer_cycle = 150
let g:completion_trigger_character = ['.', '::']
let g:completion_trigger_keyword_length = 2
:verbose imap cr
i <CR> *@<Cmd>call completion#wrap_completion()<CR>
Since I do not use any plugin manager I did the default procedure for installing a plugin with the build in plugin loader capabilities provided by neovim.
When neovim does the initial loading of the packages, even though they are correct on the path as it appears to me, it can not resolve the modules.
So only after neovim has completed its startup the modules can correctly be resolved.
This implies a warning each time starting nvim.
To resole this, I did the following steps - I am creating an issue instead of a pull request, since it appears to me that this is an issue of either neovim itself nor of the lsp-config's but your plugin.
be an issue of neovim, already reported:
neovim/neovim#11409
Lua: search 'packpath' from require() without :packloadall
Anyway, here I document my steps:
:packloadall
as described as an (probably temporarily) workaround in the mentioned issue above. Thats it.local tmp = package.path
local git_plug_path = '/.local/share/nvim/site/pack/git-plugins/start'
package.path = vim.loop.os_homedir() .. git_plug_path .. '/completion-nvim/lua/?.lua'
local completion = require 'completion'
package.path = tmp
Same thing is required for diagnostic-nvim. Note that you need semicolons for multiple paths. It works on the end of the string aswell
'/completion-nvim/lua/?.lua;'
It would be nice if, similar to coc.nvim
, there was an easy way to customize the labels used for various kinds of items in completion results. The most common use case of this is probably wanting to use icons rather than names for the labels.
Hi,
It seems that one of the latest Neovim commits (neovim/neovim@e6cfc1b) adds support for returning function argument snippets, which completion-nvim doesn't seem to have support for? (see pic).
Would it be a lot of work for you to implement support for this?
Or maybe there's some other plugin I can use to handle these? I tried Ultisnips but that didn't seem to work.
Thanks!
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.