From ad1e243008bbbd9920c7767cf69a2430544846d9 Mon Sep 17 00:00:00 2001 From: Chris Schindlbeck Date: Mon, 15 Jan 2024 11:14:29 +0100 Subject: [PATCH] enable pre-commit --- .pre-commit-config.yaml | 16 ++++++++-------- lua/config/autocmds.lua | 2 +- lua/config/general.lua | 38 +++++++++++++++++++------------------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e1a514f..92f68e8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,15 +40,15 @@ repos: args: ["--write-changes"] exclude: CHANGELOG\.rst|\.(svg|pyc|drawio|dcf|eds)$|lazy-lock.json|example.lua - # - repo: https://github.com/Calinou/pre-commit-luacheck - # rev: v1.0.0 - # hooks: - # - id: luacheck + - repo: https://github.com/Calinou/pre-commit-luacheck + rev: v1.0.0 + hooks: + - id: luacheck - # - repo: https://github.com/JohnnyMorganz/StyLua - # rev: v0.19.1 - # hooks: - # - id: stylua # or stylua-system / stylua-github + - repo: https://github.com/JohnnyMorganz/StyLua + rev: v0.19.1 + hooks: + - id: stylua # or stylua-system / stylua-github - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.38.0 diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 5fc4f99..12a8b73 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -3,7 +3,7 @@ local autocmd = vim.api.nvim_create_autocmd local augroup = vim.api.nvim_create_augroup --- hightlight on yank +-- highlight on yank autocmd("TextYankPost", { callback = function() vim.highlight.on_yank() diff --git a/lua/config/general.lua b/lua/config/general.lua index 57dd0ae..50edc8a 100644 --- a/lua/config/general.lua +++ b/lua/config/general.lua @@ -10,25 +10,25 @@ vim.g.loaded_netrw = 1 -- disable netrw -- opt local options = { clipboard = "unnamedplus", -- connection to the system clipboard - colorcolumn = "120", -- show vertical column - expandtab = true, -- enable the use of space in tab - hlsearch = true, -- - incsearch = true, -- - ignorecase = true, -- case insensitive searching - number = true, -- show line numbers - relativenumber = false, -- relative numbers - scrolloff = 15, -- stop scrolling at the top and bottom until the end - shiftwidth = 2, -- number of spaces in indentation - sidescrolloff = 8, -- same for the sides - smartindent = true, -- - softtabstop = 2, -- - signcolumn = "yes", -- - swapfile = false, -- no annoying swap file - tabstop = 2, -- number of spaces for tab - termguicolors = true, -- - undofile = true, -- - updatetime = 50, -- - wrap = false, -- + colorcolumn = "120", -- show vertical column + expandtab = true, -- enable the use of space in tab + hlsearch = true, -- + incsearch = true, -- + ignorecase = true, -- case insensitive searching + number = true, -- show line numbers + relativenumber = false, -- relative numbers + scrolloff = 15, -- stop scrolling at the top and bottom until the end + shiftwidth = 2, -- number of spaces in indentation + sidescrolloff = 8, -- same for the sides + smartindent = true, -- + softtabstop = 2, -- + signcolumn = "yes", -- + swapfile = false, -- no annoying swap file + tabstop = 2, -- number of spaces for tab + termguicolors = true, -- + undofile = true, -- + updatetime = 50, -- + wrap = false, -- } for k, v in pairs(options) do