diff --git a/nvim/ftplugin/gitcommit.lua b/nvim/ftplugin/gitcommit.lua deleted file mode 100644 index 3642f44..0000000 --- a/nvim/ftplugin/gitcommit.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.keymap.set("i", "", "x", { buffer=true }) -vim.cmd('startinsert') diff --git a/nvim/ftplugin/gitcommit.vim b/nvim/ftplugin/gitcommit.vim new file mode 100644 index 0000000..b815bee --- /dev/null +++ b/nvim/ftplugin/gitcommit.vim @@ -0,0 +1,2 @@ +inoremap x +startinsert diff --git a/nvim/ftplugin/lua.lua b/nvim/ftplugin/lua.lua deleted file mode 100644 index 3da2b37..0000000 --- a/nvim/ftplugin/lua.lua +++ /dev/null @@ -1,3 +0,0 @@ -vim.opt.tabstop = 2 -vim.opt.softtabstop = 2 -vim.opt.shiftwidth = 2 diff --git a/nvim/init.lua b/nvim/init.lua index 64b1c44..dcc5c8c 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,5 +1,6 @@ require("options") require("keymaps") +require("filetypes") local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then @@ -14,19 +15,3 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) require("lazy").setup("plugins") - -vim.filetype.add({ - filename = { - ["user-dirs.dirs"] = "conf", - - ["gruvbox.conf"] = "kitty", - ["keys.conf"] = "kitty", - ["kitty.conf"] = "kitty", - - ["dot-zshenv"] = "zsh", - ["dot-zshrc"] = "zsh" - }, - pattern = { - [".*/git/config"] = "gitconfig" - } -}) diff --git a/nvim/lua/filetypes.lua b/nvim/lua/filetypes.lua new file mode 100644 index 0000000..d5817ed --- /dev/null +++ b/nvim/lua/filetypes.lua @@ -0,0 +1,22 @@ +vim.filetype.add({ + filename = { + ["user-dirs.dirs"] = "conf", + + ["gruvbox.conf"] = "kitty", + ["keys.conf"] = "kitty", + ["kitty.conf"] = "kitty", + ["ssh.conf"] = "kitty", + + ["dot-zshenv"] = "zsh", + ["dot-zshrc"] = "zsh" + }, + pattern = { + [".*/git/config"] = "gitconfig" + } +}) + +vim.api.nvim_create_autocmd('Filetype', { + group = vim.api.nvim_create_augroup('setIndent', { clear = true }), + pattern = { "lua", "html" }, + command = 'setlocal tabstop=2 softtabstop=2 shiftwidth=2' +})