Compare commits

..

33 Commits

Author SHA1 Message Date
1aff7cb8ed
ci: add Lint stage 2024-05-18 04:34:35 -05:00
38ac929e15
docs!: require >= nvim 0.9.5 2024-05-18 03:39:33 -05:00
d06dc900f3
refactor: private did_setup opt in Setup 2024-05-18 03:39:33 -05:00
98fca9bf0e
docs: update README setup example 2024-05-18 03:39:33 -05:00
ccb2a827f2
fix: correctly check for legacy setup 2024-05-15 09:50:50 -05:00
c2bd871627
refactor: pcall require on nvim-treesitter.configs
`nvim-treesitter.configs` is going to be removed soon -- directly requiring it will cause an error once it has been removed.
2024-05-15 09:22:41 -05:00
62f606918b
feat!: overhaul the config setup
This deprecates the old setup layout

Closes https://github.com/PriceHiller/nvim-ts-autotag/issues/5
2024-05-15 09:22:41 -05:00
e2a5a12492
fix: correctly attach to supported buffers
Closes https://github.com/PriceHiller/nvim-ts-autotag/issues/7
2024-05-15 03:00:55 -05:00
9ce1d3765b
refactor: simplify internal setup 2024-05-15 02:09:50 -05:00
5578f796de
feat!: remove hard dependency on nvim-treesitter
This has deprecated `nvim-treesitter` setup. It has *not* been removed
yet.

I intend to tag the previous commit to this as `0.1.0` and then fully
remove `nvim-treesitter` setup support in `1.0.0` -- a breaking change.

TODO: We *must* have a way of detaching the plugin for a given buffer or even globally. Currently the plugin does not have it's own capabilities to do so.
2024-05-15 01:47:44 -05:00
968b2ccc5d
refactor: remove useless/empty function 2024-05-14 16:54:55 -05:00
0dcfc4149f
refactor: use vim.keymap.set for bindings 2024-05-13 19:08:43 -05:00
0291c8c637
style: remove stylua ignores 2024-05-13 17:07:00 -05:00
14e1f22a0d
ci: use self-hosted runner 2024-05-13 16:52:56 -05:00
ef175229a6
ci: update os to ubuntu-24.04 2024-05-13 14:58:16 -05:00
b146a98159
ci: install tree-sitter-cli 2024-05-13 14:56:07 -05:00
b9a588ed7e
ci: remove old test cruft 2024-05-13 14:53:52 -05:00
a92a4e97ec
fix: force a full reparse of ts source
PERF: This will impact performance, something to keep an eye on.

Prior to this commit, some parsers like php were failing in tests. By
forcing a full reparse, the php parser among others get the correct
tree.
2024-05-13 14:49:32 -05:00
81d0c78475
test: improve treesitter setup 2024-05-13 14:22:41 -05:00
94758d5394
refactor: move .luarc.json to toplevel 2024-05-13 13:40:00 -05:00
25db9a0912
test: actually call nvim-treesitter.configs setup 2024-05-13 13:40:00 -05:00
7c2e60f9e8
test: use sync install for ts parsers 2024-05-13 13:40:00 -05:00
e9e94e7fc5
fix: reparse source if the node has changes 2024-05-13 12:58:15 -05:00
Yussef Dalton
462b04fd96
Add Blade filetype
The only thing that's missing is it doesn't indent properly when you
close a tag, but otherwise it closes properly.
2024-05-13 12:58:15 -05:00
6e69cc2751
ci: use neovim nightly 2024-05-13 12:58:15 -05:00
4aee573e50
test: overhaul test setup and make commands 2024-05-13 12:58:14 -05:00
04089f0b7d
refactor: migrate plugin/ file to lua from vimscript 2024-05-13 05:02:17 -05:00
34f6d24007
style: format with stylua 2024-05-13 04:57:23 -05:00
bc8dea7a78
fix(svelte): use correct close tag patterns
See https://github.com/windwp/nvim-ts-autotag/pull/167

Co-authored-by: "roy.crippen4" <roy.crippen4@archarithms.com>
2024-05-13 04:37:33 -05:00
Léo DEVILLE
6bf91cad7e
Add twig filetype
See https://github.com/windwp/nvim-ts-autotag/pull/169

