Coder Social home page Coder Social logo

jakebecker / elixir-ls Goto Github PK

View Code? Open in Web Editor NEW
841.0 841.0 53.0 1.11 MB

A frontend-independent IDE "smartness" server for Elixir. Implements the JSON-based "Language Server Protocol" standard and provides debugger support via VS Code's debugger protocol.

License: Apache License 2.0

Elixir 99.34% Erlang 0.05% Batchfile 0.13% Shell 0.48%

elixir-ls's Introduction

markdown-cv

A curriculum vitae maintained in plain text and rendered to html and pdf using CSS.

For more details see the project page or the blog post on why I switched to markdown for my CV.


Usage

To start, simply fork the markdown-cv repo

and then edit directly in github the index.md file

adding your skills, jobs and education.

To transform your plain text CV into a beautiful looking HTML page and share it you then have two options:

1) Using Github Pages to publish it online

  1. Delete the existing gh-pages branch from your fork. It will only contain this webpage. You can either use git or the github web interface
  2. Create a new branch called gh-pages (which will then be a copy of master)
  3. Head to yourusername.github.io/markdown-cv to see your CV live.

Any change you want to make to your CV from then on would have to be done on the gh-pages branch and will be immediately rendered by Github Pages.

2) Build it locally and print a PDF

  1. install jekyll on your computer. gem install jekyll will do for most users.
  2. Clone your fork on your computer
  3. Type jekyll serve and you'll be able to see your CV on your local host (the default address is http://localhost:4000).
  4. You can edit the index.md file and see changes live in your browser.
  5. To print a PDF, just press Print. Print and web CSS media queries should take care of the styling.

Change the style

The included CSS renders CV in different styles:

  • kjhealy the original default, inspired by kjhealy's vita template
  • davewhipp is a tweaked version of kjhealy, with bigger fonts and dates right aligned

To change the default style, one needs to simply change the variable in the _config.yml file.

Any other styling is possible. More CSS style contributions and forks are welcome!

Author

Eliseo Papa (Twitter/GitHub/website).

Eliseo Papa

License

MIT License

elixir-ls's People

Contributors

eteeselink avatar gonzooo avatar jakebecker avatar jparise avatar lukaszsamson avatar martinwatts avatar mattbaker avatar percygrunwald avatar rodrigues avatar sinorga avatar yyoncho avatar znorris 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elixir-ls's Issues

** (Mix.Error) Can't continue due to errors on dependencies

ElixirLS is giving me an exception on VS Code Problems window that is not happing anywhere else (not with mix compile or releasing using distillery). The system also runs fine.

** (Mix.Error) Can't continue due to errors on dependencies

Any tips on how to handle that problem? Is there a different elixir compile option so I can execute to try to reproduce that crash on terminal?

Environment

  • Elixir & Erlang versions (elixir --version): 1.6
  • Operating system: OSX 10.13.2
  • Client (editor or IDE): Code 1.21.1

Crash report template

an exception was raised:
** (Mix.Error) Can't continue due to errors on dependencies
(mix) lib/mix.ex:291: Mix.raise/1
(mix) lib/mix/tasks/deps.loadpaths.ex:27: Mix.Tasks.Deps.Loadpaths.run/1
(mix) lib/mix/task.ex:314: Mix.Task.run_task/3
(mix) lib/mix/tasks/loadpaths.ex:34: Mix.Tasks.Loadpaths.run/1
(mix) lib/mix/task.ex:314: Mix.Task.run_task/3
(mix) lib/mix/tasks/compile.ex:87: Mix.Tasks.Compile.run/1
(mix) lib/mix/task.ex:314: Mix.Task.run_task/3
(language_server) lib/language_server/build.ex:162: ElixirLS.LanguageServer.Build.compile/0

Expose over TCP

Hi,

I'd like to use this, but I don't have Elixir installed; as everything runs in a container. If this was exposed over TCP, I believe I could get it to work.

Any thoughts on the complexity of this?

Path mapping to support "Go to definition" inside Docker

From @iJackUA on June 15, 2017 9:35

Hi, this Extension and ElixirLS by itself looks very promising!

