Add Treesitter

writing
Nick Zana 2 years ago
parent c67ba08293
commit 692a67e84f

@ -4,3 +4,4 @@ require('autocmd') -- Convenient Autocommands
require('lsp') require('lsp')
require('keybindings') require('keybindings')
require('nvim-cmp-cfg') require('nvim-cmp-cfg')
require('ts_config')

@ -11,7 +11,6 @@ local plugins = require('packer').startup(function(use)
-- file management -- file management
use { use {
'nvim-telescope/telescope.nvim', -- search and select tool 'nvim-telescope/telescope.nvim', -- search and select tool
commit = '80cdb00b221f69348afc4fb4b701f51eb8dd3120', -- for neovim 0.5.0 compatibility
requires = { {'nvim-lua/plenary.nvim'} } requires = { {'nvim-lua/plenary.nvim'} }
} }
@ -22,7 +21,6 @@ local plugins = require('packer').startup(function(use)
use 'neovim/nvim-lspconfig' -- Common lsp server configurations use 'neovim/nvim-lspconfig' -- Common lsp server configurations
use { use {
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
commit = '2aa7eee28b4d49e999c694ca733a393da5808dd6',
} -- Autocompletion plugin } -- Autocompletion plugin
use 'hrsh7th/cmp-nvim-lsp' -- LSP source for nvim-cmp use 'hrsh7th/cmp-nvim-lsp' -- LSP source for nvim-cmp
@ -36,8 +34,14 @@ local plugins = require('packer').startup(function(use)
commit = 'b10829736542e7cc9291e60bab134df1273165c9', commit = 'b10829736542e7cc9291e60bab134df1273165c9',
} }
use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate'
}
-- Language Specfic -- Language Specfic
use 'rust-lang/rust.vim' use 'rust-lang/rust.vim'
use 'https://git.sr.ht/~sircmpwn/hare.vim'
if packer_bootstrap then if packer_bootstrap then
require('packer').sync() require('packer').sync()

@ -0,0 +1,11 @@
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.hare = {
install_info = {
url = "https://git.sr.ht/~ecmma/tree-sitter-hare", -- local path or git repo
files = {"src/parser.c"},
-- optional entries:
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
},
filetype = "ha", -- if filetype does not match the parser name
}
Loading…
Cancel
Save