Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
9622219679 |
|||
828c62a0a6 |
|||
6e09ffe4ff |
3 changed files with 54 additions and 30 deletions
15
.forgejo/workflows/release.yml
Normal file
15
.forgejo/workflows/release.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write # to be able to publish a GitHub release
|
||||||
|
issues: write # to be able to comment on released issues
|
||||||
|
pull-requests: write # to be able to comment on released pull requests
|
||||||
|
id-token: write # to enable use of OIDC for npm provenance
|
||||||
|
steps:
|
||||||
|
- name: Create Release
|
||||||
|
uses: https://git.kjan.de/actions/semantic-release@main
|
||||||
|
with:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
@ -1,7 +1,6 @@
|
||||||
--- JQuote: A Neovim plugin for cycling through quote characters
|
--- JQuote: A Neovim plugin for cycling through quote characters
|
||||||
--- @module jquote
|
--- @module jquote
|
||||||
--- @author Author Name
|
--- @author Jan
|
||||||
--- @version 1.0.0
|
|
||||||
--- @license MIT
|
--- @license MIT
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
@ -24,7 +23,6 @@ M.options = vim.deepcopy(DEFAULT_OPTIONS)
|
||||||
|
|
||||||
--- Plugin metadata
|
--- Plugin metadata
|
||||||
--- @type table
|
--- @type table
|
||||||
M._version = "1.0.0"
|
|
||||||
M._name = "jquote"
|
M._name = "jquote"
|
||||||
|
|
||||||
--- Validates if a character is one of the configured quote characters
|
--- Validates if a character is one of the configured quote characters
|
||||||
|
@ -65,7 +63,7 @@ local function find_quoted_string_at_cursor(line, cursor_col)
|
||||||
if is_defined_quote_char(char) then
|
if is_defined_quote_char(char) then
|
||||||
table.insert(quote_positions, {
|
table.insert(quote_positions, {
|
||||||
char = char,
|
char = char,
|
||||||
index = i - 1 -- Convert to 0-based indexing
|
index = i - 1 -- Convert to 0-based indexing
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -78,7 +76,7 @@ local function find_quoted_string_at_cursor(line, cursor_col)
|
||||||
|
|
||||||
-- Match opening and closing quotes of same type
|
-- Match opening and closing quotes of same type
|
||||||
if start_quote.char == end_quote.char then
|
if start_quote.char == end_quote.char then
|
||||||
if cursor_col >= start_quote.index and cursor_col <= end_quote.index then
|
if (cursor_col >= start_quote.index and cursor_col <= end_quote.index) or (cursor_col <= start_quote.index and cursor_col <= end_quote.index) then
|
||||||
return start_quote.index, end_quote.index, start_quote.char
|
return start_quote.index, end_quote.index, start_quote.char
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -248,7 +246,6 @@ end
|
||||||
--- @return table health_info Plugin health information
|
--- @return table health_info Plugin health information
|
||||||
function M.health()
|
function M.health()
|
||||||
local health_info = {
|
local health_info = {
|
||||||
version = M._version,
|
|
||||||
options = M.options,
|
options = M.options,
|
||||||
quote_chars_count = M.options.quote_chars and #M.options.quote_chars or 0,
|
quote_chars_count = M.options.quote_chars and #M.options.quote_chars or 0,
|
||||||
hotkey_configured = M.options.hotkey ~= nil,
|
hotkey_configured = M.options.hotkey ~= nil,
|
||||||
|
|
12
release.config.cjs
Normal file
12
release.config.cjs
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
module.exports = {
|
||||||
|
|
||||||
|
branches: ['main'],
|
||||||
|
plugins: [
|
||||||
|
'@semantic-release/commit-analyzer',
|
||||||
|
'@semantic-release/release-notes-generator',
|
||||||
|
'@semantic-release/changelog',
|
||||||
|
["@saithodev/semantic-release-gitea", {
|
||||||
|
"giteaUrl": "https://git.kjan.de"
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue