Port over filetype plugin settings

This commit is contained in:
2024-04-02 23:02:49 +01:00
parent d7ac1f7213
commit 381d4e66cf
19 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
vim.opt.spell = true
-- Auto-wrap text using textwidth
vim.opt.formatoptions:append('t')
-- When formatting text, recognize numbered lists
vim.opt.formatoptions:append('n')
-- Allow formatting of comments with 'gq'
vim.opt.formatoptions:append('q')
-- Automatically insert the current comment leader after hitting 'o' or 'O' in
-- Normal mode
vim.opt.formatoptions:append('o')
-- A pattern that is used to recognize a list header
vim.opt.formatlistpat = "^\\s*\\d\\+\\.\\s\\+\\|^[-*+]\\s\\+"

View File

@@ -0,0 +1,5 @@
-- Setup tabs
vim.opt.expandtab = false
vim.opt.tabstop = 8
vim.opt.shiftwidth = 8
vim.opt.softtabstop = 8

View File

@@ -1,3 +1,4 @@
vim.opt.spell = false
vim.opt.number = false
vim.opt.relativenumber = false
vim.opt.signcolumn = 'no'

3
after/ftplugin/llvm.lua Normal file
View File

@@ -0,0 +1,3 @@
-- Include % and . in keywords for easier navigation of ID's
vim.opt.iskeyword:append('%')
vim.opt.iskeyword:append('.')

1
after/ftplugin/make.lua Normal file
View File

@@ -0,0 +1 @@
vim.opt.tabstop = 8

2
after/ftplugin/man.lua Normal file
View File

@@ -0,0 +1,2 @@
vim.opt.showbreak = ''
vim.opt.signcolumn = 'no'

View File

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

20
after/ftplugin/python.lua Normal file
View File

@@ -0,0 +1,20 @@
-- Use sane tab settings for Python
vim.opt.expandtab = true
vim.opt.tabstop = 8
vim.opt.shiftwidth = 4
vim.opt.softtabstop = 4
vim.opt.textwidth = 0
-- Auto-wrap comments using textwidth
vim.opt.formatoptions:append('c')
-- Automatically insert the current comment leader after hitting <Enter> in
-- Insert mode
vim.opt.formatoptions:append('r')
-- Automatically insert the current comment leader after hitting 'o' or 'O' in
-- Normal mode.
vim.opt.formatoptions:append('o')
-- Set file encoding and format to sane values for Python
vim.opt.encoding = 'utf-8'
vim.opt.fileformat = 'unix'

1
after/ftplugin/tags.lua Normal file
View File

@@ -0,0 +1 @@
vim.opt.expandtab = false

2
after/ftplugin/text.lua Normal file
View File

@@ -0,0 +1,2 @@
vim.opt.spell = true
vim.opt.textwidth = 80