Elixir support #93

Closed
opened 2026-09-21 18:12:06 +00:00 by barrettruth · 10 comments
Owner

Original issue: barrettruth/diffs.nvim#221
Original author: srcrip
Original date: 2026-04-28T19:54:10Z

Prerequisites

Neovim version

NVIM v0.12.0-dev-934+ga9a4c271b1-Homebrew
Build type: Release
LuaJIT 2.1.1753364724
Run "nvim -V1 -v" for more info

Operating system

MacOS

Description

I seem to be unable to get fugitive highlighting to work with Elixir files, even though I do have the elixir TS files installed (I use it for highlighting generally).

Also note, in your repro script, you need to change the module name to just "lazy" not "lazy.nvim"

When I test the minimal repro script, and test out fugitive, I end up seeing TS highlighting in non-elixir files, but no TS highlighting in elixir files.

Steps to reproduce

  1. install fugitive
  2. install this plugin
  3. go to an elixir project
  4. open the fugitive status buffer and see if there is TS highlighting

Health check

==============================================================================
diffs:                                                                      ✅

diffs.nvim ~
- ✅ OK Neovim 0.9.0+ detected
- ✅ OK vim-fugitive detected
- libvscode_diff not found (optional, using native vim.diff fallback)

Minimal reproduction

vim.env.LAZY_STDPATH = '.repro'
load(vim.fn.system('curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua'))()
require('lazy').setup({
  spec = {
    { 'barrettruth/midnight.nvim', lazy = false, config = function() vim.cmd.colorscheme('midnight') end },
    { 'tpope/vim-fugitive' },
    { 'NeogitOrg/neogit', dependencies = { 'nvim-lua/plenary.nvim' } },
    { 'lewis6991/gitsigns.nvim', config = true },
    { 'rhysd/committia.vim' },
    { 'nvim-telescope/telescope.nvim', dependencies = { 'nvim-lua/plenary.nvim' } },
    {
      'barrettruth/diffs.nvim',
      init = function()
        vim.g.diffs = {
          debug = '/tmp/diffs.log',
          integrations = {
            fugitive = true,
            neogit = true,
            gitsigns = true,
            committia = true,
            telescope = true,
          },
        }
      end,
    },
  },
})
> Original issue: barrettruth/diffs.nvim#221 > Original author: `srcrip` > Original date: 2026-04-28T19:54:10Z ### Prerequisites - [x] I have searched [existing issues](https://github.com/barrettruth/diffs.nvim/issues) - [x] I have updated to the latest version ### Neovim version ```text NVIM v0.12.0-dev-934+ga9a4c271b1-Homebrew Build type: Release LuaJIT 2.1.1753364724 Run "nvim -V1 -v" for more info ``` ### Operating system MacOS ### Description I seem to be unable to get fugitive highlighting to work with Elixir files, even though I do have the elixir TS files installed (I use it for highlighting generally). Also note, in your repro script, you need to change the module name to just `"lazy"` not `"lazy.nvim"` When I test the minimal repro script, and test out fugitive, I end up seeing TS highlighting in non-elixir files, but no TS highlighting in elixir files. ### Steps to reproduce 1. install fugitive 2. install this plugin 3. go to an elixir project 4. open the fugitive status buffer and see if there is TS highlighting ### Health check ```text ============================================================================== diffs: ✅ diffs.nvim ~ - ✅ OK Neovim 0.9.0+ detected - ✅ OK vim-fugitive detected - libvscode_diff not found (optional, using native vim.diff fallback) ``` ### Minimal reproduction ```lua vim.env.LAZY_STDPATH = '.repro' load(vim.fn.system('curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua'))() require('lazy').setup({ spec = { { 'barrettruth/midnight.nvim', lazy = false, config = function() vim.cmd.colorscheme('midnight') end }, { 'tpope/vim-fugitive' }, { 'NeogitOrg/neogit', dependencies = { 'nvim-lua/plenary.nvim' } }, { 'lewis6991/gitsigns.nvim', config = true }, { 'rhysd/committia.vim' }, { 'nvim-telescope/telescope.nvim', dependencies = { 'nvim-lua/plenary.nvim' } }, { 'barrettruth/diffs.nvim', init = function() vim.g.diffs = { debug = '/tmp/diffs.log', integrations = { fugitive = true, neogit = true, gitsigns = true, committia = true, telescope = true, }, } end, }, }, }) ```
barrettruth 2026-09-21 18:12:06 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

