All Projects → MunifTanjim → nvim-treesitter-lua

MunifTanjim / nvim-treesitter-lua

Licence: MIT license
Tree-sitter Lua parser integration for nvim-treesitter.

Programming Languages

scheme
763 projects
lua
6591 projects

Projects that are alternatives of or similar to nvim-treesitter-lua

boo-colorscheme-nvim
Boo is a colorscheme for Neovim with handcrafted support for LSP, Treesitter.
Stars: ✭ 62 (+416.67%)
Mutual labels:  treesitter
zephyr-nvim
A dark neovim colorscheme written in lua
Stars: ✭ 196 (+1533.33%)
Mutual labels:  treesitter
Comment.nvim
🧠 💪 // Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more
Stars: ✭ 796 (+6533.33%)
Mutual labels:  treesitter
nvim context vt
Virtual text context for neovim treesitter
Stars: ✭ 193 (+1508.33%)
Mutual labels:  treesitter
aurora
24-bit dark theme for (Neo)vim. Optimized for treesitter, LSP.
Stars: ✭ 141 (+1075%)
Mutual labels:  treesitter
nvim-ts-autotag
Use treesitter to auto close and auto rename html tag
Stars: ✭ 421 (+3408.33%)
Mutual labels:  treesitter
evil-textobj-tree-sitter
Tree-sitter powered textobjects for evil mode in Emacs
Stars: ✭ 88 (+633.33%)
Mutual labels:  treesitter
nvim
No description or website provided.
Stars: ✭ 28 (+133.33%)
Mutual labels:  treesitter
onedark.nvim
One dark and light colorscheme for neovim >= 0.5.0 written in lua based on Atom's One Dark and Light theme. Additionally, it comes with 5 color variant styles
Stars: ✭ 425 (+3441.67%)
Mutual labels:  treesitter
material.nvim
🔱 Material colorscheme for NeoVim written in Lua with built-in support for native LSP, TreeSitter and many more plugins
Stars: ✭ 574 (+4683.33%)
Mutual labels:  treesitter
navigator.lua
Source code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐. Exploring LSP and 🌲Treesitter symbols a piece of 🍰. Take control like a boss 🦍.
Stars: ✭ 781 (+6408.33%)
Mutual labels:  treesitter
Dotfiles
Well documented awesome dotfiles 😍 Many neovim lua configs, handy zsh/bash functions, fzf functions + more
Stars: ✭ 64 (+433.33%)
Mutual labels:  treesitter
neon
Customizable coloscheme with dark and light options, vivid colors and easy on the eye.
Stars: ✭ 100 (+733.33%)
Mutual labels:  treesitter
nvim-highlite
A colorscheme template that is "lite" on logic for the developer.
Stars: ✭ 163 (+1258.33%)
Mutual labels:  treesitter
nightfox.nvim
🦊A highly customizable theme for vim and neovim with support for lsp, treesitter and a variety of plugins.
Stars: ✭ 1,489 (+12308.33%)
Mutual labels:  treesitter
awesome-neovim
Awesome Configurations for C/C++,Zig,Web and Lua development in NeoVim
Stars: ✭ 54 (+350%)
Mutual labels:  treesitter
kosmikoa.nvim
A dark color scheme for Neovim with support for LSP, Treesitter. This mirror is deprecated. Use the repo at https://sr.ht/~novakane/kosmikoa.nvim/
Stars: ✭ 23 (+91.67%)
Mutual labels:  treesitter
vim-lighthaus
A Lighthaus theme for (n)vim, vim-airline and lightline
Stars: ✭ 33 (+175%)
Mutual labels:  treesitter
vscode.nvim
Neovim/Vim color scheme inspired by Dark+ and Light+ theme in Visual Studio Code
Stars: ✭ 362 (+2916.67%)
Mutual labels:  treesitter

nvim-treesitter-lua

Lua parser: MunifTanjim/tree-sitter-lua.

This repository is now archived. Everything is merged into nvim-treesitter/nvim-treesitter.

Archived Documentation

Tree-sitter Lua parser integration for nvim-treesitter.

Installation

Install the plugins with your preferred plugin manager. For example, with vim-plug:

Plug 'MunifTanjim/nvim-treesitter-lua'
Plug 'nvim-treesitter/nvim-treesitter'

And put this in your config file:

require("nvim-treesitter-lua").setup()

After that you can install the parser using this command:

:TSInstall lua

Tree-sitter Queries

This Lua parser is different than the default one that comes with nvim-treesitter. So all the plugin that comes with tree-sitter queries for that default parser won't work with this one.

So, nvim-treesitter-lua includes queries for a few plugins in the ./queries/lua folder:

If you want to contribute queries for other plugins, please open a Pull Request.

It also returns some functions you can use to add/remove queries.

treesitter_lua.get_query

Returns the query content for name.

Signature: get_query(name: string) -> string

Name Type Description
name string Query name

Examples:

local treesitter_lua = require("nvim-treesitter-lua")

treesitter_lua.get_query('injections')

treesitter_lua.set_query

Sets (append/prepend/replace) the query content for name and returns it.

Signature:

  • set_query(filepath: string, mode?: string) -> string
  • set_query(name: string, content: string, mode?: string) -> string
Name Type Description
filepath string Absolute path to query file
name string Query name
content string Query content
mode "append" (default) / "prepend" / "replace" Mode for set_query

Examples:

local treesitter_lua = require("nvim-treesitter-lua")

-- using filepath
treesitter_lua.set_query("/absolute/path/to/queries/lua/indent.scm", "replace")

-- using name and content
treesitter_lua.set_query("injections", [[
((function_call
  name: (_) @_nvim_exec
  arguments: (arguments (string content: _ @vim)))
  (#match? @_nvim_exec "(^|\.)nvim_exec$"))
]], "append")

License

Licensed under the MIT License. Check the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].