victorolinasc

victorolinasc

Elixir editing on KDE's Kate editor (with elixir-ls integration)

Hey there people :slight_smile:

Just wanted to share a very quick and easy setup for editing Elixir in KDE’s Kate editor. This is a very nice and simple editor. It starts real fast and is quite easy on memory and cpu.

Here is a screenshot of it working with elixir-ls and syntax highlighting:

To configure it is very easy:

  • Open up settings → Configure Kate
  • Plugins → enable LSP Client plugin apply and restart Kate
  • Open up settings once again → Configure Kate → LSP Client
  • Under the tab of User Server Settings add this snippet (you need to have cloned elixir-ls and ran its build first):
{
    "servers": {
        "elixir-ls": {
            "command": ["FULL PATH TO YOUR language_server.sh FILE"],
            "rootIndicationFileNames": ["mix.exs"],            
            "url": "https://github.com/elixir-lsp/elixir-ls",
            "highlightingModeRegex": "^(Elixir)$"
        }
    }
}
  • Restart kate
  • Open any Elixir project (should start the LSP automatically)
  • Make sure you configure your project going to: Tools → Mode → Sources → Elixir

That’s it :slight_smile:

What I’ve tested:

  • Auto-complete
  • Code formatting (although couldn’t find a way to trigger format on save)
  • Go to definition

I don’t use it on a daily basis, but it is an awesome fully open source alternative to add in the mix. Auto-completion, code formatting and all working fine with just these settings. I am an Emacs user but its nice to have an alternative that is native to my DE.

For those interested, here are some links:

Anyway, just wanted to share this little snippet. I’ve seen some other KDE fans around here so that might make em happy too.

First Post!

guibbv20111

guibbv20111

Lexical works fine too…

Last Post!

ArthurClemens

ArthurClemens

I had quite some problems getting this to run on a Mac with asdf. The elixir-ls launch script could not find asdf when ran inside Kate, because ASDF_DIR was pointing to my home directory, while asdf was installed with Homebrew.
In the end I re-installed asdf using “the preferred method” (using Git) and things are working fine now.

Where Next?

Popular in Discussions Top

jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
AstonJ
If so I (and hopefully others!) might have some tips for you :slight_smile: But first, please say which area you’re finding most challen...
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New
RudManusachi
What configs will make sense to put to runtime.exs? – A bit of how I configure apps: I have generic configs in config/config.exs, dev...
New

Other popular topics Top

New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54921 245
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

We're in Beta

About us Mission Statement