Compare commits

..

39 Commits

Author SHA1 Message Date
e4f9252120
Revert "docs: replace Sponsor in README with Fork Status"
This reverts commit 9b90325db132106218ea6438e7db4f89b436c3f2.
2024-05-19 07:13:42 -05:00
6d690fc131
fix: remove hanging end 2024-05-19 07:03:37 -05:00
209162fde6
ci: use nvim 0.10.0 2024-05-19 07:02:57 -05:00
262a48b242
Revert 14e1f22 'ci: use self-hosted runner' 2024-05-19 07:02:57 -05:00
f655badbb1
Revert 1aff7cb 'ci: add Lint stage' 2024-05-19 07:02:57 -05:00
c43a896ebe
ci: add Lint stage 2024-05-19 07:02:57 -05:00
43669cf7b9
docs!: require >= nvim 0.9.5 2024-05-19 07:02:57 -05:00
ca9ba06e83
refactor: private did_setup opt in Setup 2024-05-19 07:02:56 -05:00
dcbae6df1e
docs: update README setup example 2024-05-19 07:02:56 -05:00
e8ae6e8df3
fix: correctly check for legacy setup 2024-05-19 07:02:56 -05:00
57e7c6c27b
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-19 07:02:56 -05:00
de4f720e00
feat!: overhaul the config setup
This deprecates the old setup layout

Closes https://github.com/PriceHiller/nvim-ts-autotag/issues/5
2024-05-19 07:02:56 -05:00
a14fc79546
fix: correctly attach to supported buffers
Closes https://github.com/PriceHiller/nvim-ts-autotag/issues/7
2024-05-19 07:02:56 -05:00
8e3a7aa96f
refactor: simplify internal setup 2024-05-19 07:02:56 -05:00
ea02d622c3
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-19 07:02:34 -05:00
6c8f07b102
refactor: remove useless/empty function 2024-05-19 07:02:10 -05:00
a4d19476c8
refactor: use vim.keymap.set for bindings 2024-05-19 07:02:10 -05:00
ef6f6e0d48
style: remove stylua ignores 2024-05-19 07:02:10 -05:00
7f91215f15
ci: use self-hosted runner 2024-05-19 07:02:10 -05:00
3925ec3f34
ci: update os to ubuntu-24.04 2024-05-19 07:02:10 -05:00
9d9d0a812e
ci: install tree-sitter-cli 2024-05-19 07:02:09 -05:00
03cc1b52ff
ci: remove old test cruft 2024-05-19 07:02:07 -05:00
9191009088
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-19 07:01:59 -05:00
1299cbc639
test: improve treesitter setup 2024-05-19 07:01:47 -05:00
8c1895066c
refactor: move .luarc.json to toplevel 2024-05-19 07:01:46 -05:00
fe3dbcc277
test: actually call nvim-treesitter.configs setup 2024-05-19 07:01:46 -05:00
c16ff16926
test: use sync install for ts parsers 2024-05-19 07:01:46 -05:00
20491dc57e
fix: reparse source if the node has changes 2024-05-19 07:01:46 -05:00
Yussef Dalton
99af6de7cd
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-19 07:01:46 -05:00
a33dc74d47
ci: use neovim nightly 2024-05-19 07:01:42 -05:00
ee56a21770
test: overhaul test setup and make commands 2024-05-19 07:01:20 -05:00
a6728af239
refactor: migrate plugin/ file to lua from vimscript 2024-05-19 07:01:03 -05:00
4466bdcfeb
style: format with stylua 2024-05-19 07:01:00 -05:00
ae27db72e4
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-19 07:00:45 -05:00
Léo DEVILLE
42c89e163b
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-19 07:00:45 -05:00
0121209f76
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-19 07:00:45 -05:00
9b90325db1
docs: replace Sponsor in README with Fork Status 2024-05-19 07:00:45 -05:00
8ff2824168
fix: update tag patterns to support new XML TS tags 2024-05-19 07:00:45 -05:00
Folke Lemaitre
aeb7090098
feat: remove dependency on nvim-treesitter. Needed for nvim-treesitter rewrite. Requires Neovim >= 0.9.4 (#171) 2024-05-18 20:18:45 +07:00
5 changed files with 84 additions and 20 deletions

View File

@ -1,16 +1,39 @@
name: Tests
on: [push, pull_request, workflow_call]
on: [push, pull_request]
jobs:
x64-ubuntu:
name: nix-runner
runs-on: self-hosted
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
steps:
- uses: actions/checkout@v4
- 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') }}
- name: Run Lint
run: make lint
- 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 Tests
run: make test
- name: Run tests
run: |
export PATH="${PWD}/_neovim/bin:${PATH}"
export VIMRUNTIME="${PWD}/_neovim/share/nvim/runtime"
make test

View File

@ -116,9 +116,7 @@ vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
)
```
## Fork Status
## Sponsor
If you find this plugin useful, please consider sponsoring the project.
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.
[Sponsor](https://paypal.me/trieule1vn)

48
tests/minimal.vim Normal file
View File

@ -0,0 +1,48 @@
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,8 +1,5 @@
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/")
@ -140,5 +137,7 @@ 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,7 +1,3 @@
-- 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