patrickdavey
Heex formatting with vim (and coc.vim)
My vim setup is not formatting heex files (it’ll format .ex files on save happily).
When I run it manually with :call CocAction('format') I get Error invoking 'format' on channel 3 (coc):^@Format provider not found for buffer: and I’m a little lost.
My config has:
"elixir",
"heex",
"javascript"
],
And if I run :set filetype it has filetype=heex.
If I run the formatter manually with mix format it works fine.
anyone have this working and can give me a pointer?
Most Liked
arcanemachine
Here’s the Elixir-related stuff from my ~/.config/nvim/coc-settings.json file:
{
"coc.preferences.formatOnSave": true,
"coc.preferences.formatOnSaveFiletypes": [
"elixir",
"eelixir",
"heex",
"json",
"jsonc"
],
"diagnostic.checkCurrentLine": true,
"diagnostic-languageserver.filetypes": {
"elixir": ["mix_credo", "mix_credo_compile"],
"eelixir": ["mix_credo", "mix_credo_compile"],
"heex": ["mix_credo", "mix_credo_compile"]
},
"elixir.pathToElixirLS": "~/.local/lib/elixir-ls/language_server.sh",
"elixirLS.dialyzerEnabled": true,
"tailwindCSS.includeLanguages": {
"eelixir": "html",
"elixir": "html",
"heex": "html"
}
}
I’ll be honest, I wouldn’t be surprised if some of those lines aren’t actually doing anything, and might just be residue left over from a previous time where I was in the same position as you.
The Tailwind stuff is for some CoC Tailwind plugin, and the pathToElixirLS is where I saved a copy of ElixirLS that I downloaded from their GitHub releases page.
As for the Credo stuff, well… I have no idea when or why I put that there. Might need to do some spring cleaning for my cluttered CoC config…
Last Post!
patrickdavey
Thanks for the reply. I tried with some of those settings (the ones specific to the formatting at least), and, still no dice.
I’ll keep looking ![]()
Popular in Questions
Other popular 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
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









