Compare commits
No commits in common. "main" and "feat/treesitter-diff-highlights" have entirely different histories.
main
...
feat/trees
12 changed files with 57 additions and 166 deletions
29
.github/workflows/quality.yaml
vendored
29
.github/workflows/quality.yaml
vendored
|
|
@ -24,7 +24,6 @@ jobs:
|
|||
- '*.lua'
|
||||
- '.luarc.json'
|
||||
- '*.toml'
|
||||
- 'vim.yaml'
|
||||
markdown:
|
||||
- '*.md'
|
||||
|
||||
|
|
@ -35,8 +34,11 @@ jobs:
|
|||
if: ${{ needs.changes.outputs.lua == 'true' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v31
|
||||
- run: nix develop --command stylua --check .
|
||||
- uses: JohnnyMorganz/stylua-action@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: 2.1.0
|
||||
args: --check .
|
||||
|
||||
lua-lint:
|
||||
name: Lua Lint Check
|
||||
|
|
@ -45,8 +47,11 @@ jobs:
|
|||
if: ${{ needs.changes.outputs.lua == 'true' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v31
|
||||
- run: nix develop --command selene --display-style quiet .
|
||||
- name: Lint with Selene
|
||||
uses: NTBBloodbath/selene-action@v1.0.0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --display-style quiet .
|
||||
|
||||
lua-typecheck:
|
||||
name: Lua Type Check
|
||||
|
|
@ -69,5 +74,15 @@ jobs:
|
|||
if: ${{ needs.changes.outputs.markdown == 'true' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v31
|
||||
- run: nix develop --command prettier --check .
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 8
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
- name: Install prettier
|
||||
run: pnpm add -g prettier@3.1.0
|
||||
- name: Check markdown formatting with prettier
|
||||
run: prettier --check .
|
||||
|
|
|
|||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -8,6 +8,3 @@ venv/
|
|||
CLAUDE.md
|
||||
__pycache__
|
||||
node_modules/
|
||||
|
||||
.direnv/
|
||||
.envrc
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
{
|
||||
"runtime.version": "LuaJIT",
|
||||
"runtime.version": "Lua 5.1",
|
||||
"runtime.path": ["lua/?.lua", "lua/?/init.lua"],
|
||||
"diagnostics.globals": ["vim"],
|
||||
"workspace.library": ["$VIMRUNTIME/lua", "${3rd}/luv/library"],
|
||||
"workspace.checkThirdParty": false,
|
||||
"workspace.ignoreDir": [".direnv"],
|
||||
"completion.callSnippet": "Replace"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
.direnv/
|
||||
43
flake.lock
generated
43
flake.lock
generated
|
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1771423170,
|
||||
"narHash": "sha256-K7Dg9TQ0mOcAtWTO/FX/FaprtWQ8BmEXTpLIaNRhEwU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bcc4a9d9533c033d806a46b37dc444f9b0da49dd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
33
flake.nix
33
flake.nix
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
description = "midnight.nvim — a dark colorscheme for Neovim";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
systems.url = "github:nix-systems/default";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
systems,
|
||||
...
|
||||
}:
|
||||
let
|
||||
forEachSystem =
|
||||
f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
|
||||
in
|
||||
{
|
||||
formatter = forEachSystem (pkgs: pkgs.nixfmt-tree);
|
||||
|
||||
devShells = forEachSystem (pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.prettier
|
||||
pkgs.stylua
|
||||
pkgs.selene
|
||||
pkgs.lua-language-server
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
@ -1,14 +1,7 @@
|
|||
local M = {}
|
||||
|
||||
local loading = false
|
||||
|
||||
---@return nil
|
||||
function M.load()
|
||||
if loading then
|
||||
return
|
||||
end
|
||||
loading = true
|
||||
|
||||
if vim.g.colors_name then
|
||||
vim.cmd('hi clear')
|
||||
end
|
||||
|
|
@ -22,8 +15,6 @@ function M.load()
|
|||
|
||||
local theme = require('midnight.theme')
|
||||
theme.apply()
|
||||
|
||||
loading = false
|
||||
end
|
||||
|
||||
---@deprecated Use `vim.cmd('colorscheme midnight')` instead
|
||||
|
|
|
|||
|
|
@ -121,13 +121,9 @@ function M.apply()
|
|||
|
||||
hi('@variable', { none = true })
|
||||
|
||||
hi('Pmenu', { fg = cs.background, bg = cs.foreground }, { 'PmenuSbar' })
|
||||
hi('Pmenu', { bg = cs.dark_grey }, { 'PmenuSbar' })
|
||||
hi('PmenuSel', { bg = cs.med_grey })
|
||||
hi('PmenuThumb', { bg = cs.grey })
|
||||
hi('BlinkCmpMenu', { fg = cs.background, bg = cs.foreground })
|
||||
hi('BlinkCmpMenuBorder', { fg = cs.background, bg = cs.foreground })
|
||||
hi('BlinkCmpDoc', { fg = cs.background, bg = cs.foreground })
|
||||
hi('BlinkCmpDocBorder', { fg = cs.background, bg = cs.foreground })
|
||||
|
||||
hi('LspInlayHint', { fg = cs.light_black })
|
||||
hi('LspSignatureActiveParameter', { underline = true, italic = true })
|
||||
|
|
@ -152,9 +148,6 @@ function M.apply()
|
|||
hi('@attribute.diff', { fg = cs.blue })
|
||||
hi('@diff.minus', { fg = cs.red })
|
||||
hi('@diff.plus', { fg = cs.green })
|
||||
hi('@diff.delta', { fg = cs.blue })
|
||||
hi('@punctuation.special.diff', { fg = cs.blue })
|
||||
|
||||
link('Normal', { '@string.special.path', '@variable.parameter' })
|
||||
hi('DiffAdd', { bg = cs.diff_add, fg = cs.green }, { '@text.diff.add', 'diffAdded' })
|
||||
hi('DiffDelete', { bg = cs.diff_delete, fg = cs.red }, { '@text.diff.delete', 'diffRemoved' })
|
||||
|
|
@ -169,12 +162,10 @@ function M.apply()
|
|||
hi('@constructor.lua', { fg = cs.background })
|
||||
hi('@markup.heading.gitcommit', { none = true })
|
||||
|
||||
hi('@function.latex', { fg = cs.blue })
|
||||
|
||||
hi('GitSignsCurrentLineBlame', { italic = true, fg = cs.light_black })
|
||||
hi('GitSignsAdd', { fg = cs.green })
|
||||
hi('GitSignsChange', { fg = cs.blue })
|
||||
hi('GitSignsDelete', { fg = cs.red })
|
||||
link('DiffAdd', 'GitSignsAdd')
|
||||
link('DiffChange', 'GitSignsChange')
|
||||
link('DiffDelete', 'GitSignsDelete')
|
||||
|
||||
link('Search', 'HighlightUndo')
|
||||
|
||||
|
|
@ -183,23 +174,6 @@ function M.apply()
|
|||
hi('CmpItemAbbr', { fg = cs.background })
|
||||
hi('CmpItemAbbrMatch', { fg = cs.background, bold = true })
|
||||
hi('CmpItemAbbrMatchFuzzy', { fg = cs.background, bold = true })
|
||||
hi('BlinkCmpLabelMatch', { fg = cs.green })
|
||||
hi('BlinkCmpGhostText', { fg = cs.light_black })
|
||||
hi('BlinkCmpGitKindMR', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitKindPR', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitKindIssue', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitKindCommit', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitKindMention', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitKindIconMR', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitKindIconPR', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitKindIconIssue', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitKindIconCommit', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitKindIconMention', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitLabelMRId', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitLabelPRId', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitLabelIssueId', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitLabelCommitId', { fg = cs.magenta })
|
||||
hi('BlinkCmpGitLabelMentionId', { fg = cs.magenta })
|
||||
hi('CmpItemAbbrDeprecated', { fg = cs.light_black, strikethrough = true })
|
||||
hi('CmpItemMenu', { fg = cs.light_black })
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
nix develop --command stylua --check .
|
||||
git ls-files '*.lua' | xargs nix develop --command selene --display-style quiet
|
||||
nix develop --command prettier --check .
|
||||
nix fmt
|
||||
git diff --exit-code -- '*.nix'
|
||||
nix develop --command lua-language-server --check . --checklevel=Warning
|
||||
|
|
@ -1,4 +1 @@
|
|||
std = 'vim'
|
||||
|
||||
[lints]
|
||||
bad_string_escape = 'allow'
|
||||
|
|
|
|||
30
vim.toml
Normal file
30
vim.toml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
[selene]
|
||||
base = "lua51"
|
||||
name = "vim"
|
||||
|
||||
[vim]
|
||||
any = true
|
||||
|
||||
[jit]
|
||||
any = true
|
||||
|
||||
[assert]
|
||||
any = true
|
||||
|
||||
[describe]
|
||||
any = true
|
||||
|
||||
[it]
|
||||
any = true
|
||||
|
||||
[before_each]
|
||||
any = true
|
||||
|
||||
[after_each]
|
||||
any = true
|
||||
|
||||
[spy]
|
||||
any = true
|
||||
|
||||
[stub]
|
||||
any = true
|
||||
26
vim.yaml
26
vim.yaml
|
|
@ -1,26 +0,0 @@
|
|||
---
|
||||
base: lua51
|
||||
name: vim
|
||||
lua_versions:
|
||||
- luajit
|
||||
globals:
|
||||
vim:
|
||||
any: true
|
||||
jit:
|
||||
any: true
|
||||
assert:
|
||||
any: true
|
||||
describe:
|
||||
any: true
|
||||
it:
|
||||
any: true
|
||||
before_each:
|
||||
any: true
|
||||
after_each:
|
||||
any: true
|
||||
spy:
|
||||
any: true
|
||||
stub:
|
||||
any: true
|
||||
bit:
|
||||
any: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue