/
githubmirror
/
carbon-lang
Обзор
Документация
Войти
/
githubmirror
/
carbon-lang
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
utils/nvim/setup.sh
25 строк
777 B
Jon Ross-Perkins
Migrate tree-sitter support to MODULE.bazel (#4783)
13 янв 2025, 22:04
Не верифицирован
13 янв 2025, 22:04
6f6e46e
Код
Авторство
О чём код?
#!/bin/sh # Part of the Carbon Language project, under the Apache License v2.0 with LLVM # Exceptions. See /LICENSE for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception set -xeuo pipefail ROOT="$(git rev-parse --show-toplevel)" mkdir -p ~/.config/nvim/{lua,parser,queries} # add highlight queries ln -sTf "$PWD/utils/tree_sitter/queries" ~/.config/nvim/queries/carbon # add carbon.lua ln -sf "$PWD/utils/nvim/carbon.lua" ~/.config/nvim/lua/carbon.lua # load carbon.lua on startup grep 'require "carbon"' ~/.config/nvim/init.lua || echo 'require "carbon"' >> ~/.config/nvim/init.lua # build tree_sitter cd utils/tree_sitter tree-sitter generate clang -o ~/.config/nvim/parser/carbon.so -shared src/parser.c src/scanner.c -I ./src -Os -fPIC