summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/settings.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/settings.lua')
-rwxr-xr-x.config/nvim/lua/settings.lua52
1 files changed, 49 insertions, 3 deletions
diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua
index aa04dce..eaa5617 100755
--- a/.config/nvim/lua/settings.lua
+++ b/.config/nvim/lua/settings.lua
@@ -11,12 +11,23 @@ o.autochdir = false
o.smarttab = true
o.number = true
o.list = true
+o.mouse = ''
+o.backspace = 'indent,eol,start'
+
o.swapfile = false
-- o.foldmethod = 'expr'
-- o.foldexpr = 'nvim_treesitter#foldexpr()'
+local format = function(diagnostic)
+ if diagnostic.severity == vim.diagnostic.severity.ERROR then
+ -- return string.format("E: %s", diagnostic.message)
+ return diagnostic.message .. diagnostic.source
+ end
+ return diagnostic.message
+end
+
cmd 'syntax enable'
cmd 'filetype on'
cmd 'filetype plugin on'
@@ -24,7 +35,42 @@ cmd 'filetype indent on'
cmd 'colorscheme colorscheme'
vim.cmd([[
-au BufNewFile,BufRead *.Dockerfile,Dockerfile.* setlocal filetype=dockerfile
-au BufNewFile,BufRead *.j2*,*.jinja* setlocal filetype=django
-au BufNewFile,BufRead *.env* setlocal filetype=sh
+ au BufNewFile,BufRead *.j2*,*.jinja* setlocal filetype=django
+
+ au BufNewFile,BufRead */.config/neomutt/*
+ \ if &filetype == "" |
+ \ setlocal filetype=neomuttrc |
+ \ endif
]])
+
+vim.filetype.add({
+ pattern = {
+ ['.*playbooks/.*%.yml'] = 'yaml.ansible',
+ ['.*roles/.*/tasks/.*%.yml'] = 'yaml.ansible',
+ ['.*roles/.*/defaults/.*%.yml'] = 'yaml.ansible',
+ ['.*roles/.*/vars/.*%.yml'] = 'yaml.ansible',
+ ['.*roles/.*/meta/.*%.yml'] = 'yaml.ansible',
+ ['.*roles/.*/templates/.*%.yml'] = 'yaml.ansible',
+ ['.*%.Dockerfile'] = 'dockerfile',
+ ['Dockerfile%..*'] = 'dockerfile',
+ ['.*%.env.*'] = 'sh',
+ ['.*/task/config'] = 'taskrc',
+ ['%.ansible%-lint'] = 'yaml',
+ ['%.yamllint'] = 'yaml',
+ }
+})
+
+--[[
+require'nvim-treesitter.configs'.setup {
+ textobjects = {
+ lsp_interop = {
+ enable = true,
+ border = 'none',
+ peek_definition_code = {
+ ["<space>k"] = "@function.outer",
+ ["<space>K"] = "@class.outer",
+ },
+ },
+ },
+}
+]]--
remember that computers suck.