patrickdavey
vim - Sigil highlighting (liveview)
I’m just working through the prag-prog live view course and discovered that my vim setup just isn’t working nicely for the .ex files where there’s an embedded sigil.
I have looked at other threads and I have configured treesitter (I believe!), but, the .html.heex and also the embedded sigil definitions just don’t look great see screenshot
Do I need to be using the nightly version of neovim (I’m on NVIM v0.10.0) as that was suggested?
If anyone has a working config shared somewhere I’d love to see it.
Many thanks!
First Post!
nTraum
[…] and I have configured treesitter (I believe!)
Can you share your config?
I don’t think you need 0.10. to highlight heex correctly, but I can’t verify because I am on 0.10 already.
For reference, I am using nvim-treesitter with the following config:
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "lua", "vim", "vimdoc", "query", "elixir", "heex", "javascript", "html" },
sync_install = false,
highlight = { enable = true },
indent = { enable = true },
})
end,
},
Issuing the command :TSInstallInfo / :TSModuleInfo also should show heex being enabled.
Last Post!
patrickdavey
Gah! Worked out my issues (there were several!)
- The main one: I was using a
colorschemewhich wasn’t configured properly for treesitter… Once I had the correct colorscheme I needed to get my terminal to display it properly. - For reasons which are currently beyond me
when I open vim in iterm(in tmux) it doesn’t display properly at all, when I do exactly the same thing inalacrittyit works fine. Frankly I’ve spent too much time fiddling and now that it’s working I don’t want to spend the time to work out why! - I had an old
augroupfor elixir which was manually setting.heexfiles to elixir, I think this was from years ago when I was first playing with it, and things like vim-elixir maybe didn’t exist? (or were more out of date). Anyway, removing that group meant that the.html.eexdisplays properly.
Anyway - all working just fine now → https://imgur.com/a/y02yJOq .. Hopefully this helps some others!
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









