Comments (7)
One more question I'm just curious, I've installed neovim/nvim-lspconfig
and also well configured the gralde_ls
, and it works in :LspInfo
, but seems coc still using the own groovy lsp instead of nvim-lspconfig
.
Here my gradlels
details:
# install gradlels in system
$ mkdir -p ~/.vim/lsp
$ git clone https://github.com/microsoft/vscode-gradle.git ~/.vim/lsp/vscode-gradle && cd $_
$ ./gradlew installDist
$ sudo ln -sf /opt/lsp/gradle-language-server/build/install/gradle-language-server/bin/gradle-language-server /usr/local/bin/
$ which -a gradle-language-server
/usr/local/bin/gradle-language-server
vim settings:
Plug 'neovim/nvim-lspconfig'
lua settings:
-- ~/.config/nvim/init.lua
require('config/lsp')
-- ~/.config/nvim/lua/config/lsp.lua
require'lspconfig'.gradle_ls.setup{
filetypes = { 'groovy', 'Jenkinsfile' }
}
from coc.nvim.
cd .vim; nvim ~/a.groovy
In this case, coc uses your current folder as workspace root, here's .vim
, sends to groovy language server. But language server couldn't find your file in workspace, won't work. Most language server needs workspace to work, you should start vim in it.
coc still using the own groovy lsp instead of nvim-lspconfig
coc didn't use language server from nvim-lspconfig.
from coc.nvim.
Hi @fannheyward , any suggestion to setup the global workspace root?
And will you considering have configurable lsp for filetype?
i.e.: I'm using groovy and Jenkinsfile most of time, I'd like to mapping Jenkinsfile to using groovy LSP as well, and using gradle_ls
( /usr/local/bin/gradle-language-server
) as first priority LSP ?
from coc.nvim.
- LSP always needs a workspace to work, no global one.
- Some language server can work in single file mode, this needs language server support.
from coc.nvim.
I'm kinda understand. So, coc.nvim is pretty much something similar with hrsh7th/nvim-cmp, another autocompletion engine. in coc.nvim all lsp are highly integrated via CocInstall coc-..
, so I don't have to investigate or manual install every single lsp how to enable/setup/install/configure.
So, pretty much coc.nvim = nvim-cmp + nvim-cmp-lsp + nvim-lspconfig ?
Will you considering have configurable lsp for filetype, I mean coc-xxx
as second priority, and using something manual installed as first priority.
from coc.nvim.
pretty much coc.nvim = nvim-cmp + nvim-cmp-lsp + nvim-lspconfig ?
Yes, and more.
configurable lsp for filetype, I mean coc-xxx as second priority, and using something manual installed as first priority.
Can't understand, more informations please.
from coc.nvim.
So, for example, I'd like to use gradle_ls
as LSP provider if coc-groovy
not been installed.
something pretty much like "language server setup"
And, how to mapping ft=Jenkinsfile
to using groovy LSP ?
pretty much something like:
{
"lspsettings" : {
"coc-groovy" : {
"filetype": { "groovy", "Jenkinsfile" },
"cmd" : { "/usr/local/bin/gradle-language-server", "coc-groovy" },
"autostart": true
}
}
}
so, coc will check /usr/local/bin/gradle-language-server
exists or not:
- if exist
/usr/local/bin/gradle-language-server
, using/usr/local/bin/gradle-language-server
- if
/usr/local/bin/gradle-language-server
cannot be found, usecoc-groovy
btw: coc-groovy
can be any of commands like java -jar /path/to/groovy-language-server-all.jar
, or default
means coc-groovy
, or anything.
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
- help: completion of variables from dotenv files in shell scripts HOT 9
- <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.