Original comment: barrettruth/diffs.nvim#221, comment 4338704658
Original author: barrettruth
Original date: 2026-04-28T20:11:40Z

bruh, another problem with the repro script LMAO. sorry. looking into this now (repro + issue)

EDIT: repro script no longer uses lazy and works. gosh... i hate lazy. looking into the highlighting issue now.

> Original comment: barrettruth/diffs.nvim#221, comment 4338704658 > Original author: `barrettruth` > Original date: 2026-04-28T20:11:40Z bruh, another problem with the repro script LMAO. sorry. looking into this now (repro + issue) EDIT: repro script no longer uses lazy and works. gosh... i hate lazy. looking into the highlighting issue now.
Author
Owner

Original comment: barrettruth/diffs.nvim#221, comment 4338907433
Original author: barrettruth
Original date: 2026-04-28T20:42:36Z

Image

UPD: unable to reproduce with some sample code.

Please try with the up-to-date reproduction script. Apologies for the inconvenience.

Obligatory mention: please check your plugins, try with nvim --noplugin, etc.

> Original comment: barrettruth/diffs.nvim#221, comment 4338907433 > Original author: `barrettruth` > Original date: 2026-04-28T20:42:36Z <img width="501" height="512" alt="Image" src="https://forge.barrettruth.com/attachments/02901941-c968-41a0-a07c-7c2c0c3ed784" /> UPD: unable to reproduce with some sample code. Please try with the up-to-date reproduction script. Apologies for the inconvenience. Obligatory mention: please check your plugins, try with `nvim --noplugin`, etc.
Author
Owner

Original comment: barrettruth/diffs.nvim#221, comment 4339728945
Original author: srcrip
Original date: 2026-04-28T23:07:03Z

Hmm that’s weird, yeah it didn’t look like that at all for me… but let me try the new version of the script and see if that’s the difference.

> Original comment: barrettruth/diffs.nvim#221, comment 4339728945 > Original author: `srcrip` > Original date: 2026-04-28T23:07:03Z Hmm that’s weird, yeah it didn’t look like that at all for me… but let me try the new version of the script and see if that’s the difference.
Author
Owner

Original comment: barrettruth/diffs.nvim#221, comment 4339732073
Original author: srcrip
Original date: 2026-04-28T23:07:47Z

I will try that no plugin flag, I thought passing it the script disabled all my other startup files plugins but maybe it didn’t.

> Original comment: barrettruth/diffs.nvim#221, comment 4339732073 > Original author: `srcrip` > Original date: 2026-04-28T23:07:47Z I will try that no plugin flag, I thought passing it the script disabled all my other startup files plugins but maybe it didn’t.
Author
Owner

Original comment: barrettruth/diffs.nvim#221, comment 4339812267
Original author: barrettruth
Original date: 2026-04-28T23:26:35Z

(it probably did - i was just being cautious)

BTW, if you want - link me your dotfiles. I can debug for you xd (or, do my best to)

> Original comment: barrettruth/diffs.nvim#221, comment 4339812267 > Original author: `barrettruth` > Original date: 2026-04-28T23:26:35Z (it probably did - i was just being cautious) BTW, if you want - link me your dotfiles. I can debug for you xd (or, do my best to)
Author
Owner

Original comment: barrettruth/diffs.nvim#221, comment 4353705735
Original author: srcrip
Original date: 2026-04-30T15:15:01Z

ok @barrettruth I tested with the new version of that script, and using --clean, which should disable all my plugins, and I can confirm that I don't seem to be getting any elixir highlighting in fugitive status buffer diffs. Just looks exactly identical to regular diff highlights.

I think you should be able to repro this the same way... just try cloneing an elixir library on github, change some files, then put your script in the repo and run it the same way, open fugitive, and you should be able to confirm that the highlighting isn't there

Just to be sure I also backed up and deleted my init.lua, and tested again, just in case --clean wasn't actually removing my startup stuff, and I can confirm it looked the same.

I am not really sure why it would work differently with elixir... maybe something to do with how the TS stuff is implemented for it? I have no idea.

> Original comment: barrettruth/diffs.nvim#221, comment 4353705735 > Original author: `srcrip` > Original date: 2026-04-30T15:15:01Z ok @barrettruth I tested with the new version of that script, and using `--clean`, which should disable all my plugins, and I can confirm that I don't seem to be getting any elixir highlighting in fugitive status buffer diffs. Just looks exactly identical to regular diff highlights. I think you should be able to repro this the same way... just try cloneing an elixir library on github, change some files, then put your script in the repo and run it the same way, open fugitive, and you should be able to confirm that the highlighting isn't there Just to be sure I also backed up and deleted my init.lua, and tested again, just in case `--clean` wasn't actually removing my startup stuff, and I can confirm it looked the same. I am not really sure why it would work differently with elixir... maybe something to do with how the TS stuff is implemented for it? I have no idea.
Author
Owner

Original comment: barrettruth/diffs.nvim#221, comment 4353725199
Original author: srcrip
Original date: 2026-04-30T15:17:38Z

Is it possible that the startup script isn't using a colorscheme that has the proper highlights for me to see it properly when testing with it or something?

I could also try just going into my startup script and removing everything except for this plugin, fugitive, and treesitter stuff, but I'd think the repro script should be identical to that...

Only other thing I can think of if you can't repro it is some difference with my treesitter versions of vim versions or something?

> Original comment: barrettruth/diffs.nvim#221, comment 4353725199 > Original author: `srcrip` > Original date: 2026-04-30T15:17:38Z Is it possible that the startup script isn't using a colorscheme that has the proper highlights for me to see it properly when testing with it or something? I could also try just going into my startup script and removing everything except for this plugin, fugitive, and treesitter stuff, but I'd think the repro script should be identical to that... Only other thing I can think of if you can't repro it is some difference with my treesitter versions of vim versions or something?
Author
Owner

Original comment: barrettruth/diffs.nvim#221, comment 4355760915
Original author: barrettruth
Original date: 2026-04-30T20:02:24Z

Super sorry that you ended up being the guinea-pig for this. I've updated the repro script to use the user's treesitter scripts in the environment in the repo for simplicity. Please try again.

> Original comment: barrettruth/diffs.nvim#221, comment 4355760915 > Original author: `barrettruth` > Original date: 2026-04-30T20:02:24Z Super sorry that you ended up being the guinea-pig for this. I've updated the repro script to use the user's treesitter scripts in the environment in the repo for simplicity. Please try again.
Author
Owner

Original comment: barrettruth/diffs.nvim#221, comment 4391581917
Original author: barrettruth
Original date: 2026-05-06T19:56:54Z

?

> Original comment: barrettruth/diffs.nvim#221, comment 4391581917 > Original author: `barrettruth` > Original date: 2026-05-06T19:56:54Z ?
Author
Owner

Original comment: barrettruth/diffs.nvim#221, comment 4467581049
Original author: barrettruth
Original date: 2026-05-16T17:20:41Z

Feel free to reopen. Very likely a plugin-load-ordering issue.

> Original comment: barrettruth/diffs.nvim#221, comment 4467581049 > Original author: `barrettruth` > Original date: 2026-05-16T17:20:41Z Feel free to reopen. Very likely a plugin-load-ordering issue.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
barrettruth/diffs.nvim#93
No description provided.