pre-commit: enable stylua
hook
This commit is contained in:
parent
1db5d0015a
commit
b9d60d7078
10 changed files with 31 additions and 26 deletions
|
@ -17,3 +17,10 @@ repos:
|
|||
config\/zsh\/.*|
|
||||
home/\.zshenv
|
||||
)$
|
||||
|
||||
- repo: https://github.com/rwxcorp/pre-commit-lua.git
|
||||
rev: v1.0.0
|
||||
hooks:
|
||||
- id: stylua
|
||||
args: [-f, config/nvim/stylua.toml]
|
||||
files: ^config\/nvim\/.*lua$
|
||||
|
|
|
@ -1 +1 @@
|
|||
vim.bo.commentstring = '// %s'
|
||||
vim.bo.commentstring = "// %s"
|
||||
|
|
|
@ -1 +1 @@
|
|||
vim.bo.commentstring = '// %s'
|
||||
vim.bo.commentstring = "// %s"
|
||||
|
|
|
@ -1 +1 @@
|
|||
vim.bo.commentstring = '# %s'
|
||||
vim.bo.commentstring = "# %s"
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
vim.bo.tabstop = 2
|
||||
|
||||
local lua = require('fschauen.util.lua')
|
||||
local lua = require("fschauen.util.lua")
|
||||
local map = vim.keymap.set
|
||||
local opts = function(desc) return { desc = desc, buffer = true, silent = true } end
|
||||
|
||||
local opts = function(desc)
|
||||
return { desc = desc, buffer = true, silent = true }
|
||||
end
|
||||
-- stylua: ignore start
|
||||
map("n", "gf", lua.go_to_module, opts("Go to module under cursor"))
|
||||
|
||||
vim.keymap.set('n', 'gf', lua.go_to_module, opts('Go to module under cursor'))
|
||||
map("n", "<localleader>x", lua.execute_lines, opts("Execute current line"))
|
||||
map("x", "<localleader>x", lua.execute_selection, opts("Execute selection"))
|
||||
map("n", "<localleader><localleader>x", lua.execute_file, opts("Execute current file"))
|
||||
|
||||
vim.keymap.set('n', '<localleader>x', lua.execute_lines, opts('Execute current line'))
|
||||
vim.keymap.set('x', '<localleader>x', lua.execute_selection, opts('Execute selection'))
|
||||
vim.keymap.set('n', '<localleader><localleader>x', lua.execute_file, opts('Execute current file'))
|
||||
|
||||
vim.keymap.set('n', [[<localleader>']], [[:.s/"/'/g | nohl<cr>]], opts([[Replace: " ']]))
|
||||
vim.keymap.set('n', [[<localleader>"]], [[:.s/'/"/g | nohl<cr>]], opts([[Replace: ' "]]))
|
||||
vim.keymap.set('x', [[<localleader>']], [[:s/"/'/g | nohl<cr>]], opts([[Replace: " ']]))
|
||||
vim.keymap.set('x', [[<localleader>"]], [[:s/'/"/g | nohl<cr>]], opts([[Replace: ' "]]))
|
||||
map("n", [[<localleader>']], [[:.s/"/'/g | nohl<cr>]], opts([[Replace: " ']]))
|
||||
map("n", [[<localleader>"]], [[:.s/'/"/g | nohl<cr>]], opts([[Replace: ' "]]))
|
||||
map("x", [[<localleader>']], [[:s/"/'/g | nohl<cr>]], opts([[Replace: " ']]))
|
||||
map("x", [[<localleader>"]], [[:s/'/"/g | nohl<cr>]], opts([[Replace: ' "]]))
|
||||
-- stylua: ignore end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
vim.bo.tabstop = 2
|
||||
vim.bo.shiftwidth = 0 -- use 'tabstop' for indenting
|
||||
vim.opt.formatoptions:append('t') -- wrap text on 'textwidth'
|
||||
vim.opt.formatoptions:append("t") -- wrap text on 'textwidth'
|
||||
vim.opt.spell = true -- turn on spell checking
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
vim.opt.foldmethod = 'indent'
|
||||
vim.opt.foldignore = '#'
|
||||
vim.opt.foldmethod = "indent"
|
||||
vim.opt.foldignore = "#"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
vim.opt.formatoptions:append('t') -- wrap text on 'textwidth'
|
||||
vim.opt.formatoptions:append("t") -- wrap text on 'textwidth'
|
||||
vim.opt.spell = true -- turn on spell checking
|
||||
|
|
|
@ -1 +1 @@
|
|||
vim.opt.foldmethod = 'marker'
|
||||
vim.opt.foldmethod = "marker"
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
if vim.loader then
|
||||
vim.loader.enable()
|
||||
end
|
||||
if vim.loader then vim.loader.enable() end
|
||||
|
||||
require("fschauen")
|
||||
|
|
Loading…
Add table
Reference in a new issue