aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKiyoon Kim <yoonkr33@gmail.com>2023-02-15 14:56:45 +0000
committerStephan Seitz <stephan.seitz@fau.de>2023-02-16 01:48:37 -0800
commit80e41f22ceaa088df6d93a0026d1e7783bc6079e (patch)
tree23beec60ee213e52277b74a78325359c7417066a
parentUpdate parsers: c_sharp, fortran, sql (diff)
downloadnvim-treesitter-80e41f22ceaa088df6d93a0026d1e7783bc6079e.tar
nvim-treesitter-80e41f22ceaa088df6d93a0026d1e7783bc6079e.tar.gz
nvim-treesitter-80e41f22ceaa088df6d93a0026d1e7783bc6079e.tar.bz2
nvim-treesitter-80e41f22ceaa088df6d93a0026d1e7783bc6079e.tar.lz
nvim-treesitter-80e41f22ceaa088df6d93a0026d1e7783bc6079e.tar.xz
nvim-treesitter-80e41f22ceaa088df6d93a0026d1e7783bc6079e.tar.zst
nvim-treesitter-80e41f22ceaa088df6d93a0026d1e7783bc6079e.zip
prettier formatting yml and md
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.yml2
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md5
-rw-r--r--.github/ISSUE_TEMPLATE/highlighting_issue.yml2
-rw-r--r--.github/workflows/lint.yml16
-rw-r--r--.github/workflows/test-queries.yml4
-rw-r--r--.github/workflows/tests.yml4
-rw-r--r--.github/workflows/update-lockfile.yml2
-rw-r--r--CONTRIBUTING.md7
-rw-r--r--README.md26
9 files changed, 36 insertions, 32 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 0b6c990a9..f68dd2486 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,6 +1,6 @@
name: Bug report
description: Create a report to help us improve
-labels: [ bug ]
+labels: [bug]
body:
- type: markdown
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index 11fc491ef..d883b8f2d 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
-title: ''
+title: ""
labels: enhancement
-assignees: ''
-
+assignees: ""
---
**Is your feature request related to a problem? Please describe.**
diff --git a/.github/ISSUE_TEMPLATE/highlighting_issue.yml b/.github/ISSUE_TEMPLATE/highlighting_issue.yml
index b6c4404fc..2713df8a1 100644
--- a/.github/ISSUE_TEMPLATE/highlighting_issue.yml
+++ b/.github/ISSUE_TEMPLATE/highlighting_issue.yml
@@ -1,6 +1,6 @@
name: Highlighting issue
description: Missing or incorrect highlights or you want to change the way something is highlighted
-labels: [ highlights ]
+labels: [highlights]
body:
- type: markdown
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 71510b1b9..dd608d246 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -1,6 +1,6 @@
name: Linting and style checking
-on:
+on:
push:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
@@ -25,10 +25,10 @@ jobs:
name: StyLua
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- - name: Lint with stylua
- uses: JohnnyMorganz/stylua-action@v2
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- version: latest
- args: --check .
+ - uses: actions/checkout@v3
+ - name: Lint with stylua
+ uses: JohnnyMorganz/stylua-action@v2
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ version: latest
+ args: --check .
diff --git a/.github/workflows/test-queries.yml b/.github/workflows/test-queries.yml
index 5c9786536..fd1fdce8f 100644
--- a/.github/workflows/test-queries.yml
+++ b/.github/workflows/test-queries.yml
@@ -3,11 +3,11 @@ name: Test queries
on:
push:
branches:
- - 'master'
+ - "master"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- - 'master'
+ - "master"
# Cancel any in-progress CI runs for a PR if it is updated
concurrency:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 078cdbd52..a628d4d7c 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -3,11 +3,11 @@ name: Tests
on:
push:
branches:
- - 'master'
+ - "master"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- - 'master'
+ - "master"
# Cancel any in-progress CI runs for a PR if it is updated
concurrency:
diff --git a/.github/workflows/update-lockfile.yml b/.github/workflows/update-lockfile.yml
index 8eaddb3b9..806f85701 100644
--- a/.github/workflows/update-lockfile.yml
+++ b/.github/workflows/update-lockfile.yml
@@ -2,7 +2,7 @@ name: Update lockfile
on:
schedule:
- - cron: '30 6 * * *'
+ - cron: "30 6 * * *"
workflow_dispatch:
jobs:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index fd858d459..c01bc569b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -8,7 +8,7 @@ If you haven't already, you should really come and reach out to us on our
As you know, `nvim-treesitter` is roughly split in two parts:
- Parser configurations : for various things like `locals`, `highlights`
-- What we like to call *modules* : tiny lua modules that provide a given feature, based on parser configurations
+- What we like to call _modules_ : tiny lua modules that provide a given feature, based on parser configurations
Depending on which part of the plugin you want to contribute to, please read the appropriate section.
@@ -44,7 +44,7 @@ on the "Neovim tree-sitter" [Matrix channel].
## Parser configurations
Contributing to parser configurations is basically modifying one of the `queries/*/*.scm`.
-Each of these `scheme` files contains a *tree-sitter query* for a given purpose.
+Each of these `scheme` files contains a _tree-sitter query_ for a given purpose.
Before going any further, we highly suggest that you [read more about tree-sitter queries](https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries).
Each query has an appropriate name, which is then used by modules to extract data from the syntax tree.
@@ -56,7 +56,7 @@ For now these are the types of queries used by `nvim-treesitter`:
- `folds.scm`: used to define folds.
- `injections.scm`: used to define injections.
-For these types there is a *norm* you will have to follow so that features work fine.
+For these types there is a _norm_ you will have to follow so that features work fine.
Here are some global advices:
- If your language is listed [here](https://github.com/nvim-treesitter/nvim-treesitter#supported-languages),
@@ -222,7 +222,6 @@ Used for XML-like tags.
#### Conceal
-
```scheme
@conceal ; for captures that are only used for concealing
```
diff --git a/README.md b/README.md
index 18c06ed2d..1a0fe6243 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ We recommend using the nightly builds of Neovim if possible.
You can find the current roadmap [here](https://github.com/nvim-treesitter/nvim-treesitter/projects/1).
The roadmap and all features of this plugin are open to change, and any suggestion will be highly appreciated!**
-Nvim-treesitter is based on three interlocking features: [**language parsers**](#language-parsers), [**queries**](#adding-queries), and [**modules**](#available-modules), where *modules* provide features – e.g., highlighting – based on *queries* for syntax objects extracted from a given buffer by *language parsers*.
+Nvim-treesitter is based on three interlocking features: [**language parsers**](#language-parsers), [**queries**](#adding-queries), and [**modules**](#available-modules), where _modules_ provide features – e.g., highlighting – based on _queries_ for syntax objects extracted from a given buffer by _language parsers_.
Users will generally only need to interact with parsers and modules as explained in the next section.
For more detailed information on setting these up, see ["Advanced setup"](#advanced-setup).
@@ -50,12 +50,12 @@ For more detailed information on setting these up, see ["Advanced setup"](#advan
### Table of contents
-* [Quickstart](#quickstart)
-* [Supported languages](#supported-languages)
-* [Available modules](#available-modules)
-* [Advanced setup](#advanced-setup)
-* [Extra features](#extra-features)
-* [Troubleshooting](#troubleshooting)
+- [Quickstart](#quickstart)
+- [Supported languages](#supported-languages)
+- [Available modules](#available-modules)
+- [Advanced setup](#advanced-setup)
+- [Extra features](#extra-features)
+- [Troubleshooting](#troubleshooting)
---
@@ -85,9 +85,11 @@ For other plugin managers such as `packer.nvim`, see this [Installation page fro
Treesitter uses a different _parser_ for every language, which needs to be generated via `tree-sitter-cli` from a `grammar.js` file, then compiled to a `.so` library that needs to be placed in neovim's `runtimepath` (typically under `parser/{language}.so`).
To simplify this, `nvim-treesitter` provides commands to automate this process.
If the language is already [supported by `nvim-treesitter`](#supported-languages), you can install it with
+
```vim
:TSInstall <language_to_install>
```
+
This command supports tab expansion.
You can also get a list of all available languages and their installation status with `:TSInstallInfo`.
Parsers not on this list can be added manually by following the steps described under ["Adding parsers"](#adding-parsers) below.
@@ -171,6 +173,7 @@ We are looking for maintainers to add more parsers and to write query files for
<!--This section of the README is automatically updated by a CI job-->
<!--parserinfo-->
+
- [x] [ada](https://github.com/briot/tree-sitter-ada) (maintained by @briot)
- [x] [agda](https://github.com/AusCyberman/tree-sitter-agda) (maintained by @Decodetalkers)
- [x] [arduino](https://github.com/ObserverOfTime/tree-sitter-arduino) (maintained by @ObserverOfTime)
@@ -407,7 +410,7 @@ require'nvim-treesitter.configs'.setup {
#### Folding
-Tree-sitter based folding. *(Technically not a module because it's per windows and not per buffer.)*
+Tree-sitter based folding. _(Technically not a module because it's per windows and not per buffer.)_
```vim
set foldmethod=expr
@@ -428,7 +431,7 @@ directory with `parser_install_dir` option in that is passed to `setup`.
This directory must be writeable and must be explicitly added to the
`runtimepath`. For example:
-``` lua
+```lua
vim.opt.runtimepath:append("/some/path/to/store/parsers")
require'nvim-treesitter.configs'.setup {
@@ -449,6 +452,7 @@ will still be considered installed. (For example if
considered installed, even though it is not in `parser_install_dir`)
The default paths are:
+
1. first the package folder. Where `nvim-treesitter` is installed.
2. second the site directory. This is the "site" subdirectory of `stdpath("data")`.
@@ -490,7 +494,7 @@ Once the parser is installed, you can update it (from the latest revision of the
Note that neither `:TSInstall` nor `:TSInstallFromGrammar` copy query files from the grammar repository.
If you want your installed grammar to be useful, you must manually [add query files](#adding-queries) to your local nvim-treesitter installation.
Note also that module functionality is only triggered if your language's filetype is correctly identified.
-If Neovim does not detect your language's filetype by default, you can use [Neovim's `vim.filetype.add()`](https://neovim.io/doc/user/lua.html#vim.filetype.add()) to add a custom detection rule.
+If Neovim does not detect your language's filetype by default, you can use [Neovim's `vim.filetype.add()`](<https://neovim.io/doc/user/lua.html#vim.filetype.add()>) to add a custom detection rule.
If you use a git repository for your parser and want to use a specific version, you can set the `revision` key
in the `install_info` table for you parser config.
@@ -645,11 +649,13 @@ require("nvim-treesitter.install").prefer_git = true
#### I want to use a HTTP proxy for downloading the parsers
You can either configure curl to use additional CLI arguments in your Lua config:
+
```lua
require("nvim-treesitter.install").command_extra_args = {
curl = { "--proxy", "<proxy url>" },
}
```
+
or you can configure git via `.gitconfig` and use git instead of curl
```lua