Giter Club home page Giter Club logo

coc-ccls's Introduction

coc-ccls

This is the coc.nvim extension for ccls.

This extension is still in pre-release development and is not ready for use. Track progress in this issue thread.

For the meantime, the following configuration for coc.nvim works very nicely for CCLS (copied from the coc.nvim wiki):

  "languageserver": {
    "ccls": {
      "command": "ccls",
      "filetypes": ["c", "cpp", "objc", "objcpp"],
      "rootPatterns": [".ccls", "compile_commands.json", ".vim/", ".git/", ".hg/"],
      "initializationOptions": {
         "cache": {
           "directory": "/tmp/ccls"
         }
       }
    }
  }

The original vscode-ccls project is fairly limited and offers few benefits over the above configuration at the time of writing.

Goals for this project include:

  • bundling binaries for CCLS to automate installation

See:

coc-ccls's People

Contributors

amezin avatar daandemeyer avatar highcommander4 avatar icylogic avatar jacobdufault avatar jacobdufault-google avatar jhasse avatar joelhock avatar leszekswirski avatar maskray avatar maxattax97 avatar niklasb avatar rianneogi avatar riatre avatar sangjinhan avatar walter-erquinigo avatar yanpas 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

coc-ccls's Issues

uncaughtException Error: spawn ccls ENOENT

Observed behavior

// CocOpenLog in debug mode
// console.log() in coc-ccls->lib/serverContext.js->initClient->cp.spawn
2020-04-15T09:47:14.960 DEBUG (pid:738550) [extension-coc-ccls] - ["ccls",[],{"cwd":"file:///home/user/.vim/plugged/coc.nvim","env":{"PATH":"/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin"}}]
2020-04-15T09:47:14.964 ERROR (pid:738550) [server] - uncaughtException Error: spawn ccls ENOENT    
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)    
    at onErrorNT (internal/child_process.js:415:16)    
    at process._tickCallback (internal/process/next_tick.js:63:19)

Even if I hardcode this, (note that PATH contains only one directory):

const child = cp.spawn('/usr/bin/ccls', args, { env: { PATH: '/usr/bin' } });

I get another bug:

2020-04-15T10:22:16.521 ERROR (pid:741649) [extensions] - Error: Language client is not ready yet    
    at LanguageClient.onNotification (/home/javier/.vim/plugged/coc.nvim/build/index.js:56763:19)    
    at new InactiveRegionsProvider (/home/javier/.config/coc/extensions/node_modules/coc-ccls/lib/inactiveRegions.js:25:21)    
    at ServerContext.<anonymous> (/home/javier/.config/coc/extensions/node_modules/coc-ccls/lib/serverContext.js:203:31)    
    at Generator.throw (<anonymous>)    
    at rejected (/home/javier/.config/coc/extensions/node_modules/coc-ccls/lib/serverContext.js:5:65)

Expected behavior

Not to throw any error

Steps to reproduce

Run nvim and activate coc-ccls extension

System information

  • ccls version: 0.20190823.5-1.fc31
  • OS: Fedora 31
  • Editor: nvim 0.4.3
  • coc-nvim version: 0.0.78
  • coc-ccls version: 0.0.5
$ which ccls
/usr/bin/ccls

source languageserver.ccls timeout after 5000ms

I was using coc-ccls just fine 2 days ago, now booting vim and coc-ccls won't work anymore showing the error "source languageserver.ccls timeout after 5000ms".

Any clue to what I should look into to fix this?

Is this extension in a usable state?

I've been using vim 8.1 with coc and ccls for a while now and find it a very productive combination.

I saw this extension and thought I would give it a try. After installing it and openning a .cpp file with vim, nothing happens. ccls is not started and there is nothing in CocInfo nor the coc log file.

Am I missing something basic?

Thanks

extension "coc-ccls" doesn't contain main file

I accidentally delete my neovim plugged directory and when I try to open neovim again I get this message

extension "coc-ccls" doesn't contain main file

Expected behavior

No error message.

System information

  • OS: Ubuntu 18.04
  • Editor: neovim

Unable to load global extension

Observed behavio

Every time I open neovim do I get greeted by the following message:

[coc.nvim] Unable to load global extension at /home/daniel/.config/coc/extensions/node_modules/coc-ccls: main
 file ./lib/extension.js not found, you may need to build the project.

Steps to reproduce

I installed coc-ccls with CocInstall <package name>, edited my config

{
	"coc.preferences.formatOnSaveFiletypes": ["js", "jsx"],
	"eslint.run": "onType",
	"eslint.autoFix": true,
	"languageserver": {
			"ccls": {
				"command": "ccls",
				"filetypes": ["c", "cpp", "objc", "objcpp"],
				"rootPatterns": [".ccls", "compile_commands.json", ".vim/", ".git/", ".hg/"],
				"initializationOptions": {
					 "cache": {
						 "directory": "/tmp/ccls"
					 }
				 }
			}
		},
    "java.home": "/usr/lib/jvm/java-11-openjdk/",
    "java.format.settings.url": "/home/daniel/.config/coc/extensions/node_modules/redhat.java/eclipse-formatter.xml"

}

I've tried to update, rebuild, reinstall the plugin without any luck.

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.