steelsojka / completion-buffers Goto Github PK
View Code? Open in Web Editor NEWA buffer completion source for completion-nvim
License: MIT License
A buffer completion source for completion-nvim
License: MIT License
If I have a lot comments then it pollutes the completion, by ignoring the comments the autocompletion is more accurate.
completion-nvim
have g:completion_customize_lsp_label
. It allows to use icons for labels. For example:
let g:completion_customize_lsp_label = {
\ 'Function': '',
\ 'Reference': '',
\ 'Keyword': '',
\ 'Variable': '',
\ 'Folder': '',
\ 'Snippet': '',
\ 'Operator': '',
\ 'Module': '',
\ 'Text': '',
\ 'Class': '',
\ 'Interface': '',
\}
Is it possible to respect this setting?
Currently, all buffers are being cached. It would be good to respect chain completion settings when caching.
For example, If i have this chain completion settings:
let g:completion_chain_complete_list = {
\ 'log': [
\ {'mode': '<c-n>'},
\],
\ 'default': [
\ {'complete_items': ['lsp']},
\ {'complete_items': ['buffers']},
\ ]}
I don't want to have buffers completion for log filetype, thus it shouldn't even do any caching for it.
This is especially problematic with big log files, since it caches the whole thing, and freezes neovim for several seconds, or more, depending on file size.
Hi,
i noticed that the completion is cutting of words after hitting a diacritic, f.e. "Produktivität" would only autocomplete till "Produktivit".
Regards
call plug#begin($XDG_DATA_HOME.'/nvim/plugins')
Plug 'nvim-lua/completion-nvim'
Plug 'steelsojka/completion-buffers'
cal plug#end()
autocmd bufenter * lua require'completion'.on_attach()
let g:completion_chain_complete_list = [{'complete_items': ['buffer']}]
set completeopt=menuone,noinsert
o
cal
cal
and call
The completions should not show cal
but only call
because cal is already typed.
Hallo. It seems that completion-buffers does not respect the setting g:completion_trigger_on_delete = 0
. With the following minimal vimrc the buffer-source triggers completion when deleting characters with <bs>
. The path-source however does not trigger completion.
cal plug#begin($XDG_DATA_HOME.'/nvim/plugins')
Plug 'nvim-lua/completion-nvim'
Plug 'steelsojka/completion-buffers'
cal plug#end()
au bufenter * lua require'completion'.on_attach()
let g:completion_auto_change_source = 1
let g:completion_trigger_on_delete = 0
let g:completion_chain_complete_list = [
\{ 'complete_items': ['path'] },
\{ 'complete_items': ['buffer'] },
\]
se completeopt=menuone,noinsert
This is annoying... fix it
After neovim update I experiencing the following error:
|| Error detected while processing
pack\plugins\opt\completion-buffers\after\plugin\completion_buffers.vim|1|
|| E5108: Error executing lua ...ack\plugins\opt\completion-nvim\lua\completion\hover.lua:250: attempt to index field 'handlers' (a nil value)
Hi!
Is this meant to work that it gives completions on words from buffers.
I added this to my init.vim and installed using vim-plug.
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-lua/completion-nvim'
Plug 'steelsojka/completion-buffers'
:lua << EOF
completion_chain_complete_list = {
{ complete_items = { 'lsp' } },
{ complete_items = { 'buffers' } },
{ mode = { '<c-p>' } },
{ mode = { '<c-n>' } }
}
EOF
But it doesnt give any options from normal buffers. I've set lsp to work with python and it works so I am wondering if I've misunderstood how to configure this.
Thank you a lot for the plugin!
But I noticed that using this plugin with large ones causes freezing. It would be nice to have the ability to ignore files that bigger then specific number of lines. Something like g:completion_word_ignored_ft
.
Since doing a lot of work with extended latin characters, I notice that lua lsp buffer completion is not working with these. The characters I am working with are indicated below. Please note that these characters are available on a wide variety of terminal fonts for example adobe-code-pro, cousine, notosans, déjavu, etc,
I have checked with neovim nightly with zero configuration, and the regular ctrl-p tab will complete words with those characters.
If I have only the words 'mɔgɔ' and 'test' in my file and on a new line i type m, press ctrl-p and tab with regular completion the word mɔgɔ will be completed. However with lsp buffer completion, there is is menu of course but the word is not listed.
File contents:
mɔgɔ
test
(after pressing ctrl-p the completion menu is as follows:)
mailto Email
mailto UltiSnips
menu UltiSnips
test Buffers
Config snippet
local opts = { noremap=true, silent=true }
vim.o.shortmess = vim.o.shortmess .. 'c'
vim.o.completeopt = 'menuone,noinsert,noselect'
vim.g.completion_enable_auto_popup = 0
vim.g.completion_matching_strategy_list = {'exact', 'substring', 'fuzzy', 'all'}
vim.g.completion_enable_snippet = 'UltiSnips'
-- Chain completion list
vim.g.completion_chain_complete_list = {
default = {
default = {
{ complete_items = { 'lsp', 'snippet', 'buffers' }},
{ mode = '<c-p>'},
{ mode = '<c-n>'}},
comment = {},
string = { { complete_items = { 'path' }} }}
}
keymap file for reference:
let b:keymap_name="dyu"
highlight lCursor ctermbg=red guibg=red
loadkeymap
;o> ɔ>"0254
;O> Ɔ>"0186
;e> ɛ>"025B ``
;E> Ɛ>"0190>
;n> ɲ>"0272
;N> Ɲ>"019D-
;g> ŋ>"014B
;G> Ŋ>"014A
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.