Skip to content

Commit

Permalink
Add: efm
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuki0924 committed Nov 7, 2021
1 parent 76523c5 commit 6cd5467
Show file tree
Hide file tree
Showing 3 changed files with 189 additions and 3 deletions.
184 changes: 184 additions & 0 deletions .config/efm-langserver/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
version: 2
root-markers:
- .git/
lint-debounce: 1s

tools:
vim-vint: &vim-vint
lint-command: 'vint -'
lint-stdin: true
lint-formats:
- '%f:%l:%c: %m'

make-checkmake: &make-checkmake
lint-command: 'checkmake'
lint-stdin: true

markdown-markdownlint: &markdown-markdownlint
lint-command: 'markdownlint -s -c ~/.markdownlintrc'
lint-stdin: true
lint-formats:
- '%f:%l %m'
- '%f:%l:%c %m'
- '%f: %l: %m'

markdown-pandoc: &markdown-pandoc
format-command: 'pandoc -f markdown -t gfm -sp --tab-stop=2'

rst-pandoc: &rst-pandoc
format-command: 'pandoc -f rst -t rst -s --columns=79'

rst-lint: &rst-lint
lint-command: 'rst-lint'
lint-formats:
- 'tNFO %f:%l %m'
- '%tARNING %f:%l %m'
- '%tRROR %f:%l %m'
- '%tEVERE %f:%l %m'

yaml-yamllint: &yaml-yamllint
lint-command: 'yamllint -f parsable -'
lint-stdin: true

python-flake8: &python-flake8
lint-command: 'flake8 --stdin-display-name ${INPUT} -'
lint-stdin: true
lint-formats:
- '%f:%l:%c: %m'

python-mypy: &python-mypy
lint-command: 'mypy --show-column-numbers'
lint-formats:
- '%f:%l:%c: %trror: %m'
- '%f:%l:%c: %tarning: %m'
- '%f:%l:%c: %tote: %m'

python-black: &python-black
format-command: 'black --quiet -'
format-stdin: true

python-autopep8: &python-autopep8
format-command: 'autopep8 -'
format-stdin: true

python-yapf: &python-yapf
format-command: 'yapf --quiet'
format-stdin: true

python-isort: &python-isort
format-command: 'isort --quiet -'
format-stdin: true

python-pylint: &python-pylint
lint-command: 'pylint --output-format text --score no --msg-template {path}:{line}:{column}:{C}:{msg} ${INPUT}'
lint-stdin: false
lint-formats:
- '%f:%l:%c:%t:%m'
lint-offset-columns: 1
lint-category-map:
I: H
R: I
C: I
W: W
E: E
F: E

dockerfile-hadolint: &dockerfile-hadolint
lint-command: 'hadolint'
lint-formats:
- '%f:%l %m'

sh-shellcheck: &sh-shellcheck
lint-command: 'shellcheck -f gcc -x'
lint-source: 'shellcheck'
lint-formats:
- '%f:%l:%c: %trror: %m'
- '%f:%l:%c: %tarning: %m'
- '%f:%l:%c: %tote: %m'

sh-shfmt: &sh-shfmt
format-command: 'shfmt -ci -s -bn'
format-stdin: true

javascript-eslint: &javascript-eslint
lint-command: 'eslint -f visualstudio --stdin --stdin-filename ${INPUT}'
lint-ignore-exit-code: true
lint-stdin: true
lint-formats:
- "%f(%l,%c): %tarning %m"
- "%f(%l,%c): %rror %m"

html-prettier: &html-prettier
format-command: './node_modules/.bin/prettier ${--tab-width:tabWidth} ${--single-quote:singleQuote} --parser html'

css-prettier: &css-prettier
format-command: './node_modules/.bin/prettier ${--tab-width:tabWidth} ${--single-quote:singleQuote} --parser css'

json-prettier: &json-prettier
format-command: './node_modules/.bin/prettier ${--tab-width:tabWidth} --parser json'

json-jq: &json-jq
lint-command: 'jq .'

json-fixjson: &json-fixjson
format-command: 'fixjson'

csv-csvlint: &csv-csvlint
lint-command: 'csvlint'

lua-lua-format: &lua-lua-format
format-command: 'lua-format -i'
format-stdin: true

languages:
vim:
- <<: *vim-vint

make:
- <<: *make-checkmake

markdown:
- <<: *markdown-markdownlint
- <<: *markdown-pandoc

rst:
- <<: *rst-lint
- <<: *rst-pandoc

yaml:
- <<: *yaml-yamllint

python:
- <<: *python-flake8
- <<: *python-mypy
# - <<: *python-autopep8
# - <<: *python-yapf
- <<: *python-black
- <<: *python-isort

dockerfile:
- <<: *dockerfile-hadolint

sh:
- <<: *sh-shellcheck
- <<: *sh-shfmt

javascript:
- <<: *javascript-eslint

html:
- <<: *html-prettier

css:
- <<: *css-prettier

json:
- <<: *json-jq
- <<: *json-fixjson
# - <<: *json-prettier

csv:
- <<: *csv-csvlint

lua:
- <<: *lua-lua-format
6 changes: 4 additions & 2 deletions .skhdrc
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ hyper - n : yabai -m window --toggle zoom-parent
hyper - m : yabai -m window --toggle float; yabai -m window --grid 8:8:1:1:6:6
# window: toggle float
hyper - f : yabai -m window --toggle float
# window: toggle topmost
hyper - g : yabai -m window --toggle topmost

# window: orientation
hyper - return : yabai -m space --balance
hyper - r : yabai -m space --rotate 90
hyper - e : yabai -m window --toggle split
hyper - f : yabai -m space --mirror x-axis
hyper - g : yabai -m space --mirror y-axis
# hyper - , : yabai -m space --mirror x-axis
# hyper - . : yabai -m space --mirror y-axis

# display: move window to display n, then follow
hyper - 6 : yabai -m window --display 1; yabai -m display --focus 1
Expand Down
2 changes: 1 addition & 1 deletion .tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
# copy text with `y` in copy mode
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel

# copy text with mouse selection without pressing any key
# copy text with mouse selection
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-no-clear

# emacs key bindings in tmux command prompt (prefix + :) are better than
Expand Down

0 comments on commit 6cd5467

Please sign in to comment.