Previously I have started the same topic in VSCode-Elixir extension repo timmhirsens/vscode-elixir#59 (all details and my temporary solution is there).

Briefly:
Is it possible somehow to specify path mapping between container FS and Host FS? (I suppose it should be a Workspace settings per project like mapping "${workspaceRoot} => /www")
Because when you develop locally using Docker containers, so Erlang/Elixir by itself and the source code are placed INSIDE the container.
And module.module_info[:compile][:source] returns absolute path for container FS, but not for Host FS (that is expected by VSCode).
I suppose the same issue would arise not only for "go to definition" but for Debugger call stack source code display also.

I have a small repo with steps and expected / actual behavior https://github.com/iJackUA/vscode-elixir-docker-test

As I see this issue should be solved on both parts: VSCode extension should have path mapping param and pass it to Elixir server to do path normalization where module_info is done.

I understand that my request is not the main priority at such an early dev stage, but if you could just keep in mind this use case and eventually provide a solution for this - it would be awesome!

Copied from original issue: JakeBecker/vscode-elixir-ls#7

Support for elixir_sense macro expansion feature?

Hi there,

I'm trying to reformat alchemist.el to use elixir-ls, and I see that elixir_sense has a feature that alchemist.el would like, which is a macro expansion ( https://github.com/msaraiva/elixir_sense#credits ).

I realize that feature is not generic enough to be supported by LSP, but alchemist.el would definitely have a use for it.

Unfortunately elixir_sense has zero documentation, so I don't know how that expand feature is supposed to work, but it seems like you've done all the work of figuring that out already, so I figured I might be able to stand on your shoulders for that one.

I'd be happy to write the client-side query for it.. But I have no idea what it's supposed to be :/

Is there a way to test that its running?

I'm trying to make this work with emacs, but I haven't had any luck so far.

While trying to debug it, I wonder if it's not working because of elixir-ls or lsp-mode.

Is there a way to test elixir-ls so that I know that it's running and doing its job?

Thank you.

Log folder showing up in projects

Environment

  • Elixir & Erlang versions (elixir --version): 1.6.4, 20.1
  • Operating system: OSX 10.12.6
  • Client (editor or IDE): Visual Studio Code

Problem:

Since the last update I believe I see a log/ folder popping up with IEx logs whenever I run an IEx session.

  • Why is this folder here?
  • Is there a way to turn this off?

Build failing on umbrella projects

Here is the logged output:

[Info  - 12:38:36] Child Logger.ErrorHandler of Supervisor Logger.Supervisor started
Pid: #PID<0.78.0>
Start Call: Logger.Watcher.watcher(:error_logger, Logger.ErrorHandler, {true, true, 500})
Restart: :permanent
Shutdown: 5000
Type: :worker
[Info  - 12:38:36] Application logger started at :nonode@nohost
[Info  - 12:38:37] Child ElixirLS.LanguageServer.Builder of Supervisor ElixirLanguageServer.Supervisor started
Pid: #PID<0.83.0>
Start Call: ElixirLS.LanguageServer.Builder.start_link(ElixirLS.LanguageServer.Builder)
Restart: :permanent
Shutdown: 5000
Type: :worker
[Info  - 12:38:37] Child ElixirLS.LanguageServer.Server of Supervisor ElixirLanguageServer.Supervisor started
Pid: #PID<0.84.0>
Start Call: ElixirLS.LanguageServer.Server.start_link(ElixirLS.LanguageServer.Server)
Restart: :permanent
Shutdown: 5000
Type: :worker
[Info  - 12:38:37] Child ElixirLS.IOHandler of Supervisor ElixirLanguageServer.Supervisor started
Pid: #PID<0.85.0>
Start Call: ElixirLS.IOHandler.start_link(ElixirLS.LanguageServer.Server, [name: ElixirLS.LanguageServer.IOHandler])
Restart: :permanent
Shutdown: 5000
Type: :worker
[Info  - 12:38:37] Application language_server started at :nonode@nohost
[Info  - 12:38:37] Forcing full rebuild
warning: redefining module EF.Mixfile (current version defined in memory)
  mix.exs:1

[Info  - 12:38:54] Forcing full rebuild
warning: redefining module EF.Mixfile (current version defined in memory)
  mix.exs:1

