Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions .github/workflows/.luarc-5.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,26 @@
"libraryFiles": "Disable"
},
"runtime": {
"version": "LuaJIT",
"path": [
"lua/?.lua",
"lua/?/init.lua",
"library/?.lua",
"library/?/init.lua"
]
"version": "Lua 5.1"
},
"workspace": {
"checkThirdParty": "Disable",
"library": [
"$PWD/.dependencies/pack/vendor/start/plenary.nvim",
"$PWD/.dependencies/pack/vendor/start/nui.nvim",
"$PWD/.dependencies/pack/vendor/start/nvim-web-devicons",
"$PWD/.dependencies/pack/vendor/start/snacks.nvim",
"${3rd}/luassert",
"${3rd}/busted",
"${3rd}/luv",
"$VIMRUNTIME"
"$VIMRUNTIME/lua",
"$PWD/.dependencies/pack/vendor/start/plenary.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/nui.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/nvim-web-devicons/lua",
"$PWD/.dependencies/pack/vendor/start/image.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/snacks.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/nvim-window-picker/lua",
"${3rd}/luassert/library",
"${3rd}/busted/library"
],
"ignoreDir": [
".dependencies",
".luarocks",
".lua"
".lua",
".repro"
]
}
}
28 changes: 12 additions & 16 deletions .github/workflows/.luarc-luajit-master.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,26 @@
"libraryFiles": "Disable"
},
"runtime": {
"version": "LuaJIT",
"path": [
"lua/?.lua",
"lua/?/init.lua",
"library/?.lua",
"library/?/init.lua"
]
"version": "LuaJIT"
},
"workspace": {
"checkThirdParty": "Disable",
"library": [
"$PWD/.dependencies/pack/vendor/start/plenary.nvim",
"$PWD/.dependencies/pack/vendor/start/nui.nvim",
"$PWD/.dependencies/pack/vendor/start/nvim-web-devicons",
"$PWD/.dependencies/pack/vendor/start/snacks.nvim",
"${3rd}/luassert",
"${3rd}/busted",
"${3rd}/luv",
"$VIMRUNTIME"
"$VIMRUNTIME/lua",
"$PWD/.dependencies/pack/vendor/start/plenary.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/nui.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/nvim-web-devicons/lua",
"$PWD/.dependencies/pack/vendor/start/image.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/snacks.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/nvim-window-picker/lua",
"${3rd}/luassert/library",
"${3rd}/busted/library"
],
"ignoreDir": [
".dependencies",
".luarocks",
".lua"
".lua",
".repro"
]
}
}
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: CI
on:
push:
branches:
- main
- v1.x
- v2.x
- v3.x
- "*"
pull_request:
workflow_dispatch:

env:
MISE_AUTO_INSTALL: "false"

jobs:
stylua-check:
runs-on: ubuntu-latest
Expand All @@ -27,21 +27,23 @@ jobs:
strategy:
fail-fast: false
matrix:
rev: ["0.8", "0.9", "0.10", "0.11"]
neovim: ["0.8", "0.9", "0.10", "0.11"]
os: [ubuntu-22.04]
include:
- rev: "latest"
- neovim: "latest"
os: [windows-latest]
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: "Install neovim and other deps"
uses: jdx/mise-action@v2
with:
install: true # [default: true] run `mise install`
install_args: "neovim@${{matrix.rev}}" # [default: ""] additional arguments to `mise install`
- run: |
mise use neovim@${{matrix.rev}}
make setup
make test
install_args: "neovim@${{matrix.neovim}}" # [default: ""] additional arguments to `mise install`
- name: "Run tests"
run: |
mise use neovim@${{matrix.neovim}}
mise deps
mise test

# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v2
35 changes: 35 additions & 0 deletions .github/workflows/emmylua-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: EmmyLua Analyzer Diagnostics
on:
pull_request: ~
push:
branches:
- '*'

env:
MISE_AUTO_INSTALL_DISABLE_TOOLS: lua-language-server

jobs:
luals-check:
strategy:
matrix:
lua: ["5.1", "luajit-master"]
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: luarocks/gh-actions-lua@v10
with:
luaVersion: ${{matrix.lua}}

- name: Install tools
uses: jdx/mise-action@v2
with:
install_args: "github:neovim/neovim@nightly"

- name: Run emmylua_check
continue-on-error: true
run: |
mise use github:neovim/neovim@nightly
NEOTREE_LUARC=".github/workflows/.luarc-${{ matrix.lua }}.json" mise run emmylua-check
23 changes: 7 additions & 16 deletions .github/workflows/luals-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- '*'

env:
MISE_AUTO_INSTALL_DISABLE_TOOLS: cargo-binstall,cargo:emmylua_ls,cargo:emmylua_check

