added latex support and reorg ftplugins

This commit is contained in:
Jeremie Fraeys 2024-08-20 01:31:44 -04:00
parent 7f1b34fd6f
commit f2eaf7c67a
38 changed files with 600 additions and 234 deletions

5
ftplugin/c.lua Normal file
View file

@ -0,0 +1,5 @@
vim.opt_local.expandtab = true
vim.opt_local.tabstop = 4
vim.opt_local.shiftwidth = 10
vim.opt_local.softtabstop = 4
vim.opt_local.formatoptions:remove('o')

1
ftplugin/crontab.lua Normal file
View file

@ -0,0 +1 @@
vim.opt_local.fixeol = false

2
ftplugin/dockerfile.lua Normal file
View file

@ -0,0 +1,2 @@
vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 2

10
ftplugin/go.lua Normal file
View file

@ -0,0 +1,10 @@
-- Set buffer-local options for Go files
vim.opt_local.expandtab = true
vim.opt_local.commentstring = '// %s'
vim.opt_local.comments = 's1:/*,mb:*,ex:*/,://'
-- Define a key mapping to trigger Go debugging
vim.keymap.set('n', '<leader>td', function()
require('dap-go').debug_test()
end, { buffer = 0 }) -- Set buffer-local key mapping

10
ftplugin/lua.lua Normal file
View file

@ -0,0 +1,10 @@
vim.opt.expandtab = true
vim.opt.shiftwidth = 4
vim.opt.tabstop = 4
vim.opt.expandtab = true
vim.opt_local.formatoptions:remove('o')
vim.opt_local.commentstring = '-- %s'
vim.opt_local.colorcolumn = '120'

1
ftplugin/make.lua Normal file
View file

@ -0,0 +1 @@

5
ftplugin/ocaml.lua Normal file
View file

@ -0,0 +1,5 @@
vim.opt.shiftwidth = 2
-- vim.keymap.set('n', '<space>cp', require('ocaml.mappings').dune_promote_file, { buffer = 0 })
--

9
ftplugin/python.lua Normal file
View file

@ -0,0 +1,9 @@
vim.opt_local.expandtab = true
vim.opt_local.commentstring = '# %s'
vim.opt_local.smarttab = true
vim.opt_local.shiftwidth = 4
vim.opt_local.tabstop = 4
vim.opt_local.softtabstop = 4
vim.opt_local.fileformat = 'unix'
vim.opt_local.textwidth = 79
vim.opt_local.colorcolumn = '80'

15
ftplugin/rust.lua Normal file
View file

@ -0,0 +1,15 @@
-- Set buffer-local options for Rust files
vim.opt_local.expandtab = true
vim.opt_local.autoindent = true
vim.opt_local.smartindent = true
vim.opt_local.shiftwidth = 4
vim.opt_local.tabstop = 4
vim.opt_local.softtabstop = 4
vim.opt_local.textwidth = 80
vim.opt_local.colorcolumn = '80'
-- Define key mappings or other configurations specific to Rust
-- For example:
vim.keymap.set('n', '<leader>r', '<CMD>Cargo run<CR>', { desc = 'Run the current Rust project', noremap = true })
vim.keymap.set('n', '<leader>c', '<CMD>Cargo check<CR>', { desc = 'Check the current Rust project', noremap = true })

7
ftplugin/sh.lua Normal file
View file

@ -0,0 +1,7 @@
vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 2
vim.opt_local.softtabstop = 2
vim.opt_local.tabstop = 2
vim.opt_local.textwidth = 80
vim.opt_local.syntax = enable

1
ftplugin/sql.lua Normal file
View file

@ -0,0 +1 @@
vim.opt_local.commentstring = '-- %s'

0
ftplugin/yaml.lua Normal file
View file