Giter VIP home page Giter VIP logo

completion-buffers's People

Contributors

delphinus avatar haorenw1025 avatar rickysaurav avatar steelsojka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

completion-buffers's Issues

Add the ability to set label test

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?

Respect chain completion settings when caching results

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.

Completion breaking with diacritic

Hi,

i noticed that the completion is cutting of words after hitting a diacritic, f.e. "Produktivität" would only autocomplete till "Produktivit".

Regards

Word under cursor appears in completion

Minimal vimrc

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

Steps to reproduce

  1. Open minimal vimrc
  2. Enter new line with o
  3. Type cal
  4. Notice how the completion shows cal and call

Expected behavior

The completions should not show cal but only call because cal is already typed.

g:completion_trigger_on_delete=0 is not respected

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

Error on latest neovim master

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)

How to configure? LSP should be working but buffer completions

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.

Add the ability to ignore big files

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.

Not completing words with extended latin characters

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   

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.