๐Ÿ’ YAML toolkit for Neovim users

Migrates from GitHub

+51 -51
-1
.github/FUNDING.yml
··· 1 - github: [cuducos]
-19
.github/workflows/stylua.yml
··· 1 - --- 2 - on: [push, pull_request] 3 - name: Stylua 4 - 5 - jobs: 6 - 7 - stylua: 8 - runs-on: ubuntu-latest 9 - strategy: 10 - matrix: 11 - nvim-versions: ["stable", "nightly"] 12 - name: Stylua 13 - steps: 14 - - uses: actions/checkout@v3 15 - - uses: JohnnyMorganz/stylua-action@v2 16 - with: 17 - token: ${{ secrets.GITHUB_TOKEN }} 18 - version: latest 19 - args: --check .
-21
.github/workflows/tests.yml
··· 1 - --- 2 - on: [push, pull_request] 3 - name: Tests 4 - 5 - jobs: 6 - 7 - tests: 8 - runs-on: ubuntu-latest 9 - strategy: 10 - matrix: 11 - nvim-versions: ["stable", "nightly"] 12 - name: Tests 13 - steps: 14 - - uses: rhysd/action-setup-vim@v1 15 - with: 16 - neovim: true 17 - version: ${{ matrix.nvim-versions }} 18 - - uses: actions/setup-node@v3 19 - - run: npm install -g tree-sitter-cli 20 - - uses: actions/checkout@v3 21 - - run: nvim --headless -u tests/init.lua -c "PlenaryBustedDirectory tests/yaml_nvim { minimal_init = 'tests/init.lua' }"
+15
.tangled/workflows/format.yaml
··· 1 + when: 2 + - event: ["push", "manual"] 3 + branch: ["main"] 4 + - event: ["pull_request"] 5 + branch: ["main"] 6 + 7 + engine: "nixery" 8 + 9 + dependencies: 10 + nixpkgs: 11 + - stylua 12 + 13 + steps: 14 + - name: Stylua 15 + command: stylua --check .
+21
.tangled/workflows/tests.yaml
··· 1 + when: 2 + - event: ["push", "manual"] 3 + branch: ["main"] 4 + - event: ["pull_request"] 5 + branch: ["main"] 6 + 7 + engine: "nixery" 8 + 9 + dependencies: 10 + nixpkgs: 11 + - findutils 12 + - fzf 13 + - git 14 + - neovim 15 + - nodejs_24 16 + - tree-sitter 17 + 18 + steps: 19 + - name: Stylua 20 + command: | 21 + nvim --headless -u tests/init.lua -c "PlenaryBustedDirectory tests/yaml_nvim { minimal_init = 'tests/init.lua' }"
+6 -8
README.md
··· 1 - # yaml.nvim [![Tests status](https://github.com/cuducos/yaml.nvim/actions/workflows/tests.yml/badge.svg)](https://github.com/cuducos/yaml.nvim/actions/workflows/tests.yml) 1 + # yaml.nvim 2 2 3 3 Simple tools to help developers working YAML in [Neovim](https://neovim.io). 4 4 ··· 30 30 31 31 <summary>What about older versions of Neovim?</summary> 32 32 33 - * For **Neovim 0.7 or 0.8**, pin to [`7925bd2`](https://github.com/cuducos/yaml.nvim/commit/7925bd2bf03c718996ccad7e1a49eafe40cd3246) 34 - * For **Neovim 0.5 or 0.6**, pin to [`155c23d`](https://github.com/cuducos/yaml.nvim/commit/155c23de8f99fdb424f8aa713bcb993cc2538c6c) 33 + * For **Neovim 0.7 or 0.8**, pin to `7925bd2` 34 + * For **Neovim 0.5 or 0.6**, pin to `155c23d` 35 35 36 36 </details> 37 37 ··· 41 41 42 42 ```lua 43 43 { 44 - "cuducos/yaml.nvim", 44 + "https://tangled.org/cuducos.me/yaml.nvim", 45 45 ft = { "yaml" }, -- optional 46 46 dependencies = { 47 47 "folke/snacks.nvim", -- optional ··· 55 55 56 56 ```lua 57 57 use { 58 - "cuducos/yaml.nvim", 58 + "https://tangled.org/cuducos.me/yaml.nvim", 59 59 ft = { "yaml" }, -- optional 60 60 requires = { 61 61 "folke/snacks.nvim", -- optional ··· 71 71 Plug 'folke/snacks.nvim' " optional 72 72 Plug 'nvim-telescope/telescope.nvim' " optional 73 73 Plug 'ibhagwan/fzf-lua' " optional 74 - Plug 'cuducos/yaml.nvim' 74 + Plug 'https://tangled.org/cuducos.me/yaml.nvim' 75 75 ``` 76 76 77 77 ### No YAML parser? ··· 129 129 <details> 130 130 131 131 <summary>For non-named buffers</summary> 132 - 133 - See [#33](https://github.com/cuducos/yaml.nvim/pull/33), for example: 134 132 135 133 ```lua 136 134 vim.api.nvim_create_autocmd({ "BufEnter", "FileType" }, {
+1 -1
manage
··· 22 22 end 23 23 24 24 local test_with = function(bin) 25 - for line in io.lines(".github/workflows/tests.yml") do 25 + for line in io.lines(".tangled/workflows/tests.yml") do 26 26 if string.find(line, "PlenaryBustedDirectory") then 27 27 local cleaned = string.gsub(line, "-? run: ", "") 28 28 exec_and_exit(bin .. " run -it yaml.nvim " .. cleaned)
+7
tests/init.lua
··· 12 12 end 13 13 14 14 vim.opt.rtp:append(dir) 15 + 16 + -- In isolated environments (like Nix), vim.opt.rtp doesn't automatically 17 + -- add paths to Lua's package.path. We need to explicitly add them so 18 + -- require() can find modules like nvim-treesitter.configs 19 + package.path = package.path .. ";" .. dir .. "/lua/?.lua;" .. dir .. "/lua/?/init.lua" 20 + package.cpath = package.cpath .. ";" .. dir .. "/?.so" 21 + 15 22 vim.cmd("runtime plugin/" .. repo) 16 23 end 17 24
+1 -1
tests/yaml_nvim/commands_spec.lua
··· 81 81 assert.stub(telescope).was_called_with() 82 82 end) 83 83 84 - it("YAMLFzFLua calls Lua function", function() 84 + it("YAMLFzfLua calls Lua function", function() 85 85 local fzf_lua = stub(require("yaml_nvim"), "fzf_lua") 86 86 vim.cmd("YAMLFzfLua") 87 87 assert.stub(fzf_lua).was_called_with()