mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
tree-sitter: rename tree_sitter => treesitter for consistency
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "nvim/lua/executor.h"
|
||||
#include "nvim/lua/converter.h"
|
||||
#include "nvim/lua/tree_sitter.h"
|
||||
#include "nvim/lua/treesitter.h"
|
||||
|
||||
#include "luv/luv.h"
|
||||
|
||||
|
@@ -1,10 +0,0 @@
|
||||
#ifndef NVIM_LUA_TREE_SITTER_H
|
||||
#define NVIM_LUA_TREE_SITTER_H
|
||||
|
||||
#include "tree_sitter/api.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "lua/tree_sitter.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_LUA_TREE_SITTER_H
|
@@ -20,9 +20,9 @@
|
||||
// NOT state-safe, delete when GC is confimed working:
|
||||
static int debug_n_trees = 0, debug_n_cursors = 0;
|
||||
|
||||
#define REG_KEY "tree_sitter-private"
|
||||
#define REG_KEY "treesitter-private"
|
||||
|
||||
#include "nvim/lua/tree_sitter.h"
|
||||
#include "nvim/lua/treesitter.h"
|
||||
#include "nvim/api/private/handle.h"
|
||||
#include "nvim/memline.h"
|
||||
|
||||
@@ -32,7 +32,7 @@ typedef struct {
|
||||
} Tslua_parser;
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "lua/tree_sitter.c.generated.h"
|
||||
# include "lua/treesitter.c.generated.h"
|
||||
#endif
|
||||
|
||||
static struct luaL_Reg parser_meta[] = {
|
10
src/nvim/lua/treesitter.h
Normal file
10
src/nvim/lua/treesitter.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef NVIM_LUA_TREESITTER_H
|
||||
#define NVIM_LUA_TREESITTER_H
|
||||
|
||||
#include "tree_sitter/api.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "lua/treesitter.h.generated.h"
|
||||
#endif
|
||||
|
||||
#endif // NVIM_LUA_TREESITTER_H
|
@@ -232,9 +232,9 @@ local function __index(t, key)
|
||||
if key == 'inspect' then
|
||||
t.inspect = require('vim.inspect')
|
||||
return t.inspect
|
||||
elseif key == 'tree_sitter' then
|
||||
t.tree_sitter = require('vim.tree_sitter')
|
||||
return t.tree_sitter
|
||||
elseif key == 'treesitter' then
|
||||
t.treesitter = require('vim.treesitter')
|
||||
return t.treesitter
|
||||
elseif require('vim.shared')[key] ~= nil then
|
||||
-- Expose all `vim.shared` functions on the `vim` module.
|
||||
t[key] = require('vim.shared')[key]
|
||||
|
Reference in New Issue
Block a user