From 1ede90b7ec7c4492107e41fd274a67561fd1cd7e Mon Sep 17 00:00:00 2001 From: qwjyh Date: Mon, 13 Mar 2023 04:20:25 +0900 Subject: [PATCH] update: nvim: add satysfi tree-sitter --- bin/install.sh | 4 ++++ dotfiles/neovim/init.lua | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/bin/install.sh b/bin/install.sh index 588ccbd..e4b78ed 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -25,4 +25,8 @@ mkdir -p ~/.config/nvim/lua ln -sf $(pwd)/dotfiles/neovim/lua/lualine_setup.lua ~/.config/nvim/lua/lualine_setup.lua mkdir -p ~/.config/nvim/lua/lspconfig/server_configurations ln -sf $(pwd)/dotfiles/neovim/lua/lspconfig/server_configurations/satysfi_ls.lua ~/.config/nvim/lua/lspconfig/server_configurations/satysfi_ls.lua +mkdir -p ~/.config/nvim/after/queries/satysfi +curl -o ~/.config/nvim/after/queries/satysfi/highlights.scm https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/highlights.scm +curl -o ~/.config/nvim/after/queries/satysfi/indents.scm https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/indents.scm +curl -o ~/.config/nvim/after/queries/satysfi/matchup.scm https://raw.githubusercontent.com/monaqa/tree-sitter-satysfi/master/queries/matchup.scm diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index 02352fa..2a6e624 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -119,7 +119,22 @@ require('lualine_setup') ----------------------------------------------------------- -- Treesitter -- manually install parsers with `:TSInstall ` + +-- satysfi (https://github.com/monaqa/tree-sitter-satysfi) +local parser_config = require "nvim-treesitter.parsers".get_parser_configs() +parser_config.satysfi = { + install_info = { + url = "https://github.com/monaqa/tree-sitter-satysfi", + files = { "src/parser.c", "src/scanner.c" } + }, + filetype = 'satysfi', +} + +-- setup require'nvim-treesitter.configs'.setup { + ensure_installed = { + 'satysfi', + }, highlight = { enable = true, },