[Info  - 12:38:55] Forcing full rebuild
warning: redefining module EF.Mixfile (current version defined in memory)
  mix.exs:1

[Info  - 12:39:02] Forcing full rebuild
[Warn  - 12:39:02] Build failed: %RuntimeError{message: "trying to access Mix.Project.app_path for an umbrella project but umbrellas have no app"}
[Info  - 12:39:02] Forcing full rebuild
warning: redefining module EF.Mixfile (current version defined in memory)
  mix.exs:1

[Warn  - 12:39:02] Build failed: %RuntimeError{message: "trying to access Mix.Project.app_path for an umbrella project but umbrellas have no app"}

I looked around at the server code and I guess Mix.Project.app_path is being called inside some of the other calls to the Mix.Project module during the project compilation.

I could take a look at this, if you don't mind. And any directions are appreciated. 😄

ElixirLS crashes when asked to provide pop-up documentation for GenStage

Environment

  • Elixir & Erlang versions (elixir --version): erlang 19.3.6.6 and Elixir 1.6.4
  • Operating system: OSX
  • Client (editor or IDE): emacs

Crash report template

What I do:

In VsCode, I hover over the GenStage module name.

What happens:

Documentation does not appear.

  1. Reproduced with most recent vscode and vscode-elixir-ls in same project
  2. Reproduced Reproduced with most recent vscode and vscode-elixir-ls in empty project (just added gen_stage as dependency)
  3. No errors in developer console
  4. Error output from the "view > output" window:
[Error - 19:02:31] Request textDocument/hover failed.
  Message: Internal error: an exception was raised:
    ** (FunctionClauseError) no function clause matching in ElixirSense.Core.Introspection.extract_spec_ast_parts/1
        (elixir_sense) lib/elixir_sense/core/introspection.ex:227: ElixirSense.Core.Introspection.extract_spec_ast_parts({:subscription_tag, [], []})
        (elixir_sense) lib/elixir_sense/core/introspection.ex:171: ElixirSense.Core.Introspection.format_spec_ast/1
        (elixir_sense) lib/elixir_sense/core/introspection.ex:153: ElixirSense.Core.Introspection.format_type/1
        (elixir_sense) lib/elixir_sense/core/introspection.ex:133: anonymous fn/2 in ElixirSense.Core.Introspection.get_types_with_docs/1
        (elixir) lib/enum.ex:1294: Enum."-map/2-lists^map/1-0-"/2
        (elixir_sense) lib/elixir_sense/core/introspection.ex:80: ElixirSense.Core.Introspection.get_types_md/1
        (elixir_sense) lib/elixir_sense/core/introspection.ex:30: ElixirSense.Core.Introspection.get_all_docs/1
        (elixir_sense) lib/elixir_sense/providers/docs.ex:13: ElixirSense.Providers.Docs.all/4
  Code: -32603 
[Error - 19:02:31] Process #PID<0.318.0> raised an exception
** (FunctionClauseError) no function clause matching in ElixirSense.Core.Introspection.extract_spec_ast_parts/1
    (elixir_sense) lib/elixir_sense/core/introspection.ex:227: ElixirSense.Core.Introspection.extract_spec_ast_parts({:subscription_tag, [], []})
    (elixir_sense) lib/elixir_sense/core/introspection.ex:171: ElixirSense.Core.Introspection.format_spec_ast/1
    (elixir_sense) lib/elixir_sense/core/introspection.ex:153: ElixirSense.Core.Introspection.format_type/1
    (elixir_sense) lib/elixir_sense/core/introspection.ex:133: anonymous fn/2 in ElixirSense.Core.Introspection.get_types_with_docs/1
    (elixir) lib/enum.ex:1294: Enum."-map/2-lists^map/1-0-"/2
    (elixir_sense) lib/elixir_sense/core/introspection.ex:80: ElixirSense.Core.Introspection.get_types_md/1
    (elixir_sense) lib/elixir_sense/core/introspection.ex:30: ElixirSense.Core.Introspection.get_all_docs/1
    (elixir_sense) lib/elixir_sense/providers/docs.ex:13: ElixirSense.Providers.Docs.all/4

