Skip to content
Merged
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
22 changes: 22 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: changelog
on: release

jobs:
changelog-gen:
name: Generate changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: orhun/git-cliff-action@v1
with:
config: cliff.toml
args: -vv --latest --strip header -c .github/workflows/cliff.toml
env:
OUTPUT: CHANGELOG.md

- name: Print the changelog
run: cat "${{ steps.git-cliff.outputs.changelog }}"
80 changes: 80 additions & 0 deletions .github/workflows/cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# configuration file for git-cliff (0.1.0)

[changelog]
# changelog header
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
# template for the changelog body
# https://tera.netlify.app/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}]
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits
| filter(attribute="scope")
| sort(attribute="scope") %}
- {% if commit.breaking %}[**breaking**] {% endif %}_({{commit.scope}})_ {{ commit.message }}
{%- endfor %}
{% for commit in commits %}
{%- if commit.scope -%}
{% else -%}
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message }}
{% endif -%}
{% endfor -%}
{% raw %}{% endraw %}\
{% endfor %}\n
"""
# remove the leading and trailing whitespaces from the template
trim = true
# changelog footer
footer = """
<!-- generated by git-cliff -->
"""

[git]
# allow only conventional commits
# https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# regex for parsing and grouping commits
commit_preprocessors = [
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/lunarvim/lunarvim/pull/${2}))" },
]
commit_parsers = [
{ message = "(.*[bB]ump)", group = "<!-- 7 --> Miscellaneous Tasks", skip = true },
{ message = "^[bB]uild", group = "<!-- 0 --> Packaging" },
{ message = "(^[fF]eat|^\\[Feat)", group = "<!-- 1 --> Features" },
{ message = "(^[bB]ug|^[Ff]ix|^\\[Bug)", group = "<!-- 2 --> Bugfix" },
{ message = "(^[rR]efactor|^ref)", group = "<!-- 3 --> Refactor" },
{ message = "^[dD]oc", group = "<!-- 4 --> Documentation" },
{ message = "^[rR]evert", group = "<!-- 5 --> Revert" },
{ message = "^[pP]erf", group = "<!-- 6 --> Performance" },
{ message = "^[cC]hore", group = "<!-- 7 --> Miscellaneous Tasks", skip = true },
{ message = "^ci", group = "<!-- 7 --> Miscellaneous Tasks", skip = true },
{ message = "^test", group = "<!-- 7 --> Miscellaneous Tasks", skip = true },
{ message = "[wW]orkflow", group = "<!-- 7 --> Miscellaneous Tasks", skip = true },
]
# filter out the commits that are not matched by commit parsers
filter_commits = false
# glob pattern for matching git tags
tag_pattern = "v[0-9]*"
# regex for skipping tags
skip_tags = "v0.1.0-beta.1"
# regex for ignoring tags
ignore_tags = ""
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = false

[features]
preserve_order = ["serde_json/preserve_order"]
29 changes: 29 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: lint

on:
push:
branches:
- "master"
tags:
- "v*"
pull_request:
branches:
- "master"
paths:
- "lua/**"

jobs:
lua-linter:
name: "Linting with luacheck"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: leafo/gh-actions-lua@v8
- uses: leafo/gh-actions-luarocks@v4

- name: Use luacheck
run: luarocks install luacheck

- name: Run luacheck
run: luacheck *.lua lua/**/*.lua
25 changes: 25 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
45 changes: 45 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---@diagnostic disable
-- vim: ft=lua tw=80

stds.nvim = {
globals = {
"vim",
"reload",
vim = { fields = { "g" } },
"TERMINAL",
"USER",
"C",
"Config",
"WORKSPACE_PATH",
"JAVA_LS_EXECUTABLE",
"MUtils",
"USER_CONFIG_PATH",
os = { fields = { "capture" } },
},
read_globals = {
"jit",
"os",
"vim",
"join_paths",
"get_runtime_dir",
"get_config_dir",
"get_cache_dir",
"get_lvim_base_dir",
"require_clean",
},
}
std = "lua51+nvim"

files["tests/*_spec.lua"].std = "lua51+nvim+busted"
files["lua/lvim/impatient*"].ignore = { "121" }

-- Don't report unused self arguments of methods.
self = false

-- Rerun tests only if their modification time changed.
cache = true

ignore = {
"631", -- max_line_length
"212/_.*", -- unused argument, for vars with "_" prefix
}
9 changes: 9 additions & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"Lua.diagnostics.disable": [
"redundant-parameter",
"param-type-mismatch",
"missing-parameter"
],
"diagnostics.libraryFiles": "Disable"
}
7 changes: 0 additions & 7 deletions .stylua.toml

This file was deleted.

1 change: 0 additions & 1 deletion lua/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
-- Author: Kien Nguyen-Tuan <kiennt2609@gmail.com>
-- Define autocommands with Lua APIs
-- See: h:api-autocmd, h:augroup
local augroup = vim.api.nvim_create_augroup -- Create/get autocommand group
local autocmd = vim.api.nvim_create_autocmd -- Create autocommand

-- General settings
Expand Down
2 changes: 1 addition & 1 deletion lua/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function _G.reload_config()
vim.notify("Nvim configuration reloaded!", vim.log.levels.INFO)
end

map("n", "<leader>rr", reload_config, { desc = "Reload configuration without restart nvim" })
map("n", "<leader>rr", _G.reload_config, { desc = "Reload configuration without restart nvim" })

-- Telescope
local builtin = require("telescope.builtin")
Expand Down
4 changes: 0 additions & 4 deletions lua/plugins/configs/null-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
-- Description: null-ls configuration
-- Author: Kien Nguyen-Tuan <kiennt2609@gmail.com>
local null_ls = require("null-ls")
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting
local formatting = null_ls.builtins.formatting
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
local diagnostics = null_ls.builtins.diagnostics

-- Load custom configurations
local exist, custom = pcall(require, "custom")
Expand Down