Skip to content

Instantly share code, notes, and snippets.

@meirish
Last active May 24, 2019 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meirish/639e6def0f352f63fef662dce3ca2f98 to your computer and use it in GitHub Desktop.
Save meirish/639e6def0f352f63fef662dce3ca2f98 to your computer and use it in GitHub Desktop.
Unstable language server for neovim

Install https://github.com/neoclide/coc.nvim and be sure to check out the test to check if neovim works with floating windows detailed here: https://github.com/neoclide/coc.nvim/wiki/F.A.Q#how-to-make-preview-window-shown-aside-with-pum

Checkout component-context-info branch from https://github.com/lifeart/ember-language-server and compile it.

Run npm install -g vscode-languageserver

Open nvim and do :CocConfig and copy and paste the file below, changing the module path to where you checked out ember-langauage-server.

// edit this file by doing :CocConfig after coc.nvim is installed
{
"languageserver": {
"ember": {
// local, absolute path to start-server.js from unstable-language-server
"module": "/Users/meirish/code/ember-language-server/lib/start-server.js",
"args": ["--node-ipc"],
"filetypes": [
"hbs",
"html.handlebars",
"handlebars",
"typescript",
"javascript"
],
"rootPatterns": ["ember-cli-build.js"],
"requireRootPattern": true,
"trace.server": "verbose",
// Used for debugging
//"execArgv": ["--nolazy", "--inspect-brk=8045"],
"initializationOptions": {},
"settings": {}
}
}
}
@lifeart
Copy link

lifeart commented May 23, 2019

You need component-context-info branch from lifeart/ember-language-server

@NullVoxPopuli
Copy link

NullVoxPopuli commented May 23, 2019

I've made some progress:

npm install -g vscode-languageserver

my filetypes:

      "filetypes": [
        "hbs",
        "html.handlebars",
        "handlebars",
        "typescript",
        "javascript"
      ],

right now I'm fighting Ale, so I need to figure out how to disable it for hbs, or maybe entirely for ember projects.
Additionally, {{this. doesn't give me completions other than the default local scope stuff

@meirish
Copy link
Author

meirish commented May 23, 2019

👍 - awesome thanks - updated the gist based on your feedback

@NullVoxPopuli
Copy link

I committed some of my changes NullVoxPopuli/dotfiles@c1ef84e
still needs some work / config. but it's getting there.
I'm hoping we can make a coc-ember package out of all this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment