slashmili / alchemist.vim Goto Github PK
View Code? Open in Web Editor NEWElixir Integration Into Vim
Home Page: https://github.com/slashmili/alchemist.vim/wiki
License: GNU General Public License v3.0
Elixir Integration Into Vim
Home Page: https://github.com/slashmili/alchemist.vim/wiki
License: GNU General Public License v3.0
be able to autocomplete current module functions
alias :random, as: Rand
Is a valid alias pattern
OS X, Python 2.7.11
got this when using K to get ExDoc on function
Traceback (most recent call last):
File "/Users/alexander/.vim/plugged/alchemist.vim/after/../alchemist_client", line 79, in <module>
main(sys.argv[1:])
File "/Users/alexander/.vim/plugged/alchemist.vim/after/../alchemist_client", line 58, in main
cmd = raw_input()
NameError: name 'raw_input' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/alexander/.vim/plugged/alchemist.vim/after/../alchemist_client", line 81, in <module>
print("error: %s" % e.message)
When a vim session is opened under an app directory, alchemist-server should run the server for whole project.
a possible solution is to always look for two directory up and check if mix.exs exists.
Hi,
Alchemist's "go to definition" for my project's functions/modules work just fine.
But looking at the following piece of code:
def changeset(struct, params \\ %{}) do
struct
|> cast(params, [:name, :content, :post_id])
|> validate_required([:name, :content, :post_id])
end
If I press ctrl+] on top of either "cast", "validate_required" or "struct" I get a E426: Tag not found
.
Any idea how to fix this?
MacOS 10.12.1
ViM 8.0.52
Elixir 1.3.4
Which Elixir?
/usr/local/bin/elixir
Installed using homebrew
Currently mappings such as and <C-]> are done without the modifier so they modify behavior even for non-elixir buffers. One place this is noticable is in vim's :help where <C-]> on a link no longer works.
get full path of elixir project directory
Hello,
I see that my completion with Alchemist and YMC is quite dumb, basically it look like I can see all the possible function for all the modules everywhere, here is a small screenshot that would explain better:
http://s3.kedare.net/issues/Screen+Shot+2016-12-26+at+22.11.43.png
What could cause this ? I suppose this is not expected ?
Thanks.
Support mix commands
I used deoplete for code complete.
When I typed Enum.
, then the result pop up after 2 or 3 seconds.
Is that can be configed ?
Or should I config deoplete things?
Rewrite? First need to check the performance of the client in elixir
https://github.com/elixir-lang/vim-elixir
Should these plugins be used exclusively or mutually?
Find a way to add Omni completion
result to popupmenu-completion
Or at least make it optional
in Umbrella projects If the alchemist server is running on the main directory don't re run it for sub apps.
Hi!
I use nvim with alchemist.vim. When type <C-x><C-o>
, it will be omni completion (^o^n^p) pattern not found
Detect the modules that we are in and the alias and imported modules inside the module
I run my applications inside Docker containers, which means that deps
and _build
aren't available to vim.
Is there a way to run this plugin, but ask it to speak to another alchemist server over a socket / port combination?
Thanks
IO.ins^X^O
recommends:
IO.inspect m
inspect/2 f
if alias is written like this:
alias MyApp.{
Repo,
User,
Group
}
Autocomplete/jump do definition/document lookup doesn't work for the aliased modules.
find already running server/looking for mix.exs/...
load documents for erlang modules with erl -man <module>
When I try to use any of the functionality of the plugin, such as get_doc or jump to definition, I get this python traceback:
Traceback (most recent call last):
File "/home/alex/.config/nvim/plugged/alchemist.vim/after/../alchemist_client", line 77, in
<module>
main(sys.argv[1:])
File "/home/alex/.config/nvim/plugged/alchemist.vim/after/../alchemist_client", line 68, in
main
a = AlchemistClient(debug=debug, cwd=cwd, ansi=ansi, alchemist_script=alchemist_script, s
ource=source)
File "/home/alex/.config/nvim/plugged/alchemist.vim/alchemist.py", line 16, in __init__
self._cwd = self.get_project_base_dir()
File "/home/alex/.config/nvim/plugged/alchemist.vim/alchemist.py", line 372, in get_project
_base_dir
running_servers_logs = os.listdir(self._get_tmp_dir())
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/alex/alchemist_server'
I am opening neovim from the root of a Phoenix project.
This occurs:
Hi, I'm not very good at vim, I need help or guide.
I want to complete code without typing ,
and I'm using neocomplete for autocomplete.
So may I request your help for guiding me how to do that?
Rewrite the autocomplete rules in the client
mix credo --format flycheck <filename>
We can show the result in Quickfix
window
These case don't work as I expect:
Sys^X^O
Returns only SystemLimitError.
System.get_
Returns get_env/0
and get_pid/0
. And doesn't show get_env/1
NeoVim issue: neovim/neovim#6023
Not sure if this happened to other folks using both YouCompleteMe.vim
and alchemist.vim
, but YCM complained this to me when pressing List.
:
Omnifunc returned bad value to YCM! Omnifunc did not return a list or a dict with a "words" list when expected.
Plugin list:
Plug 'vim-ruby/vim-ruby'
Plug 'elixir-lang/vim-elixir'
Plug 'slashmili/alchemist.vim'
Plug 'vim-erlang/vim-erlang-runtime'
Plug 'vim-erlang/vim-erlang-compiler'
Plug 'vim-erlang/vim-erlang-omnicomplete'
Plug 'vim-erlang/vim-erlang-tags'
Plug 'ten0s/syntaxerl'
Plug 'pangloss/vim-javascript'
Plug 'elmcast/elm-vim'
Plug 'mustache/vim-mustache-handlebars'
Plug 'fatih/vim-go'
Plug 'guns/vim-clojure-static'
Plug 'kchmck/vim-coffee-script'
Plug 'mxw/vim-jsx'
Plug 'othree/html5.vim'
Plug 'hail2u/vim-css3-syntax'
Plug 'groenewege/vim-less'
Plug 'larrylv/ShowMarks'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'ivalkeen/vim-ctrlp-tjump'
Plug 'tpope/vim-ragtag'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-obsession'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-markdown'
Plug 'tpope/vim-speeddating'
Plug 'tpope/vim-abolish'
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-haml'
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-vinegar'
Plug 'tpope/vim-rbenv'
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-projectionist'
Plug 'tpope/vim-rsi'
Plug 'Valloric/YouCompleteMe' ", { 'do': './install.py --clang-completer' }
Plug 'SirVer/ultisnips'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/syntastic'
Plug 'tomtom/tcomment_vim'
Plug 'skalnik/vim-vroom'
Plug 'honza/vim-snippets'
Plug 'janko-m/vim-test'
Plug 'terryma/vim-multiple-cursors'
Plug 'mileszs/ack.vim'
Plug 'itchyny/lightline.vim'
Plug 'godlygeek/tabular'
Plug 'tudorprodan/html_annoyance.vim'
Plug 'majutsushi/tagbar'
Plug 'airblade/vim-gitgutter'
Plug 'ervandew/supertab'
Plug 'kana/vim-textobj-user'
Plug 'nelstrom/vim-textobj-rubyblock'
Plug 'jwhitley/vim-colors-solarized'
Plug 'Raimondi/delimitMate'
Plug 'mattn/webapi-vim'
Plug 'mattn/gist-vim'
Plug 'benmills/vimux'
Plug 'eapache/rainbow_parentheses.vim'
Plug 'jlanzarotta/bufexplorer'
Plug 'vim-scripts/matchit.zip'
Plug 'vim-scripts/BufOnly.vim'
Plug 'thinca/vim-ref'
Plug 'mhinz/vim-startify'
Plug 'powerman/vim-plugin-AnsiEsc'
By the way, thanks for this plugin, it's super useful for Elixir development!
Support :IEx command
If it’s running in neovim, it should run :terminal iex -S mix
if it’s running in vim, should check for ConqueTerm plugin if exists, run :ConqueTerm iex -S mix or show a message that you need that plugin
It would be great if, like in the vim help, you could jump through documentation. For example, if viewing the documentation for Enum
* Enum
Provides a set of algorithms that enumerate over enumerables according
to the `Enumerable` protocol.
iex> Enum.map([1, 2, 3], fn(x) -> x * 2 end)
[2, 4, 6]
It would be great if can put your cursor on map
and bring up the Enum.map
documentation. Currently, using K
, this does not work as vim attempts to find a man
entry.
Autocomplete is not enabled in ExDef. ex:
:ExDef Li<tab>
should offer List
alchemist#check() function(not sure about the name)
It should check for various settings and report the result and give suggestion
Is there anyway to set the path for the jump to definition as stated in the wiki for a Homebrew installed Elixir? I might just be missing something with Homebrew, but it seems that it just keeps the binaries not the source, so I can't figure out how to set the path for this.
Is there a simple solution for this, or is this something that's not currently implemented?
After updating alchemist to the current master I've noticed a weird behavior: my app listens on a network port and after I type something in .ex file in vim mix test
in a terminal fails with eaddrinuse
. :Mix test
right in vim works fine, though. It seems like alchemist (or maybe vim itself) starts mix
and leaves it dangling.
On 6b763e9 everything works fine, every commit after triggers that issue. Unfortunately, I was not able to pinpoint the exact commit causing it. MacVim 8 (124), OS X Sierra.
alchemist_client
vim plugin
:
)alias
and send it to alchemistg]
to jump to definitioniex
integrationimplement Ctrl-]
to jump to definition
Hi !
So, I suppose I did something wrong or missed something, but I just follow the doc to install everything, do a PluginInstall
, PluginUpdate
.. Then I wanted to try by editing an .ex
file and I notice that nothing change in deoplete, so I try to use ExDoc by typing K
, I'v got this message:
Traceback (most recent call last):
File "/home/kiukisas/.config/nvim/plugins/alchemist.vim/after/../alchemist_client", line 77, in <module>
main(sys.argv[1:])
File "/home/kiukisas/.config/nvim/plugins/alchemist.vim/after/../alchemist_client", line 69, in main
print(a.process_command(cmd), end="")
File "/home/kiukisas/.config/nvim/plugins/alchemist.vim/alchemist.py", line 52, in process_command
sock = self._connect(connection)
File "/home/kiukisas/.config/nvim/plugins/alchemist.vim/alchemist.py", line 125, in _connect
sock.connect(host_port)
So.. a alchemist
connection problem maybe ?
Also, from the wiki:
auto complete and jump to definition only works if your project or newly added file has been compiled
I tried again after a mix compile
in my project but nothing change.. Did I do something wrong ?
I'm on Arch Linux
and I have python2.7
and python3.6
btw.
it is (extremely) inconvenient that :Mix something cannot itself find project root and execute it from top directory.
Question - I see functionality is present in python. Should I
I've been trying to get it to work on Windows for a day now. Being new to Vim doesn't help, but I am noticing some problems such as "/" vs "" and the alchemist_client file having a shebang which isn't recognized by Windows.
Is this meant to support Windows?
I'm not sure about the commands we need to support but vim-rails looks good
I don't know if there a bug in alchemist.vim plugin or this is an expected behavior of vim, however I found this issue using this plugin. Shortly, when I launch vim and execute :cd into my project, then autocomplete for Elexir stdlib works fine, but it doesn't work for my project modules and it dependencies. When I launch vim from project directory then everything works fine.
The idea is to use xref to find the places that a given module/function is used and helps users to refactor a code!
alchemist-server doesn't support xref yet, need to implement the base there first.
it should work like this:
:ExRef MyApp.Repo -> open a window that list of files that uses this module
:ExRef MyApp.User.changeset -> open a window that list of files that uses this function
set timeout for socket recv
Like this:
import File.Stream, only: [__build__: 3]
Steps to reproduce:
test
:Mix test
Expected outcome is the test should run.
I may not be using alchemist.vim right 😄, opening this issue to clarify or see if it can be fixed.
If a module has only one function :
defmodule TryOut.Multi do
def run_me do
end
end
By entering TryOut.M
and pressing <c-x><c-o>
it autocomplete to TryOut.run_me
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.