High latency filesystem breaks LS

I'm working on a project from my mobile workstation. Since it is my personal laptop and the projects content confidential, my boss and me came to the conclusion I shouldn't save it locally. Therefore I do use SSHFS to mount the project into my local filesystem. In general this works pretty well, but ElixirLS crashes constantly because the filesystem is taking longer than expected.

Is it possible to either increase filesystem timeouts or to start LS on a remote system and use it locally?

Extension is not starting

Usually when I go to Output pane, I will see an ElixirLS task and .elixir_ls will be generated. But after updating to the newest version, extension does not seem to start. What can I do to debug this?

Crash on startup

Failed to start Elixir.
error: {error,{elixir,{"no such file or directory","elixir.app"}}}
[Info  - 11:13:07 PM] Connection to server got closed. Server will restart.
Failed to start Elixir.
error: {error,{elixir,{"no such file or directory","elixir.app"}}}
[Info  - 11:13:08 PM] Connection to server got closed. Server will restart.
Failed to start Elixir.
error: {error,{elixir,{"no such file or directory","elixir.app"}}}
[Info  - 11:13:08 PM] Connection to server got closed. Server will restart.
Failed to start Elixir.
error: {error,{elixir,{"no such file or directory","elixir.app"}}}
[Info  - 11:13:09 PM] Connection to server got closed. Server will restart.
Failed to start Elixir.
error: {error,{elixir,{"no such file or directory","elixir.app"}}}
[Error - 11:13:09 PM] Connection to server got closed. Server will not be restarted.

Right after opening visual code from comandline from elixir, phoenix project path by entering code .

ExUnit configuration is ignored in the debug task

I have a few lines in test_helper.exs which set configuration to ExUnit, such as setting a formatter or excluding tests, for example:

ExUnit.configure(
  exclude: [external_api: true]
)

Unfortunately, this configuration seems to be ignored when running tests through VSCode with the default launch.json contents (like in the README.md).

PS: I was not sure whether this issue belongs here or in the VSCode extension repo.

bugreport: Errors not going away after fixing them

Hi,

