aboutsummaryrefslogtreecommitdiffstats
path: root/lua/config
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-31 09:44:13 +0100
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-01-31 09:44:13 +0100
commit669561e21073e6efafddda25ba3ace69fb43819e (patch)
treef94ebd60ad4cab480b5cbcb7e65dd2060696c339 /lua/config
parent5044c70e9f62cdd06ee91e754423b07c1c18c12d (diff)
downloadnvim-conf-669561e21073e6efafddda25ba3ace69fb43819e.tar.gz
nvim-conf-669561e21073e6efafddda25ba3ace69fb43819e.zip
feat: apply stylua
Diffstat (limited to 'lua/config')
-rw-r--r--lua/config/autocmds.lua10
-rw-r--r--lua/config/diagnostic.lua10
-rw-r--r--lua/config/init.lua18
-rw-r--r--lua/config/keymaps.lua2
-rw-r--r--lua/config/lazy.lua66
-rw-r--r--lua/config/options.lua4
6 files changed, 55 insertions, 55 deletions
diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua
index 5a0bd77..b8953ce 100644
--- a/lua/config/autocmds.lua
+++ b/lua/config/autocmds.lua
@@ -1,7 +1,7 @@
-- resize splits if window got resized
vim.api.nvim_create_autocmd({ "VimResized" }, {
callback = function()
- vim.cmd("tabdo wincmd =")
+ vim.cmd "tabdo wincmd ="
end,
})
@@ -32,8 +32,8 @@ vim.api.nvim_create_autocmd("FileType", {
end,
})
-vim.api.nvim_create_autocmd({"BufWritePre"}, {
- callback = function ()
- vim.cmd([[%s/\s\+$//e]])
- end
+vim.api.nvim_create_autocmd({ "BufWritePre" }, {
+ callback = function()
+ vim.cmd [[%s/\s\+$//e]]
+ end,
})
diff --git a/lua/config/diagnostic.lua b/lua/config/diagnostic.lua
index 7d56f1c..67465ae 100644
--- a/lua/config/diagnostic.lua
+++ b/lua/config/diagnostic.lua
@@ -1,9 +1,9 @@
-vim.diagnostic.config({
- virtual_text = false,
-})
+vim.diagnostic.config {
+ virtual_text = false,
+}
local signs = { Error = "", Warn = "", Hint = "", Info = "" }
for type, icon in pairs(signs) do
- local hl = "DiagnosticSign" .. type
- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
+ local hl = "DiagnosticSign" .. type
+ vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end
diff --git a/lua/config/init.lua b/lua/config/init.lua
index c8570e2..2028a53 100644
--- a/lua/config/init.lua
+++ b/lua/config/init.lua
@@ -1,12 +1,12 @@
-require("config.options")
+require "config.options"
-- autocmds and keymaps can wait to load
vim.api.nvim_create_autocmd("User", {
- group = vim.api.nvim_create_augroup("LazyVim", { clear = true }),
- pattern = "VeryLazy",
- callback = function()
- require("config.autocmds")
- require("config.keymaps")
- require("config.diagnostic")
- end,
+ group = vim.api.nvim_create_augroup("LazyVim", { clear = true }),
+ pattern = "VeryLazy",
+ callback = function()
+ require "config.autocmds"
+ require "config.keymaps"
+ require "config.diagnostic"
+ end,
})
-require("config.lazy")
+require "config.lazy"
diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua
index 95ad0d7..111965b 100644
--- a/lua/config/keymaps.lua
+++ b/lua/config/keymaps.lua
@@ -21,7 +21,7 @@ map("v", ">", ">gv")
-- symbols to add undo points
local symbols = { ",", ".", "!", "?", "$", ">", "<" }
for _, symbol in pairs(symbols) do
- map("i", symbol, symbol .. "<c-g>u")
+ map("i", symbol, symbol .. "<c-g>u")
end
-- search result focus
diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua
index 29b1357..14f8740 100644
--- a/lua/config/lazy.lua
+++ b/lua/config/lazy.lua
@@ -1,38 +1,38 @@
-local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
- vim.fn.system({
- "git",
- "clone",
- "--filter=blob:none",
- "https://github.com/folke/lazy.nvim.git",
- "--branch=stable", -- latest stable release
- lazypath,
- })
+ vim.fn.system {
+ "git",
+ "clone",
+ "--filter=blob:none",
+ "https://github.com/folke/lazy.nvim.git",
+ "--branch=stable", -- latest stable release
+ lazypath,
+ }
end
vim.opt.rtp:prepend(lazypath)
-require("lazy").setup({
- spec = {
- { import = "plugins" },
+require("lazy").setup {
+ spec = {
+ { import = "plugins" },
+ },
+ checker = { enabled = true, notify = false },
+ dev = {
+ path = "~/code/plugins",
+ fallback = true,
+ patterns = { "adalessa" },
+ },
+ performance = {
+ rtp = {
+ disabled_plugins = {
+ "gzip",
+ "matchit",
+ "matchparen",
+ "netrwPlugin",
+ "tarPlugin",
+ "tohtml",
+ "tutor",
+ "zipPlugin",
+ },
},
- checker = { enabled = true, notify = false },
- dev = {
- path = "~/code/plugins",
- fallback = true,
- patterns = {"adalessa"},
- },
- performance = {
- rtp = {
- disabled_plugins = {
- "gzip",
- "matchit",
- "matchparen",
- "netrwPlugin",
- "tarPlugin",
- "tohtml",
- "tutor",
- "zipPlugin",
- },
- },
- },
-})
+ },
+}
diff --git a/lua/config/options.lua b/lua/config/options.lua
index 21b0c68..c4d1f56 100644
--- a/lua/config/options.lua
+++ b/lua/config/options.lua
@@ -17,7 +17,7 @@ opt.errorbells = false
opt.wrap = false
opt.swapfile = false
opt.undofile = true
-opt.undodir = os.getenv("HOME") .. "/.cache/nvim/undodir"
+opt.undodir = os.getenv "HOME" .. "/.cache/nvim/undodir"
opt.hlsearch = false
opt.incsearch = true
opt.ignorecase = true
@@ -37,7 +37,7 @@ opt.cmdheight = 1
opt.updatetime = 50
opt.signcolumn = "yes"
-if vim.fn.has("nvim-0.9.0") == 1 then
+if vim.fn.has "nvim-0.9.0" == 1 then
opt.splitkeep = "screen"
opt.shortmess = "filnxtToOFWIcC"
end