-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from maxmx03/69-configuring-highlight-of-type-…
…variable 69 configuring highlight of type variable
- Loading branch information
Showing
16 changed files
with
407 additions
and
102 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,61 @@ | ||
name: Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Stylua | ||
uses: JohnnyMorganz/stylua-action@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
version: latest | ||
args: --check . | ||
|
||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
name: pandoc to vimdoc | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: panvimdoc | ||
uses: kdheepak/panvimdoc@main | ||
with: | ||
vimdoc: solarized.nvim | ||
treesitter: true | ||
version: "NVIM v0.9.4" | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: 'chore(doc): auto generate docs' | ||
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>" | ||
|
||
test: | ||
name: Run Test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: rhysd/action-setup-vim@v1 | ||
with: | ||
neovim: true | ||
|
||
- name: luajit | ||
uses: leafo/gh-actions-lua@v10 | ||
with: | ||
luaVersion: "luajit-2.1.0-beta3" | ||
|
||
- name: luarocks | ||
uses: leafo/gh-actions-luarocks@v4 | ||
|
||
- name: run test | ||
shell: bash | ||
run: | | ||
luarocks install luacheck | ||
luarocks install vusted | ||
vusted ./tests |
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,3 @@ | ||
{ | ||
"diagnostics.disable": ["undefined-field"] | ||
} |
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,7 @@ | ||
FROM archlinux | ||
WORKDIR /dracula | ||
COPY . . | ||
RUN pacman -Syu --noconfirm | ||
RUN pacman -S luarocks neovim gcc lua51 --noconfirm | ||
RUN luarocks install luacheck && luarocks --lua-version=5.1 install vusted | ||
CMD [ "vusted", "./tests" ] |
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
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
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,7 @@ | ||
column_width = 80 | ||
line_endings = "Unix" | ||
indent_type = "Spaces" | ||
indent_width = 2 | ||
quote_style = "AutoPreferSingle" | ||
call_parentheses = "Always" | ||
collapse_simple_statement = "ConditionalOnly" |
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,27 @@ | ||
#!/usr/bin/python3 | ||
|
||
import subprocess | ||
import sys | ||
|
||
|
||
def run_commands(commands): | ||
for command in commands: | ||
process = subprocess.Popen(command, shell=True) | ||
process.wait() | ||
|
||
|
||
if __name__ == '__main__': | ||
install_dependencies = False | ||
if len(sys.argv) > 1 and sys.argv[1] == '--install': | ||
install_dependencies = True | ||
|
||
commands = [] | ||
if install_dependencies: | ||
commands.append('cargo install stylua') | ||
commands.append('sudo luarocks install luacheck') | ||
commands.append('sudo luarocks install vusted') | ||
|
||
commands.append('stylua . -f ./stylua.toml') | ||
commands.append('vusted ./tests') | ||
|
||
run_commands(commands) |
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,19 @@ | ||
describe('Autocmd', function() | ||
test('Solarized Highlights is being created', function() | ||
vim.cmd.colorscheme('solarized') | ||
local todo = { | ||
'TODO', | ||
'WARN', | ||
'TEST', | ||
'PERF', | ||
'NOTE', | ||
'HACK', | ||
'FIX', | ||
} | ||
|
||
for _, name in pairs(todo) do | ||
local output = vim.api.nvim_get_hl(0, { name = 'SolarizedToken' .. name }) | ||
assert.is_true(type(output.fg) == 'number') | ||
end | ||
end) | ||
end) |
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,47 @@ | ||
local colorhelper = require('solarized.utils.colors') | ||
local solarized_palette = require('solarized.palette') | ||
|
||
describe('Color Conversions', function() | ||
test('Convert hex to RGB', function() | ||
local colors = solarized_palette.get_colors() | ||
local red, green, blue = colorhelper.hex_to_rgb(colors.yellow) | ||
local expect = { red = 181, green = 137, blue = 0 } | ||
|
||
assert.are.same(expect.red, red) | ||
assert.are.same(expect.green, green) | ||
assert.are.same(expect.blue, blue) | ||
end) | ||
|
||
test('Convert RGB to hex', function() | ||
local colors = solarized_palette.get_colors() | ||
local yellow = { red = 181, green = 137, blue = 0 } | ||
local output = colorhelper.rgb_to_hex(yellow.red, yellow.green, yellow.blue) | ||
local expect = colors.yellow | ||
|
||
assert.equals(expect, string.lower(output)) | ||
end) | ||
|
||
test('Darken the color by percentage', function() | ||
local colors = solarized_palette.get_colors() | ||
local output = colorhelper.darken(colors.green, 100) | ||
local expect = '#000000' | ||
assert.equals(expect, output) | ||
end) | ||
|
||
test('Lighten the color by percentage', function() | ||
local colors = solarized_palette.get_colors() | ||
local output = colorhelper.lighten(colors.green, 100) | ||
local expect = '#ffffff' | ||
assert.equals(expect, output) | ||
end) | ||
|
||
test('Blend colors', function() | ||
local blend = require('solarized.utils.colors').blend | ||
local alpha = 0.15 | ||
local expect = '#27383f' | ||
|
||
local output = blend('#73daca', '#1a1b26', alpha) | ||
|
||
assert.equals(output, expect) | ||
end) | ||
end) |
Oops, something went wrong.