I absolutely love this plug-in but I encountered a bug (which is not occurring on my colleague's machine). Whenever the tool (rightfully) tells me there's an error in my code, the Error Message is not removed from the list of warnings & errors after fixing it. I have to restart Visual Studio Code in order to get rid of the message.
I uploaded a video of 30 seconds which shows the bug. The video shows that ElixlrLS lists an error after I write faulty code. After removing the faulty code, it is shown that the error remains in the list. After restarting VS Code, it is shown that the error is no longer there.

Kind regards

Do not complete with current project files

I am using NeoVim with vim-lsp and ElixirLS and all completions available are ones in the standard library.

I am running my server using:

env ERL_LIBS=$ERL_LIBS:$HOME/Workspace/JakeBecker/elixir-ls/lsp mix elixir_ls.language_server

Completion for stdlib works fine, but I have no completion for either my code nor any of the dependencies. All I get is completion for module defined in mixfile.

Environment variables not loaded.

This project compiles the project in the background, but does not have access to environment variables. When running the project in an environment with env vars set, they are not picked up because the project has already been compiled by the editor.

Recommended change is for this project to compile in an isolated area that does not affect the main _build dir.

Simple test.

$ export var="foo"

defmodule MyApp do
@var Application.get_env(:my_app, :var)
def var, do: @var
end

Touching the above file and running iex -S mix will not invoke a compile, and the @var will be nil, because the project is compiled in the background before iex -S mix can be run and that env does not have the right environment variable.

Add Elixir-ls to langserver.org

Hey there,

I was reading through langserver.org and noticed elixir-ls is missing from the list. I thought it'd be a good idea to add elixir-ls to the list! The only reason why I haven't done it myself is I'm not sure what has and hasn't been implemented yet.

Correctly debugging application code

I found your Elixir-LS project and vscode and really like them together. I am able to set breakpoints in "tests" but not in my app. I am not sure how to correctly create a configuration. Here is the (default) test config that works:

{
      "type": "mix_task",
      "name": "mix test",
      "request": "launch",
      "task": "test",
      "taskArgs": [
        "--trace"
      ],
      "startApps": true,
      "projectDir": "${workspaceRoot}",
      "requireFiles": [
        "test/**/test_helper.exs",
        "test/**/*_test.exs"
      ]
    }

If I "add" a new configuration from vscode:

{
      "type": "mix_task",
      "request": "launch",
      "name": "mix task",
      "task": "task",
      "taskArgs": [],
      "projectDir": "${workspaceRoot}"
    }

and try to run it it results in the following:

(Debugger) Task failed because an exception was raised:
    ** (Mix.NoTaskError) The task "task" could not be found
        (mix) lib/mix/task.ex:234: Mix.Task.get!/1
        (mix) lib/mix/task.ex:297: Mix.Task.run_task/3

I have played around with the config, trying to copy from the test config that works without success. And it was not clear to me from the README.md how to config them.

I am not sure if I am required to do the steps in the "Building and running" section of the README.md, but when I try running mix release -o <release_dir> I get the following error: ** (Mix) The task "release" could not be found

Clarification appreciated.

Format on save does not respect imported formatter configuration

From @Rosetjau on March 16, 2018 13:58

When running the formatter from command line via mix format the formatter respects the configuration that is imported from dependencies. The same does not seem to apply to the "format on save" feature in Visual Studio Code.

I have set up an example repository to reproduce this issue. Steps to reproduce:

  1. Clone the repo
  2. Run mix format from command line. Notice that the formatter exits without changing the schema.ex file, because the .formatter.exs file imports the configuration that is exported by Absinthe
  3. Open the project with Visual Studio Code, edit the workspace settings to enable "editor.formatOnSave", open the schema.ex file and save it
  4. Upon saving the file the formatter will add parentheses to the schema.ex file, even if the Absinthe formatter configuration declares those functions/macros as locals_without_parens

Copied from original issue: JakeBecker/vscode-elixir-ls#58

elixir-ls requires elixir sources

According to what I discovered in JakeBecker/vscode-elixir-ls#4, it seems as if elixir-ls (currently) strictly requires availability of the sourcecode of elixirs libraries.

This should be mentioned in the installation instructions, or even better, make it use the *.beam files if onyly those are available.

ElixirLS crashing in vs code with umbrella project

I am getting the following when opening VS Code Insiders with the Elixir LS plugin installed:

[Extension Host] ok:localhost:/tmp/elixir-sense-1515347850488828000.sock
 (at Socket.__dirname.start.env.proc.stdout.on (/Users/rlthompson/.vscode-insiders/extensions/mjmcloug.vscode-elixir-1.1.0/out/src/elixirSenseServerProcess.js:27:25))
/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:253

[Extension Host] [vscode-elixir] ElixirSense client connected on localhost:/tmp/elixir-sense-1515347850488828000.sock (at ElixirSenseClient.handleConnect (/Users/rlthompson/.vscode-insiders/extensions/mjmcloug.vscode-elixir-1.1.0/out/src/elixirSenseClient.js:29:17))
messageService.ts:126

The ElixirLS server crashed 5 times in the last 3 minutes. The server will not be restarted.
e.doShow @ messageService.ts:126
e.show @ messageService.ts:105
e._showMessage @ mainThreadMessageService.ts:70
e._showMessage @ mainThreadMessageService.ts:40
e.$showMessage @ mainThreadMessageService.ts:34
e._doInvokeHandler @ rpcProtocol.ts:186
e._invokeHandler @ rpcProtocol.ts:171
e._receiveRequest @ rpcProtocol.ts:116
e._receiveOneMessage @ rpcProtocol.ts:91
(anonymous) @ rpcProtocol.ts:34
(anonymous) @ rpcProtocol.ts:231
e.fire @ event.ts:142
(anonymous) @ ipc.net.ts:81
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560

Erlang version:

~ > kerl status
Available builds:
20.2,20.2
----------
Available installations:
20.2 /Users/rlthompson/.kerl/installations/20.2
----------
The current active installation is:
/Users/rlthompson/.kerl/installations/20.2
There's no Dialyzer PLT for the active installation
The build options for the active installation are:

 --enable-darwin-64bit --with-ssl=/usr/local/opt/openssl

Elixir version:

 ~ > kiex list

kiex elixirs

=* elixir-1.6.0-rc.0

# => - current
# =* - current && default
#  * - default

Workspace Settings:

{
    "elixir.projectPath": "/probe",
    "elixirLS.projectDir": "/probe",
    "elixirLinter.useStrict": true,
    "elixir.elixirEnv": "dev",
    "elixirLS.mixEnv": "dev"
}

Installed vs code plugins

 ~ > code-insiders --list-extensions
Arjun.swagger-viewer
JakeBecker.elixir-ls
PeterJausovec.vscode-docker
bibhasdn.django-html
coderfee.open-html-in-browser
donjayamanne.githistory
eamodio.gitlens
felixfbecker.php-debug
felixfbecker.php-intellisense
formulahendry.code-runner
humao.rest-client
iampeterbanjo.elixirlinter
ipedrazas.kubernetes-snippets
kalitaalexey.vscode-rust
kumar-harsh.graphql-for-vscode
lextudio.restructuredtext
lukehoban.Go
magicstack.MagicPython
mauve.terraform
mjmcloug.vscode-elixir
ms-python.python
ms-vscode.atom-keybindings
ms-vscode.cpptools
ms-vscode.csharp
ms-vscode.PowerShell
msjsdiag.debugger-for-chrome
paulhoughton.vscode-jscpd
pgourlain.erlang
rebornix.Ruby
robertohuertasm.vscode-icons
sbrink.elm
secanis.jenkinsfile-support
silverbulleters.sonarqube-inject
sozercan.slack
timonwong.shellcheck
wayou.vscode-todo-highlight
wholroyd.jinja
yuce.erlang-otp
zhuangtongfa.Material-theme

ElixirLS version: v0.2.9

Project structure:

Probe
├── build
│   └── probe
├── deployment
│   └── probe
└── probe
    ├── apps
    │   ├── api
    │   │   ├── config
    │   │   ├── lib
    │   │   │   ├── api
    │   │   │   └── api_web
    │   │   │       ├── channels
    │   │   │       ├── resolvers
    │   │   │       ├── schema
    │   │   │       └── views
    │   │   ├── priv
    │   │   │   └── gettext
    │   │   │       └── en
    │   │   │           └── LC_MESSAGES
    │   │   └── test
    │   │       ├── api_web
    │   │       │   └── views
    │   │       └── support
    │   ├── db
    │   │   ├── config
    │   │   ├── lib
    │   │   │   └── db
    │   │   └── test
    │   └── svc
    │       ├── config
    │       ├── lib
    │       │   └── svc
    │       │       ├── alerts
    │       │       ├── callbacks
    │       │       └── checks
    │       └── test
    ├── config
    ├── priv
    │   └── data
    └── rel

Provide tagged releases

Neither elixir-ls nor elixir-vscode-ls have tagged releases. It would be much easier to coordinate which version of both projects is working fine with the other if the git commits would be tagged accordingly.

vim support

any chance to add vim (or neovim) support ?
thanks!

Release prebuild .ez packages

This would greatly simplify deployment and integration of application plugins instead of requiring each one to build project from source.

EDIT:

To clarify. The idea isn't that we should provide .ez files to install it using mix archive.install but for fetching prebuild tool instead compiling it each time. To prevent people from "accidentally" installing it using mix archive.install it could be released as one archive that would need to be downloaded and extracted separately.

This could even be done on CI for each signed tag build which would mark new release. This would provide much simpler versioning and installation. This is especially useful for people using older versions of Elixir without need to install 1.6.0-dev version.

Extra `@` on argument call when autocomplete happens

Environment

Elixir & Erlang versions (elixir --version):

Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.6.3 (compiled with OTP 19)

Operating system

macOS sierra 10.12.6

Client (editor or IDE):

VSCode 1.21.0

Example

screencast 2018-03-13 10-53-39

Build releases as .ez archives instead of escripts

Right now, the language server and debugger are packaged as escripts that doesn't embed Elixir, and then we use a shell script to locate your Elixir install and set ERL_LIBS. Asdf, however, wraps your Elixir binary in an additional shell script which means it's harder to find the Elixir install.

This isn't a good way of packaging it, and I'm refactoring it to build a set of .ez archives instead. Then we can run it as ERL_LIBS=<release dir> mix elixir_ls.language_server, which should be much more robust.

Plans to build an Elixir LanguageServer Client?

Thanks for all of your hard work in making this and vscode-elixir-ls, this is great work!

Do you have any plans to build a LanguageServer client written in Elixir?

I'm working on an Elixir side project where it'd be really useful to be able to communicate with this or other language servers. There doesn't appear to be many LSP clients (see here) and I think people would find this useful. I'm not totally sure, but I believe the client VSCode uses is in vscode-languageserver-node.

If not, no problem, I was just curious. Thanks!

Monorepo: "No mixfile found in project root."

Hey there! Thanks for creating this module, it's made for a great addition to my Elixir workflow in Atom. I have one small question or quibble, though. It's kind of an edge case, but in at least one project I'm working on, I've wound up placing a Node.js app alongside the Elixir app for simpler monorepo-style development. The problem is that then my Elixir project and its mix.exs are in a subdirectory of my Atom project, and ElixirLS fails to find them:

screenshot

I've tried setting the MIX_EXS environment variable to the absolute path of the subfolder's mix.exs, only to get this friendly message:

screenshot 1

If you have any thoughts or suggestions I'd be grateful to hear them! My Elixir-fu is still a little weak but I'm happy to do anything I can to help with a PR if you can suggest a starting-point. Thanks so much, in advance, for your help.

Autocomplete doesn't work

I use elixir-ls in VS Code and the autocomplete functionality is missing.
Other features like debugging, dializer, go-to work as expected.

ets.lookup_element error in project with broken elixir module

I'm using the latest ide-elixir from git (0c478c) in Atom. When code in MyModule is broken and won't compile, I get the following error when viewing mix.exs for my project, and every line of mix.exs is underlined with a red dashed line.

an exception was raised:
    ** (ArgumentError) argument error
        (stdlib) :ets.lookup_element(:elixir_modules, MyModule, 2)
        (elixir) src/elixir_module.erl:27: :elixir_module.data_table/1
        (elixir) lib/kernel/lexical_tracker.ex:37: Kernel.LexicalTracker.to_pid/1
        (elixir) lib/kernel/lexical_tracker.ex:16: Kernel.LexicalTracker.remote_references/1
        (mix) lib/mix/compilers/elixir.ex:216: Mix.Compilers.Elixir.each_module/4
        (elixir) lib/kernel/parallel_compiler.ex:293: Kernel.ParallelCompiler.wait_for_messages/6
        (elixir) lib/kernel/parallel_compiler.ex:129: Kernel.ParallelCompiler.spawn_workers/3
        (mix) lib/mix/compilers/elixir.ex:166: Mix.Compilers.Elixir.compile_manifest/9

I assume this should be reported here instead of at ide-elixir, but let me know if I should adjust. Thanks.

Do not complete after spaces or commas

I am not sure if this is a bug from Atom ide-elixir or elixir-ls, so I post it here.

When finishing a line with a comma, like in a list or in a with statement, the autocomplete view appears. So typing Enter does not give me a newline, but completes with the first thing of the list.

I am used to atom-elixir’s behaviour regarding the completion, which I think is more natural.

I’ve seen that Atom does not yet support snippets. Is this the cause of def<tab> not working for creating new functions?

How could I help to get this better? (I’ve never written anything for Atom, but I could give it a try)

Skipping build on Windows

I am trying out the VSCode extension and am running into an issue on Windows. This comparison below is failing:

if Path.absname(File.cwd!()) != Path.absname(root_path) do

root_path does not contain the drive letter, while File.cwd!() does contain the drive letter. Here is the output I receive in VSCode:

Skipping build because cwd changed from Development/islands_engine to c:/Development/islands_engine

Looking through the documentation, maybe Path.expand/1 would work better than Path.absname/1? The only difference is that expand/1 will expand out .., ., and ~

Spawns multiple code_helper processes and beam.smp with extremely high CPU usage.

I had to disable this excellent extension on VSCode because it was causing such high CPU usage, it would freeze my entire computer.

In Activity Monitor, I see about 9 Code Helper processes, and a beam.smp with around %200+ CPU usage. Force quitting VSCode and terminating all code helper processes immediately fixed the issue.

To reproduce just try to save any Elixir file with bugs, typos or calling non-existing functions with formatOnSave enabled. It'll show red squiggly lines, right. And after that, fix the issues and save, after a few minutes you'll see the slowdown start to ramp up until the computer is unusable.

Unfortunately I can't provide more details than that because I'm not sure what kind of debug info you need.

I hope you can reproduce the issue and find the root cause, I love this extension!

Error "missing :adapter configuration" on compilable project

I am using ElixirLS 0.0.7 on VSCode 1.13.1, running on MacOS Sierra 10.12.5.

I have a project that compiles correctly using mix compile (MIX_ENV=dev), but in VSCode, I get this as the first error:

elixirlserror

Because of this error, I suspect ElixirLS doesn't write the BEAM file for this module, resulting in all other modules using/requiring the Repo module to also generate errors.

config/config.exs has this as Repo config:

config :my_app_name, My.App.Repo,
  adapter: Ecto.Adapters.Postgres,
  database: "my_db",
  username: "postgres",
  password: "postgres",
  hostname: "localhost",
  socket_options: [recbuf: 2097152]

(my_app_name and My.App.Repo are redacted values)

Invalid comparison with false when checking capabilities

I am using ElixirLS with NeoVim (via vim-lsp) and I found that ElixirLS by default adds placeholders for parameters like String.capitalize(${1:string}) which doesn't work good with Vim. It isn't also AFIK part of the LSP so it would be good idea to hide this behind flag so it would be enabled only when needed.

After checking source it becomes clear that this is implemented, but is is bugged comparision should check if the result is not in [false, nil] for implementations that do not return given field.

nvim support is very limited

Hello,

I'm using this nvim plugin: https://github.com/autozimu/LanguageClient-neovim

It works with rust or javascript language servers.

There are some commands that work correctly like the formatting.
On the other hand, :call LanguageClient_textDocument_rename() or :call LanguageClient_textDocument_documentSymbol() don't work.

Some errors from /tmp/LanguageClient.log:

18:33:47 ERROR   [MainThread] {'jsonrpc': '2.0', 'id': 8, 'error': {'message': 'Invalid Request', 'code': -32600}}
18:34:48 ERROR   [MainThread] {'jsonrpc': '2.0', 'id': 9, 'error': {'message': 'Invalid Request', 'code': -32600}}
18:35:30 WARNING [MainThread] Unknown parameter key: newName
18:35:31 ERROR   [MainThread] {'jsonrpc': '2.0', 'id': 10, 'error': {'message': 'Invalid Request', 'code': -32600}}
18:35:35 WARNING [MainThread] Unknown parameter key: newName
18:35:35 ERROR   [MainThread] {'jsonrpc': '2.0', 'id': 11, 'error': {'message': 'Invalid Request', 'code': -32600}}

If you need help to give support to (n)vim I'll do my best to help you!

Support Find References in umbrella apps

Right now Find References only works for non-umbrella applications. More context can be found in the discussion on #50 (towards the bottom).

One idea: have find references and the build process share a lock so that find-refs can't occur during the compilation process.

Debugging during compilation

Is it possible to perform debugging while compiling?
Could be useful to debug macros.

In VSCode I've tried to add a compile task to the launch.json configuration:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "mix_task",
      "name": "mix compile",
      "request": "launch",
      "task": "compile",
      "projectDir": "${workspaceRoot}",
      "requiredFiles": ["mix.exs"]
    },
    ...
}

However, it did not worked. Thats the output, when I tried to put a breakpoint inside the mix.exs file:

  use Mix.Project
  test = "afasdfs"
  quote do #  added breakpoint here
    IO.inspect(unquote(test))
  end

Thats the output:

** Invalid beam file or no abstract code: 'Elixir.Pipe.Umbrella.Mixfile'
16:39:17.483 [error] 'File operation error: eisdir. Target: /Users/bk/play/pipe. Function: get_file. Process: Elixir.ElixirLS.Debugger.Server.'

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.