Filetype stuff
This commit is contained in:
parent
02139ebd70
commit
c1e2bb675d
5 changed files with 25 additions and 21 deletions
|
@ -1,2 +0,0 @@
|
|||
vim.keymap.set("i", "<C-CR>", "<CMD>x<CR>", { buffer=true })
|
||||
vim.cmd('startinsert')
|
2
nvim/ftplugin/gitcommit.vim
Normal file
2
nvim/ftplugin/gitcommit.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
inoremap <buffer> <C-CR> <CMD>x<CR>
|
||||
startinsert
|
|
@ -1,3 +0,0 @@
|
|||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
|
@ -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"
|
||||
}
|
||||
})
|
||||
|
|
22
nvim/lua/filetypes.lua
Normal file
22
nvim/lua/filetypes.lua
Normal file
|
@ -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'
|
||||
})
|
Loading…
Reference in a new issue