Skip to content

Commit

Permalink
CI: Check PR Github Action Init
Browse files Browse the repository at this point in the history
And re-fixed #239
  • Loading branch information
ful1e5 committed May 16, 2023
1 parent 60c25bd commit bc90cdf
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Check PR
on:
pull_request:

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-shell -p stylua --run "stylua -f stylua.toml --check ."
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
doc/tags
test/plenary
.repro
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,21 @@ require('lualine').setup({ ... })

Screenshots at [LUALINE.md](./LUALINE.md).

### Making `undercurls` work properly in **Tmux**
## Syntax highlight groups

This section will help you determine what highlight group is being applied to a piece of syntax. These sections will
output the highlight group for the value under the cursor.

#### Treesitter highlighting

If treesitter is the highlighting method for the language in question you can use the command:
`:TSHighlightCapturesUnderCursor`. This command comes from the treesitter [playground] plugin. Make
sure you have this installed as well as [nvim-treesitter].

[playground]: https://github.com/nvim-treesitter/playground#show-treesitter-and-syntax-highlight-groups-under-the-cursor
[nvim-treesitter]: https://github.com/nvim-treesitter/nvim-treesitter

## Making `undercurls` work properly in **Tmux**

To have undercurls show up and in color, add the following to your **Tmux** config file:

Expand Down
8 changes: 7 additions & 1 deletion lua/github-theme/autocmds.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
local config = require('github-theme.config')
local util = require('github-theme.util')

local M = {}
local M = {
checked_autocmds = false,
}

---Delete the autocmds when the theme changes to something else
M.on_colorscheme = function()
Expand Down Expand Up @@ -74,13 +76,17 @@ M.native_cmds = function()
end

M.set = function()
if M.checked_deprecation then
return
end
if util.use_nvim_api then
if not pcall(M.native_cmds) then
M.viml_cmds()
end
else
M.viml_cmds()
end
M.checked_autocmds = true
end

return M
2 changes: 2 additions & 0 deletions lua/github-theme/init.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local config = require('github-theme.config')
local autocmds = require('github-theme.autocmds')

local function read_file(filepath)
local file = io.open(filepath, 'r')
Expand Down Expand Up @@ -61,6 +62,7 @@ function M.load(opts)
---@diagnostic disable-next-line: need-check-nil
f()

autocmds.set()
lock = false
end

Expand Down

0 comments on commit bc90cdf

Please sign in to comment.