Signed-off-by: Price Hiller <price@orion-technologies.io>
Co-authored-by: Ystri0n <164430108+Ystri0n@users.noreply.github.com>
2024-05-13 04:36:54 -05:00
629011167b
docs: use correct option: skip_tags -> skip_tag
See https://github.com/windwp/nvim-ts-autotag/pull/170

Co-authored-by: nicoqh <nicoqh@gmail.com>
2024-05-13 04:35:59 -05:00
a062fe5f7d
docs: replace Sponsor in README with Fork Status 2024-05-13 04:14:23 -05:00
79884fb3b3
fix: update tag patterns to support new XML TS tags 2024-03-07 10:42:21 -06:00
5 changed files with 20 additions and 84 deletions

View File

@ -1,39 +1,16 @@
name: Tests
on: [push, pull_request]
on: [push, pull_request, workflow_call]
jobs:
x64-ubuntu:
name: X64-ubuntu
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
url: https://github.com/neovim/neovim/releases/download/v0.10.0/nvim-linux64.tar.gz
manager: sudo apt-get
packages: -y fd-find tree-sitter-cli
name: nix-runner
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- run: date +%F > todays-date
- name: Restore cache for today's nightly.
uses: actions/cache@v3
with:
path: _neovim
key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }}
- uses: actions/checkout@v4
- name: Prepare
run: |
${{ matrix.manager }} update
${{ matrix.manager }} install ${{ matrix.packages }}
test -d _neovim || {
mkdir -p _neovim
curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
}
- name: Run Lint
run: make lint
- name: Run tests
run: |
export PATH="${PWD}/_neovim/bin:${PATH}"
export VIMRUNTIME="${PWD}/_neovim/share/nvim/runtime"
make test
- name: Run Tests
run: make test

View File

@ -116,7 +116,9 @@ vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
)
```
## Sponsor
If you find this plugin useful, please consider sponsoring the project.
## Fork Status
[Sponsor](https://paypal.me/trieule1vn)
This is forked from https://github.com/windwp/nvim-ts-autotag due to the primary maintainer's disappearance. Any
PRs/work given to this fork _may_ end up back in the original repository if the primary maintainer comes back.
Full credit to [@windwp](https://github.com/windwp) for the creation of this plugin. Here's to hoping they're ok and will be back sometime down the line.

View File

@ -1,48 +0,0 @@
set rtp +=.
set rtp +=../plenary.nvim/
set rtp +=../nvim-treesitter/
set rtp +=../playground/
set rtp +=../nvim-treesitter-rescript/
runtime! plugin/plenary.vim
runtime! plugin/nvim-treesitter.lua
runtime! plugin/nvim-treesitter-playground.lua
runtime! plugin/nvim-treesitter-rescript.vim
set noswapfile
set nobackup
filetype indent off
set nowritebackup
set noautoindent
set nocindent
set nosmartindent
set indentexpr=
set foldlevel=9999
lua << EOF
_G.__is_log=true
_G.ts_filetypes = {
'html', 'javascript', 'typescript', 'svelte', 'vue', 'tsx', 'php', 'glimmer', 'rescript', 'embedded_template'
}
require("nvim-treesitter.configs").setup({
ensure_installed = _G.ts_filetypes,
highlight = { enable = true },
sync_install = true
})
vim.treesitter.language.register('tsx', 'typescriptreact')
vim.treesitter.language.register('embedded_template', 'eruby')
require("plenary/busted")
vim.cmd[[luafile ./tests/test-utils.lua]]
require("nvim-ts-autotag").setup({
enable = true,
enable_rename = true,
enable_close = true,
enable_close_on_slash = true,
})
EOF

View File

@ -1,5 +1,8 @@
local M = {}
-- Ensure our test lua files are in `package.path`
package.path = "?.lua;" .. package.path
local utils = require("tests.utils.utils")
local root = utils.paths.Root:push(".deps/")
@ -137,7 +140,5 @@ end
M.setup({
["plenary.nvim"] = "https://github.com/nvim-lua/plenary.nvim",
["popup.nvim"] = "https://github.com/nvim-lua/popup.nvim",
["nvim-treesitter"] = "https://github.com/nvim-treesitter/nvim-treesitter",
["playground"] = "https://github.com/nvim-treesitter/playground",
})

View File

@ -1,3 +1,7 @@
-- Ensure our test lua files are in `package.path`
local fdir = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":p:h:h")
package.path = fdir .. "/?.lua;" .. package.path
require("tests.minimal_init")
---@type string