Comments (9)
Ok now I understand that it only works in split view because both buffers are active then. Thanks for your help!
![Bildschirmfoto 2024-05-24 um 08 57 23](https://private-user-images.githubusercontent.com/309304/333485263-6649e858-d199-4c7d-bd3d-d2385b291fcb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzNjk2MzksIm5iZiI6MTcxODM2OTMzOSwicGF0aCI6Ii8zMDkzMDQvMzMzNDg1MjYzLTY2NDllODU4LWQxOTktNGM3ZC1iZDNkLWQyMzg1YjI5MWZjYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxNFQxMjQ4NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iZTI5N2U3ZDJlYzliZDc3N2NhNDhmOTZmYzM2NzVhNmU0YWNiYmFmMTdiMjU4ZDg1ZTYwZTQ5ZmJhNjQ5YTFiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.p7F-0iP2rbwUOMWhxQlyAWmvh4faMV1Wy4IiHBDFVIg)
from coc.nvim.
Use coc-sh
:
![image](https://private-user-images.githubusercontent.com/345274/332729027-a5c5c8bf-31a4-4c1e-8705-635282bda0b7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzNjk2MzksIm5iZiI6MTcxODM2OTMzOSwicGF0aCI6Ii8zNDUyNzQvMzMyNzI5MDI3LWE1YzVjOGJmLTMxYTQtNGMxZS04NzA1LTYzNTI4MmJkYTBiNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxNFQxMjQ4NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yYTJmYWQ5MzE4YmIyZTk0YTRhY2Y4NzVjZjJjNjNkZTAwNDE1Y2E3YzczMTU5MjcwNjg3NzQ2YWNmNDlmYjZiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.AczWykG6751e5x1_L63Vtzf2uvI1KQlXPnrDOVYv0zU)
from coc.nvim.
@fannheyward Thanks for the quick answer. Is there a way to do this without the coc-sh
languageserver extension ?
My mistake I should have noted that I'm searching a more general way, e.g specify a newline separated file as completion source.
from coc.nvim.
![image](https://private-user-images.githubusercontent.com/345274/332738381-08db4b9e-ba9b-40ca-82f2-16c4835d235f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzNjk2MzksIm5iZiI6MTcxODM2OTMzOSwicGF0aCI6Ii8zNDUyNzQvMzMyNzM4MzgxLTA4ZGI0YjllLWJhOWItNDBjYS04MmYyLTE2YzQ4MzVkMjM1Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxNFQxMjQ4NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03NDgyOTY0ZTlhOTUxOGI5YmQwYzc4MGQ1YmY4MjIzMDMzNTA2NDYzMmNhMjhiMjBjZjQ5NmM5NjhlOTMyODc1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.kZOLiBXkH4c4wwM1oeN0nVzyw9D4GARdHJb4nJbT_OI)
Open my.env
in another buffer, coc.nvim will provide completion item from buffer source.
from coc.nvim.
Hmm, unfortunately this doesn't work for me. Any ideas ?
[[email protected]:~/.vim/pack/vendor/start/coc.nvim]# git log
commit a0f3e2c1b13157a25063b32b49debf46cc96a873 (grafted, HEAD -> release, origin/release)
Author: Heyward Fann <[email protected]>
Date: Mon Mar 11 10:59:55 2024 +0800
commit 84ce03120925c980288665028aedcf06f6cb837e
[[email protected]:~]# vim --version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Nov 24 2023 11:25:06)
Included patches: 1-2127
Compiled by Alpine Linux
Huge version without GUI. Features included (+) or not (-):
+acl +file_in_path +mouse_urxvt -tag_any_white
+arabic +find_in_path +mouse_xterm -tcl
+autocmd +float +multi_byte +termguicolors
+autochdir +folding +multi_lang +terminal
-autoservername -footer -mzscheme +terminfo
-balloon_eval +fork() +netbeans_intg +termresponse
+balloon_eval_term -gettext +num64 +textobjects
-browse -hangul_input +packages +textprop
++builtin_terms +iconv +path_extra +timers
+byte_offset +insert_expand -perl +title
+channel +ipv6 +persistent_undo -toolbar
+cindent +job +popupwin +user_commands
-clientserver +jumplist +postscript +vartabs
-clipboard +keymap +printer +vertsplit
+cmdline_compl +lambda +profile +vim9script
+cmdline_hist +langmap -python +viminfo
+cmdline_info +libcall +python3/dyn +virtualedit
+comments +linebreak +quickfix +visual
+conceal +lispindent +reltime +visualextra
+cryptv +listcmds +rightleft +vreplace
+cscope +localmap +ruby/dyn +wildignore
+cursorbind +lua/dyn +scrollbind +wildmenu
+cursorshape +menu +signs +windows
+dialog_con +mksession +smartindent +writebackup
+diff +modify_fname -sodium -X11
+digraphs +mouse -sound +xattr
-dnd -mouseshape +spell -xfontset
-ebcdic +mouse_dec +startuptime -xim
+emacs_tags -mouse_gpm +statusline -xpm
+eval -mouse_jsbterm -sun_workshop -xsmp
+ex_extra +mouse_netterm +syntax -xterm_clipboard
+extra_search +mouse_sgr +tag_binary -xterm_save
-farsi -mouse_sysmouse -tag_old_static
system vimrc file: "/etc/vim/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Os -fstack-clash-protection -Wformat -Werror=format-security -fno-plt -flto=auto -D_REENTRANT -U_FORTIFY_SOURCE -
D_FORTIFY_SOURCE=1
Linking: gcc -Wl,--as-needed,-O1,--sort-common -Wl,-z,pack-relative-relocs -L/usr/local/lib -o vim -lm -lncurses
![Bildschirmfoto 2024-05-23 um 11 38 01](https://private-user-images.githubusercontent.com/309304/333135282-1beeb03c-d6f1-478a-bdf6-c7d453ece349.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzNjk2MzksIm5iZiI6MTcxODM2OTMzOSwicGF0aCI6Ii8zMDkzMDQvMzMzMTM1MjgyLTFiZWViMDNjLWQ2ZjEtNDc4YS1iZGY2LWM3ZDQ1M2VjZTM0OS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjE0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYxNFQxMjQ4NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hNDc3OTY5M2M2M2MyNjNkZWFkOTUwNzk1ZWYzMWJjMDUwYWUxYjMxNDRkYjMzZDczMGQ4ZDgxNzkyNDNlNzI5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.ivl-9FTkKQPbobF4nLIqSOqzp-_PUfSobuySsNx3ELs)
from coc.nvim.
Can't reproduce, the :CocList sources
already has buffer
source. Try minimal vimrc.
from coc.nvim.
Can't get it working on alpine, even with a minimal vimrc.
(NOTE for myself: buffer resource is builtin. See also https://github.com/neoclide/coc.nvim/wiki/Completion-with-sources#bundled-sources)
I've also tested it in a debian:latest container with the default vimrc and latest coc.nvim from the release branch but the buffer completion only completes from the active buffer.
c=$(buildah from debian:latest)
buildah run $c /bin/bash
apt-get update
apt-get install vim nodejs git
mkdir -p ~/.vim/pack/vendor/start
cd ~/.vim/pack/vendor/start
git clone https://github.com/neoclide/coc.nvim.git --branch release
cd
#
vim myscript.sh my.env
from coc.nvim.
Can't reproduce, the
:CocList sources
already hasbuffer
source. Try minimal vimrc.
Did you try it yourself with a minimal vimrc and emtpy coc settings ?
from coc.nvim.
buffer completion only completes from the active buffer
Yes, this is expected, coc.nvim needs to active a buffer first before to use as completion source.
from coc.nvim.
Related Issues (20)
- Hover/docstring information with custom sources HOT 2
- 为什么会代码提示会提示两次? HOT 5
- [coc.nvim] Server languageserver.ccls failed to start: Error: expected rootUri HOT 1
- Failed open exsit file with list in vim HOT 5
- The text above get seleted automatically HOT 2
- The documentation has incorrect installation instructions for NeoBundle HOT 1
- How to remove the highlights when using go references HOT 3
- LinkedEditing not work in vim HOT 1
- <CR> can not confirm in vimwiki and folding codes failed HOT 4
- coc.nvim takes up two shortcut keys that I prefer to use. HOT 1
- Error on notification "codeAction": code action without data HOT 4
- Asynchronous Completion for `isIncomplete` Items in coc.nvim
- FEAT: Disable all formatting and linting except for what is output by the `languageservers` in coc-settings.json HOT 2
- organizeImport stopped working for months HOT 10
- 执行`rust-analyzer.reload`后报错 HOT 1
- Incorrect cwd when call vim with '-c cd xxx'
- Cannot confirm autocomplete from non-LSP sources HOT 3
- Using Arduino Language Server
- How to Combine coc-snippets and coc.nvim Configurations to Achieve Desired Tab Key Behavior HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc.nvim.