forked from folke/tokyonight.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature-spotify-player
- Loading branch information
Showing
201 changed files
with
8,627 additions
and
5,898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
".": "4.1.3" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
core: | ||
- all: | ||
- changed-files: | ||
- any-glob-to-any-file: "lua/tokyonight/**" | ||
- all-globs-to-all-files: | ||
- "!lua/tokyonight/groups/**" | ||
- "!lua/tokyonight/colors/**" | ||
- "!lua/tokyonight/extra/**" | ||
|
||
extras: | ||
- changed-files: | ||
- any-glob-to-any-file: "lua/tokyonight/extra/**" | ||
|
||
groups: | ||
- changed-files: | ||
- any-glob-to-any-file: "lua/tokyonight/groups/**" | ||
|
||
base: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- "lua/tokyonight/groups/base.lua" | ||
- "lua/tokyonight/groups/kinds.lua" | ||
- "lua/tokyonight/groups/treesitter.lua" | ||
- "lua/tokyonight/groups/semantic_tokens.lua" | ||
|
||
colors: | ||
- changed-files: | ||
- any-glob-to-any-file: "lua/tokyonight/colors/**" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", | ||
"packages": { | ||
".": { | ||
"release-type": "simple", | ||
"extra-files": ["lua/tokyonight/config.lua"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: "Pull Request Labeler" | ||
on: | ||
- pull_request_target | ||
|
||
jobs: | ||
labeler: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@v5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: "Lint PR" | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
main: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
requireScope: true | ||
subjectPattern: ^(?![A-Z]).+$ | ||
scopes: | | ||
.+ | ||
types: | | ||
build | ||
chore | ||
ci | ||
docs | ||
feat | ||
fix | ||
merge | ||
perf | ||
refactor | ||
revert | ||
style | ||
test | ||
wip | ||
ignoreLabels: | | ||
autorelease: pending |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
tt.* | ||
.tests | ||
.docs | ||
doc/tags | ||
debug | ||
.repro | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
local M = { | ||
module = "tokyonight", | ||
colorscheme = "tokyonight", | ||
opts = { style = "moon", plugins = { all = true } }, | ||
globals = { vim = vim }, | ||
cache = {}, ---@type table<string, boolean> | ||
} | ||
|
||
function M.reset() | ||
require("tokyonight.util").cache.clear() | ||
local colors = require("tokyonight.colors").setup() | ||
M.globals.colors = colors | ||
M.globals.c = colors | ||
end | ||
|
||
---@param name string | ||
---@param buf number | ||
function M.hl_group(name, buf) | ||
return vim.api.nvim_buf_get_name(buf):find("kinds") and "LspKind" .. name or name | ||
end | ||
|
||
local function reload() | ||
for k in pairs(package.loaded) do | ||
if k:find("^" .. M.module) then | ||
package.loaded[k] = nil | ||
end | ||
end | ||
M.cache = {} | ||
require(M.module).setup(M.opts) | ||
M.reset() | ||
local colorscheme = vim.g.colors_name or M.colorscheme | ||
colorscheme = colorscheme:find(M.colorscheme) and colorscheme or M.colorscheme | ||
vim.cmd.colorscheme(colorscheme) | ||
local hi = require("mini.hipatterns") | ||
for _, buf in ipairs(require("mini.hipatterns").get_enabled_buffers()) do | ||
hi.update(buf) | ||
end | ||
end | ||
reload = vim.schedule_wrap(reload) | ||
|
||
local augroup = vim.api.nvim_create_augroup("colorscheme_dev", { clear = true }) | ||
vim.api.nvim_create_autocmd("User", { | ||
pattern = "VeryLazy", | ||
group = augroup, | ||
callback = reload, | ||
}) | ||
vim.api.nvim_create_autocmd("BufWritePost", { | ||
group = augroup, | ||
pattern = "*/lua/" .. M.module .. "/**.lua", | ||
callback = reload, | ||
}) | ||
|
||
return { | ||
{ | ||
"echasnovski/mini.hipatterns", | ||
opts = function(_, opts) | ||
local hi = require("mini.hipatterns") | ||
|
||
opts.highlighters = opts.highlighters or {} | ||
|
||
opts.highlighters = vim.tbl_extend("keep", opts.highlighters or {}, { | ||
hex_color = hi.gen_highlighter.hex_color({ priority = 2000 }), | ||
|
||
hl_group = { | ||
pattern = function(buf) | ||
return vim.api.nvim_buf_get_name(buf):find("lua/" .. M.module) and '^%s*%[?"?()[%w%.@]+()"?%]?%s*=' | ||
end, | ||
group = function(buf, match) | ||
local group = M.hl_group(match, buf) | ||
if group then | ||
if M.cache[group] == nil then | ||
M.cache[group] = false | ||
local hl = vim.api.nvim_get_hl(0, { name = group, link = false, create = false }) | ||
if not vim.tbl_isempty(hl) then | ||
hl.fg = hl.fg or vim.api.nvim_get_hl(0, { name = "Normal", link = false }).fg | ||
M.cache[group] = true | ||
vim.api.nvim_set_hl(0, group .. "Dev", hl) | ||
end | ||
end | ||
return M.cache[group] and group .. "Dev" or nil | ||
end | ||
end, | ||
extmark_opts = { priority = 2000 }, | ||
}, | ||
|
||
hl_color = { | ||
pattern = { | ||
"%f[%w]()c%.[%w_%.]+()%f[%W]", | ||
"%f[%w]()colors%.[%w_%.]+()%f[%W]", | ||
"%f[%w]()vim%.g%.terminal_color_%d+()%f[%W]", | ||
}, | ||
group = function(_, match) | ||
local parts = vim.split(match, ".", { plain = true }) | ||
local color = vim.tbl_get(M.globals, unpack(parts)) | ||
return type(color) == "string" and require("mini.hipatterns").compute_hex_color_group(color, "fg") | ||
end, | ||
extmark_opts = function(_, _, data) | ||
return { | ||
virt_text = { { "⬤ ", data.hl_group } }, | ||
virt_text_pos = "inline", | ||
priority = 2000, | ||
} | ||
end, | ||
}, | ||
}) | ||
end, | ||
}, | ||
} |
Oops, something went wrong.