Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoCiccarino committed Dec 19, 2024
0 parents commit 4ebbcb2
Show file tree
Hide file tree
Showing 325 changed files with 36,330 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
root = true

[*]
insert_final_newline = true
indent_style = space
indent_size = 2
charset = utf-8
3 changes: 3 additions & 0 deletions .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "4.11.0"
}
75 changes: 75 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Bug Report
description: File a bug/issue
title: "bug: "
labels: [bug]
body:
- type: markdown
attributes:
value: |
**Before** reporting an issue, make sure to read the [documentation](https://github.com/folke/tokyonight.nvim)
and search [existing issues](https://github.com/folke/tokyonight.nvim/issues).
Usage questions such as ***"How do I...?"*** belong in [Discussions](https://github.com/folke/tokyonight.nvim/discussions) and will be closed.
- type: checkboxes
attributes:
label: Did you check docs and existing issues?
description: Make sure you checked all of the below before submitting an issue
options:
- label: I have read all the tokyonight.nvim docs
required: true
- label: I have updated the plugin to the latest version before submitting this issue
required: true
- label: I have searched the existing issues of tokyonight.nvim
required: true
- label: I have searched the existing issues of plugins related to this issue
required: true
- type: input
attributes:
label: "Neovim version (nvim -v)"
placeholder: "0.8.0 commit db1b0ee3b30f"
validations:
required: true
- type: input
attributes:
label: "Operating system/version"
placeholder: "MacOS 11.5"
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. Please include any related errors you see in Neovim.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1.
2.
3.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Repro
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
value: |
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
-- add any other plugins here
},
})
render: lua
validations:
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/folke/tokyonight.nvim/discussions
about: Use Github discussions instead
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Feature Request
description: Suggest a new feature
title: "feature: "
labels: [enhancement]
body:
- type: checkboxes
attributes:
label: Did you check the docs?
description: Make sure you read all the docs before submitting a feature request
options:
- label: I have read all the tokyonight.nvim docs
required: true
- type: textarea
validations:
required: true
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- type: textarea
validations:
required: true
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
- type: textarea
validations:
required: true
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
validations:
required: false
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Description

<!-- Describe the big picture of your changes to communicate to the maintainers
why we should accept this pull request. -->

## Related Issue(s)

<!--
If this PR fixes any issues, please link to the issue here.
- Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
28 changes: 28 additions & 0 deletions .github/labeler.yml
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/**"
9 changes: 9 additions & 0 deletions .github/release-please-config.json
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"]
}
}
}
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CI

on:
push:
branches: [main, master]
pull_request:

jobs:
ci:
uses: folke/github/.github/workflows/ci.yml@main
secrets: inherit
with:
plugin: tokyonight.nvim
repo: folke/tokyonight.nvim
8 changes: 8 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: "PR Labeler"
on:
- pull_request_target

jobs:
labeler:
uses: folke/github/.github/workflows/labeler.yml@main
secrets: inherit
18 changes: 18 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PR Title

on:
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened
- ready_for_review

permissions:
pull-requests: read

jobs:
pr-title:
uses: folke/github/.github/workflows/pr.yml@main
secrets: inherit
11 changes: 11 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Stale Issues & PRs

on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:
if: contains(fromJSON('["folke", "LazyVim"]'), github.repository_owner)
uses: folke/github/.github/workflows/stale.yml@main
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Update Repo

on:
workflow_dispatch:
schedule:
# Run every hour
- cron: "0 * * * *"

jobs:
update:
if: contains(fromJSON('["folke", "LazyVim"]'), github.repository_owner)
uses: folke/github/.github/workflows/update.yml@main
secrets: inherit
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.log
/.repro
/.tests
/build
/debug
/doc/tags
foo.*
node_modules
tt.*
108 changes: 108 additions & 0 deletions .lazy.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
local M = {
module = "nekonight",
colorscheme = "nekonight",
opts = { style = "moon", plugins = { all = true } },
globals = { vim = vim },
cache = {}, ---@type table<string, boolean>
}

function M.reset()
require("nekonight.util").cache.clear()
local colors = require("nekonight.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,
},
}
13 changes: 13 additions & 0 deletions .lua-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://github.com/Koihik/LuaFormatter/blob/master/docs/Style-Config.md
column_limit: 100
indent_width: 2
continuation_indent_width: 2
use_tab: false
chop_down_parameter: true
chop_down_table: true
chop_down_kv_table: true
single_quote_to_double_quote: true
spaces_inside_table_braces: true
align_parameter: true
keep_simple_control_block_one_line: true
extra_sep_at_table_end: true
Loading

0 comments on commit 4ebbcb2

Please sign in to comment.