1.5.42 • Published 7 months ago

coc-ember v1.5.42

Weekly downloads
19
License
MIT
Repository
-
Last release
7 months ago

ember language server extension

ember-language-server extension for coc.nvim

Install

Via Plug

Plug 'nullvoxpopuli/coc-ember', {'do': 'yarn install --frozen-lockfile'}

Or via the automatically kept up-to-date config var:

let g:coc_global_extensions = [
  \ 'coc-ember'
\ ]

Starting from Scratch

  1. For the fanciest experience, install the neovim nightly release
  2. Install vim-plug
  3. Setup your (neo|oni)vim's config:

    call plug#begin('~/.local/share/nvim/plugged')
    
      " Highlighting and language support
      Plug 'leafgarland/typescript-vim'
      Plug 'joukevandermaas/vim-ember-hbs'
    
      " CoC / Intellisense
      Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
    
    call plug#end()
let g:coc_global_extensions = [
  \ 'coc-actions',
  \ 'coc-tsserver',
  \ 'coc-css',
  \ 'coc-json',
  \ 'coc-html',
  \ 'coc-vimlsp',
  \ 'coc-highlight',
  \ 'coc-ember'
\ ]
```
  1. Restart your editor, run :PlugInstall
  2. Navigate to an ember project and open (neo|oni)vim.

Done :)

To test this out with neovim: 1. clone this repo 2. go to an ember project and run nvim . -u path/to/repo/docs/minimal-config.vim

There are two working neovim single-file configs in this repo

Additionally, @NullVoxPopuli's vim config can be found here

Features

from @lifeart's PR

  • mu, pods, classic layouts support for app models definitions lookup, including js and ts files.
  • mu, pods, classic layouts support for app transforms definitions lookup, including js and ts files.
  • addon components and helpers definitions lookup
  • AngleBracket components autocomplete (including addon-located components) for mu, pods, classic layouts.
  • go-to routes, component properties, actions for mu, pods, classic
  • go-to service declaration definition for classic components
  • go-to ember/addon import support
  • store.peekRecord, findRecord... model names autocomplete for classic
  • belongsTo, hasMany model names autocomplete for classic
  • transitionTo,.. routes autocomplete for classic
  • named: service(name) services autocomplete
  • template linting fix
  • in-repo addons lookup (for classic and mu apps)

Other Features:

  • Component and helper autocompletion for inline and sub expressions
  • Definition providers for (enable features like "Go To Definition" or "Peek Definition"):
    • Components (in Templates)
    • Helpers (in Templates)
    • Models
    • Transforms
  • Route autocompletion in link-to
  • Diagnostics for ember-template-lint (if it is included in a project)

Screenshots

Helper or Component Helpers Error

Contributing

NOTE: development will not work on Windows machines, as all the scripts are in Bash and expect *nix compatibility

  • fork repo
  • make modifications
  • Open PR <3

Testing

  • be in coc-ember root directory
  • ./scripts/prepublish.sh
  • yarn link
  • test in your own ember project via
    • :CocList extensions
    • cd to the extensions path (the folder containing a package.json, on linux: ~/.config/coc/extensions/)
    • yarn link coc-ember
    • restart (neo)vim

Debugging

NOTE: ./scripts/prepublish.sh needs be run initially. Afterwards, the following may be used to rebuild each sub-tool, depending on what you're changing.

  • yarn build:js - coc-ember
  • yarn build:addons - the UELS addons bundled with coc-ember

Generally

  • be in ember project
  • open (neo)vim

Viewing Logs

  • Optionally launch with NVIM_COC_LOG_LEVEL=debug nvim .
    • This is very verbose, but is the only way to have stack traces printed
  • :CocOpenLog to view log.
    • :e to refresh the log

Debugging Chrome Dev Tools

:let g:coc_node_args = ['--nolazy', '--inspect-brk=6045']`
:CocRestart

Then visit chrome://inspect/#devices

More info: https://github.com/neoclide/coc.nvim/wiki/Debug-coc.nvim#get-result-from-console

To use local coc-ember in your nvim

These steps are handy for reporting issues

  • in <coc-ember>
    • yarn
    • ./scripts/prepublish.sh
    • yarn link
  • in <your ember project>
    • either
      • use your own configuration
        • cd ~/.config/coc/extensions && yarn link coc-ember
        • open nvim, don't update dependencies
      • or use a minimal config
        • nvim -u <coc-ember>/docs/minimal-config.vim
        • :PlugInstall
        • cd ~/.config/coc/extensions && yarn link coc-ember
        • then back in your project: nvim -u <coc-ember>/docs/minimal-config.vim
1.5.41

7 months ago

1.5.42

7 months ago

1.5.40

11 months ago

1.5.39

1 year ago

1.5.36

2 years ago

1.5.38

2 years ago

1.5.37

2 years ago

1.5.34

2 years ago

1.5.33

2 years ago

1.5.35

2 years ago

1.5.32

2 years ago

1.5.31

2 years ago

1.5.30

2 years ago

1.5.23

2 years ago

1.5.25

2 years ago

1.5.24

2 years ago

1.5.27

2 years ago

1.5.26

2 years ago

1.5.29

2 years ago

1.5.28

2 years ago

1.5.18

3 years ago

1.5.19

3 years ago

1.5.21

3 years ago

1.5.20

3 years ago

1.5.22

3 years ago

1.5.16

3 years ago

1.5.15

3 years ago

1.5.17

3 years ago

1.5.14

3 years ago

1.5.12

3 years ago

1.5.11

3 years ago

1.5.13

3 years ago

1.5.10

3 years ago

1.5.9

3 years ago

1.5.8

3 years ago

1.5.7

3 years ago

1.5.6

3 years ago

1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.6

4 years ago

1.4.5

4 years ago

1.4.4

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.7

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.1.0

4 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago