Tuxified / tree-sitter-elixir

Tree Sitter grammar for Elixir
https://tuxified.github.io/tree-sitter-elixir/
MIT License
25 stars 4 forks source link

provide highlighting queries for NeoVim (and others?) #19

Open Tuxified opened 3 years ago

Tuxified commented 3 years ago

In order for NeoVim (and other tools/editors) to be able to use this for their Elixir highlighting, it's probably necessary to provide queries which match the ones that editors use. Editors can also use their own queries, but it would be easier if a default is provided.

rockerBOO commented 3 years ago

I have started to make a highlighting query for this.

https://github.com/rockerBOO/dotfiles/blob/current/config/nvim/after/queries/elixir/highlights.scm

It is a work in progress but feel free to take to build on. I will be working in Elixir on Neovim so I will try to improve it further but need to do some work now.

BlindingDark commented 3 years ago

@rockerBOO

I have a configuration under debugging, please feel free to use it

https://gist.github.com/BlindingDark/f36d24a59b2bf701f7c5d1565216ba40

dkuku commented 3 years ago

maybe we can just add it to: https://github.com/nvim-treesitter/nvim-treesitter there is a section on adding new languages in the readme

rockerBOO commented 3 years ago
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()

parser_config.elixir = {
  install_info = {
    url = "~/code/tree-sitter-elixir", -- local path or git repo
    files = { "src/parser.c" },
  },
  filetype = "elixir", -- if filetype does not agrees with parser name
  used_by = {}, -- additional filetypes that use this parser
}

How I'm using it. But not comfortable with maintaining it right now in nvim-treesitter until I can spend more time with it.