generated from ellisonleao/nvim-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding panvimdoc workflow to generate vimdoc (#6)
* testing docs ci * removing if * fix folder name * auto-generate vimdoc * split docs into new workflow * fix workflow name * removing unnecessary needs statement * change docs workflow branch --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
8f96449
commit 51ea54b
Showing
3 changed files
with
147 additions
and
5 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,25 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
name: docs | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: panvimdoc | ||
uses: kdheepak/panvimdoc@main | ||
with: | ||
vimdoc: carbon-now.nvim | ||
version: "Neovim >= 0.8.0" | ||
demojify: true | ||
treesitter: true | ||
- name: Push changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "auto-generate vimdoc" | ||
commit_user_name: "github-actions[bot]" | ||
commit_user_email: "github-actions[bot]@users.noreply.github.com" | ||
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" |
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,118 @@ | ||
*carbon-now.nvim.txt* For Neovim >= 0.8.0 Last change: 2023 July 26 | ||
|
||
============================================================================== | ||
Table of Contents *carbon-now.nvim-table-of-contents* | ||
|
||
- Requirements |carbon-now.nvim-requirements| | ||
- Installing |carbon-now.nvim-installing| | ||
- Configuration and customization|carbon-now.nvim-configuration-and-customization| | ||
- Generating snippets from visual selection|carbon-now.nvim-generating-snippets-from-visual-selection| | ||
- Generating snippets from github gists|carbon-now.nvim-generating-snippets-from-github-gists| | ||
- Changing default open in browser command|carbon-now.nvim-changing-default-open-in-browser-command| | ||
|
||
|
||
REQUIREMENTS *carbon-now.nvim-requirements* | ||
|
||
Neovim 0.8+ | ||
|
||
|
||
INSTALLING *carbon-now.nvim-installing* | ||
|
||
Using your preferred plugin manager, add: | ||
|
||
> | ||
'ellisonleao/carbon-now.nvim' | ||
< | ||
|
||
Example with packer: | ||
|
||
>lua | ||
use {"ellisonleao/carbon-now.nvim", config = function() require('carbon-now').setup() end} | ||
< | ||
|
||
Example with lazy.nvim: | ||
|
||
>lua | ||
{ | ||
"ellisonleao/carbon-now.nvim", | ||
lazy = true, | ||
cmd = "CarbonNow", | ||
---@param opts cn.ConfigSchema | ||
opts = { [[ your custom config here ]] } | ||
} | ||
< | ||
|
||
|
||
CONFIGURATION AND CUSTOMIZATION*carbon-now.nvim-configuration-and-customization* | ||
|
||
The plugin comes with the following default configs: | ||
|
||
>lua | ||
{ | ||
base_url = "https://carbon.now.sh/", | ||
open_cmd = "xdg-open", | ||
options = { | ||
bg = "gray", | ||
drop_shadow_blur = "68px", | ||
drop_shadow = false, | ||
drop_shadow_offset_y = "20px", | ||
font_family = "Hack", | ||
font_size = "18px", | ||
line_height = "133%", | ||
line_numbers = true, | ||
theme = "monokai", | ||
titlebar = "Made with carbon-now.nvim", | ||
watermark = false, | ||
width = "680", | ||
window_theme = "sharp", | ||
}, | ||
} | ||
< | ||
|
||
You can override it in `setup()` function. Example: | ||
|
||
>lua | ||
local carbon = require('carbon-now') | ||
carbon.setup({ | ||
options = { | ||
theme = "solarized", | ||
font_family = "Monoid", | ||
} | ||
}) | ||
< | ||
|
||
|
||
GENERATING SNIPPETS FROM VISUAL SELECTION*carbon-now.nvim-generating-snippets-from-visual-selection* | ||
|
||
Adding a custom mapping for generating a new snippet is really easy | ||
|
||
>lua | ||
vim.keymap.set("v", "<leader>cn", ":CarbonNow<CR>", { silent = true }) | ||
< | ||
|
||
But if you preferer a command, visual select the code you want to share and | ||
call: | ||
|
||
> | ||
:CarbonNow | ||
< | ||
|
||
|
||
GENERATING SNIPPETS FROM GITHUB GISTS*carbon-now.nvim-generating-snippets-from-github-gists* | ||
|
||
> | ||
:CarbonNow GIST_ID | ||
< | ||
|
||
|
||
CHANGING DEFAULT OPEN IN BROWSER COMMAND*carbon-now.nvim-changing-default-open-in-browser-command* | ||
|
||
Example: Opening snippet in google-chrome | ||
|
||
>lua | ||
require('carbon-now').setup({open_cmd = "google-chrome"}) | ||
< | ||
|
||
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc> | ||
|
||
vim:tw=78:ts=8:noet:ft=help:norl: |