dotfiles
shell, editor, ssh.
git clone https://owenrusk.dev/dotfiles.git
commit 24ccf1a85acd91bb41e2788351563de423935f89 parent 7b08881ebaedf0c9febe1254bf89ab42460abfb2 author Owen Rusk <owen@papermothgames.com> date 2024-08-26 17:50:31 -0500
nvim: two-space indent for lua, yaml, json and friends
| nvim/lua/owen/autocmds.lua | +10 | -0 |
diff --git a/nvim/lua/owen/autocmds.lua b/nvim/lua/owen/autocmds.lua
index 38c9291..b615f78 100644
--- a/nvim/lua/owen/autocmds.lua
+++ b/nvim/lua/owen/autocmds.lua
@@ -15,6 +15,16 @@ au("BufReadPost", {
end,
})
+-- two spaces where everyone else uses two spaces
+au("FileType", {
+ pattern = { "lua", "yaml", "json", "javascript", "typescript", "css", "markdown" },
+ callback = function()
+ vim.opt_local.shiftwidth = 2
+ vim.opt_local.tabstop = 2
+ vim.opt_local.softtabstop = 2
+ end,
+})
+
au("TextYankPost", {
callback = function()
vim.highlight.on_yank({ timeout = 150 })