jobs:
luals-check:
strategy:
Expand All @@ -21,24 +24,12 @@ jobs:
with:
luaVersion: ${{matrix.lua}}

- name: Install lua-language-server
- name: Install tools
uses: jdx/mise-action@v2
with:
mise_toml: |
[tools]
neovim = "${{ matrix.neovim }}"
cargo-binstall = "latest"
"cargo:emmylua_check" = "latest"
"cargo:emmylua_ls" = "latest"
lua-language-server = "3.13.9"
install_args: "github:neovim/neovim@nightly"

- name: Run lua-language-server check
run: |
LUARC=".github/workflows/.luarc-${{ matrix.lua }}.json"
make luals-check CONFIGURATION="$LUARC"

- name: Run emmylua_check
continue-on-error: true # Doesn't type-check well enough to be worth erroring on, but this runs so fast we might as well help test this out.
run: |
LUARC=".github/workflows/.luarc-${{ matrix.lua }}.json"
make emmylua-check CONFIGURATION="$LUARC"
mise use github:neovim/neovim@nightly
NEOTREE_LUARC=".github/workflows/.luarc-${{ matrix.lua }}.json" mise run luals-check
23 changes: 11 additions & 12 deletions .luarc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@
"runtime": {
"version": "LuaJIT",
"path": [
"lua/?.lua",
"lua/?/init.lua",
"library/?.lua",
"library/?/init.lua"
"?.lua",
"?/init.lua"
]
},
"workspace": {
"checkThirdParty": "Disable",
"library": [
"$PWD/.dependencies/pack/vendor/start/plenary.nvim",
"$PWD/.dependencies/pack/vendor/start/nui.nvim",
"$PWD/.dependencies/pack/vendor/start/nvim-web-devicons",
"$PWD/.dependencies/pack/vendor/start/snacks.nvim",
"${3rd}/luassert",
"${3rd}/busted",
"${3rd}/luv",
"$VIMRUNTIME"
"$VIMRUNTIME/lua",
"$PWD/.dependencies/pack/vendor/start/plenary.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/nui.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/nvim-web-devicons/lua",
"$PWD/.dependencies/pack/vendor/start/image.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/snacks.nvim/lua",
"$PWD/.dependencies/pack/vendor/start/nvim-window-picker/lua",
"${3rd}/luassert/library",
"${3rd}/busted/library"
],
"ignoreDir": [
".dependencies",
Expand Down
15 changes: 10 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Contributions are welcome! To keep everything clean and tidy, please follow the
guidelines below.

# Development setup

View [mise.toml](./mise.toml) for tasks and their implementation.
```bash


```

## Code Style

This is open for debate, but here is the current style choices being observed:
Expand All @@ -12,9 +20,6 @@ This is open for debate, but here is the current style choices being observed:
- other OOP things, like method names should use camelCase
- BUT we don't currently have any OOP parts and I don't think we want any

I prefer `local name = function()` over `local function name()`, just to be
consistent with the `M.name = function()` exports.

### StyLua

We use (StyLua)[https://github.com/JohnnyMorganz/StyLua] to enforce consistency
Expand Down Expand Up @@ -50,10 +55,10 @@ current strategy is to maintain:
in comments. This is the bare minimum documentation for an option.
- The README contains "back of the box" high level overview of features. It is
meant for people trying to decide if they want to install this plugin or not.
It should include references to the help file for more information:
It should include references to the help file for more information:
`:h neo-tree-setup`
- Whether something should be mentioned in the README or just in the help file
is a completely subjective judement call that is made on a case by case basis
is a completely subjective judgement call that is made on a case by case basis
based on how many people are likely to be interested in that information.
- The vim help file [doc/neo-tree.txt](doc/neo-tree.txt) is the definitive
reference and should contain all information needed to configure and use the
Expand Down
45 changes: 0 additions & 45 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion lua/neo-tree/sources/common/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ local use_window_picker = function(state, path, cmd)
events.fire_event(events.FILE_OPENED, path)
return
end
local picked_window_id = picker.pick_window()
local picked_window_id = picker.pick_window({})
if picked_window_id then
vim.api.nvim_set_current_win(picked_window_id)
---@diagnostic disable-next-line: param-type-mismatch
Expand Down
2 changes: 0 additions & 2 deletions lua/neo-tree/sources/filesystem/lib/fs_scan.lua
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ local function get_children_async(path, callback)
return
end
local readdir_batch
---@param _ string?
---@param stats uv.fs_readdir.entry[]
readdir_batch = function(_, stats)
if stats then
local more = false
Expand Down
Loading
Loading