-
Notifications
You must be signed in to change notification settings - Fork 299
Integrating with elixir alchemist #735
Comments
Hi @MikaAK , The language server support is on-deck for '0.3'. You can already hook-in to a language server via the Oni API - you can see an example of that here: https://github.com/bryphe/oni-language-csharp However, for 0.3, I want to make this even easier... The idea is you could have a configuration like:
I need to update the roadmap but this is the next item for support, after the 'daily-editor-blockers' are addressed. Regarding the completion issue - that seems like a bug - could you help me out with the repro steps for it? I tried on my environment but don't see it (just repro'd with a vanilla text file). It'd be helpful to know the set of plugins running, your configuration, and the exact key presses you're using. |
Wow that's pretty cool, maybe I'll take a quick stab at an elixir plugin, since I use it daily I'm sure it would be handy and I'm sure other can benefit! Thanks for the info 😄 The completion is probably due to having deoplete in since this is what I wanted to use for elixir. This is my oni config const activate = (oni) => {
oni.input.unbind("<c-p>")
oni.input.unbind("<Tab>")
oni.input.unbind("<c-n>")
oni.input.unbind("<enter>")
oni.input.unbind("<down>")
oni.input.unbind("<up>")
oni.input.bind("<enter>", "quickOpen.openFile")
oni.input.bind("<up>", "menu.previous")
oni.input.bind("<shift-tab>", "menu.previous")
oni.input.bind("<tab>", "menu.next")
oni.input.bind("<down>", "menu.next")
oni.input.bind("<m-q>", () => require('electron').remote.app.quit())
oni.input.bind('<m-w>', () => document.querySelector('.tab.selected .fa-times').click())
}
const deactivate = () => {
}
module.exports = {
activate,
deactivate,
"oni.useExternalPopupMenu": true,
"editor.completions.enabled": false,
"oni.useDefaultConfig": false,
"oni.loadInitVim": true,
"tabs.enabled": true,
"editor.fontFamily": "Hack"
} as well as my plugins " Completion
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" Movement
Plug 'easymotion/vim-easymotion'
Plug 'tpope/vim-surround'
Plug 'terryma/vim-multiple-cursors'
" Files
Plug 'kien/ctrlp.vim'
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
" Syntax
Plug 'vim-syntastic/syntastic'
Plug 'ternjs/tern_for_vim'
Plug 'ntpeters/vim-better-whitespace'
" Status Lines
Plug 'airblade/vim-gitgutter'
Plug 'bling/vim-airline'
" Colors
Plug 'tomasr/molokai'
" Typescript
Plug 'leafgarland/typescript-vim'
Plug 'othree/javascript-libraries-syntax.vim'
Plug 'gavocanov/vim-js-indent'
Plug 'othree/yajs'
Plug 'othree/es.next.syntax.vim'
Plug 'mhartington/nvim-typescript'
" HTML Languages
Plug 'digitaltoad/vim-pug'
" Fish
Plug 'dag/vim-fish'
" Elixir
Plug 'slashmili/alchemist.vim'
Plug 'elixir-editors/vim-elixir'
" Tracking
Plug 'wakatime/vim-wakatime'
" Utility
Plug 'jiangmiao/auto-pairs'
Plug 'scrooloose/nerdcommenter'
Plug 'godlygeek/tabular'
Plug 'tpope/tpope-vim-abolish'
Plug 'wellle/targets.vim'
Plug 'xolox/vim-misc'
Plug 'xolox/vim-session' I have this for deoplete however call deoplete#enable()
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>" All I'm doing is using tab to cycle through the options visible. This is the behavior I want to keep however when using completion directly from oni I cannot find a way to replicate this. Rather I have to use next/previous then use the select completion button which does cause extra keypresses and errors when forgetting them 😭 Lemme know what else I can do to help! |
Another alternative is elixir-ls. @bryphe any plans to support debug protocol? |
Ah ya, I'm not sure this is very well supported at the moment. Good to have this open to track. The option at the moment would be to experiment with something like
@adelarsq Yes! I just updated the roadmap. It's really ambitious, but there is a lot I want to cram in the next few months... |
I actually was using that binding before but unfortunately I found that it did slow me down. I would like to disable the autocomplete if possible and just use deoplete for now, is that possible @bryphe |
Hi @MikaAK , Couple follow ups here:
|
Has anyone made progress with this, or integrated the language support? |
@tcoopman I have plans to work on this. Maybe that this config works but I still didn't have time to test: // elixir - https://github.com/JakeBecker/elixir-ls
"language.elixir.languageServer.command": "elixir-ls", |
@tcoopman, @adelarsq after some tinkering got LS integration working. On my machine LS works properly only with elixir-ls configured through oni and alchemist installed through Plug manager. ¯\(ツ)/¯ My oni config
My nvim config
|
@ontofractal Good job! 🥇 Can you provide the content from the |
@adelarsq |
@ontofractal do you know what's the reason for the need for alchemist? |
@tcoopman Using just elixir-ls with Oni LS configuration led to Oni throwing errors It seems to be brittle though, couldn't get it working today, got more |
@ontofractal thanks. I'll guess I'll wait a while for using oni. Would love to use it, but a bit too much work for now. |
I tried @ontofractal's configuration bit, unfortunately, it did not work for me. When I open up an elixir file I get a little loading-like animated circle in the statusbar - screenshot - and it just spins indefinitely. I got the same effect trying to use the Haskell IDE Engine but pyls worked like a charm. I'm on Manjao Linux and here's my config.js (I also tried editing config.tsx but any option I put in there had no effect whatsoever):
|
@polaris6933 Same issue here. I'm just guessing but it might have something to do with |
@Akin909 this is actually still a problem. I realized now #2325 adds syntaxes but not a language server itself. |
@MikaAK thanks for pointing this out I thought there was maybe a solution for this. I don't think we would ship oni with one for elixir but would be good to find a client that does work or probably its a question of how we integrate lsp which is currently causing the issue. As a side note I believe there's actually an issue with the syntaxes added in #2325 |
Given #2640 has landed, curious to see if anyone has been able to successfully integrate with elixir-ls ? Thanks |
https://github.com/msaraiva/elixir_sense provides a language server for elixir and has been used in things like https://github.com/slashmili/alchemist.vim/wiki. How would one add support for this in oni?
If not supported it would be great to allow for a fallback to deoplete in order to support this!
Another thing I'm trying to figure out is how to get completion to work in this way
where whenever completion next is shown it cycles through the completion options
The text was updated successfully, but these errors were encountered: