Skip to content

Instantly share code, notes, and snippets.

@Riddlerrr
Last active November 7, 2024 10:05
Show Gist options
  • Save Riddlerrr/126784d605913c3c240fc21efdc57a41 to your computer and use it in GitHub Desktop.
Save Riddlerrr/126784d605913c3c240fc21efdc57a41 to your computer and use it in GitHub Desktop.
Lazyvim: Associate custom file extension to a filetype

neovim (nvim) settings for associating *.jbuilder files to ruby language for LazyVim using filetype function.

To reach that we need to tune up nvim-treesitter plugin options.

-- .config/nvim/lua/plugins/treesitter.lua
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, _)
vim.filetype.add({
extension = { jbuilder = "ruby" },
})
end,
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment