ohnoimdead
Heya, apologies in advance if there’s a better place to ask this, happy to move it if so.
I’m just playing around with AstroNvim (GitHub - AstroNvim/AstroNvim: AstroNvim is an aesthetic and feature-rich neovim config that is extensible and easy to use with a great set of plugins · GitHub) and trying to get all of elixir, heex, and TailwindCSS working similarly to VSCode with the usual plugins. I’m 90% sure this is my lack of understanding of how to configure neovim to use the right language server and/or treesitter for .ex and .heex, but I’m a bit stuck at the moment. Curious if anyone else has gotten this all working? And to head off the simple questions: I have tailwindcss and elixirls with lsp and elixir and heex with ts. All the elixirls stuff works great in .ex, and all of tailwindcss works in .html, but it doesn’t all want to work together in .ex inside ~H sigils or in .heex.
I’ll keep poking at it until I find the right knobs and switches, but if someone is like: oh yeah, just do [obvious thing that I’m missing], then that would be super helpful.
Cheers!
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Sebb
I tried this with LunarVim this weekend and gave up very frustrated. You have to be very intelligent for this or make configuring a editor your hobby. Both not for me. I’d love to use a real vim for Elixir, but now I’ve settled with vscode-neovim which seem fine.
dimitarvp
That’s one of my very few criticisms towards VIM and Emacs – sub-modes / sub-file highlighting.
At one point I just figured “frak it” and started working without those, still in VIM and Emacs. If it gets too frustrating I’ll just hop into VSCode temporarily; it’s 50x easier to customize anyway.
100% agreed and that doesn’t apply only for sub-mode highlighting. It applies to a lot of stuff in both editors. I have been vocal here occasionally that I gave up on Emacs. I won’t be giving up on NeoVim / LunarVim anytime soon – they are, to me, much better than Emacs – but the culture of “keep hacking it and make it your own” (a culture I started to despise with time) is still there. It’s still much easier to “hack on” than Emacs though (again, IMO) so I’ll stick around. I already have a good idea how to customize NeoVim / LunarVim and I like it much better.
But yeah, they still need more work in some areas. Maybe that will come with time, in the meantime I chose to simply not care.
Sebb
With VSCode Neovim - Visual Studio Marketplace (not the default vscode-vim) you get a decent vim-experience inside vscode. You have access to plugins and :ex-mode.
This is my
init.vimand I will be happy with that as soon I’ve got visual-multi running.Note, that you have to execute :PlugInstall to install plugins in nvim (does not seem to work in vscode).
For Elixir I have the “normal” vscode-plugins installed which coexist with no problems. See Formatting Phoenix HEEx Templates in VS Code
ohnoimdead
Well poop, after spending a couple of hours on it I think I have to give up for now, sadly. My only guess is that the configuration for elixirls in the (very excellent) vscode ElixirLS plugin is doing something to make everything work well together.
Damn you neovim! Why do you make it so hard to love you??
ohnoimdead
Yeah, same here (everything works great in VSCode with the usual plugins). Although I just use the regular ol’ Vim plugin… I might check out the Neovim one at some point. Anyway, this was more a curiosity. I think AstroNvim is very cool and probably works great for some of the languages that maybe have a bit more coverage on the integration with the IDE front. It’s fine though, VSCode serves my needs beautifully and I really have no complaints.
Sebb
the default plugin is great. Everything just works.
But I need ex-mode, eg for applying a macro to all selected lines like
:'<,'>norm @aI wonder where the vim-thusiasts are … as there is a way to do it for sure (just not for mere mortals)
groig
I use neovim configured from scratch and it wasn’t difficult to get it all working. Here are the relevant parts of my config:
Treesitter options:
Lsp configs for tailwind and elixir-ls
Some screenshots showing the highlight and the elixir-ls and tailwind completions both inside ~H sigils and heex files:
Here is a very trimmed down version of kickstart.nvim with working treesitter highlight, completion and snippets similar to how it works on my config
Sebb
this comment is like all the vim-related documentation. Good for people already expert on the matter.
dimitarvp
Ohhh, I’ll try this and report back (if I find a HEEX file to try it on
).
Sebb
would be nice if you enable others less blessed to also do it if its working for you.
@ohnoimdead you did mark it as solution. Do you have a config now that does all you want? Can you share it?