mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-04-20 00:37:44 +02:00
Compare commits
No commits in common. "b9bda1b5048eb56704b66d6c1fc678a3fee61988" and "1eb2af2098ee4cba2136a73ed51cb65f12b276e5" have entirely different histories.
b9bda1b504
...
1eb2af2098
@ -1,9 +0,0 @@
|
||||
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
||||
{
|
||||
command = '!cclear'
|
||||
})
|
||||
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.softtabstop = 2
|
||||
vim.o.textwidth = 80
|
||||
vim.o.colorcolumn = "-0"
|
@ -1,4 +0,0 @@
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.softtabstop = 2
|
||||
vim.o.textwidth = 100
|
||||
vim.o.colorcolumn = "-0"
|
@ -1,4 +0,0 @@
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.softtabstop = 2
|
||||
vim.o.textwidth = 100
|
||||
vim.o.colorcolumn = "-0"
|
@ -1,4 +0,0 @@
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.softtabstop = 2
|
||||
vim.o.textwidth = 100
|
||||
vim.o.colorcolumn = "-0"
|
@ -1,9 +0,0 @@
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
||||
{
|
||||
callback = function() vim.o.foldenable = false end
|
||||
})
|
||||
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.softtabstop = 2
|
||||
vim.o.textwidth = 100
|
||||
vim.o.colorcolumn = "-0"
|
@ -1,4 +0,0 @@
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.softtabstop = 2
|
||||
vim.o.textwidth = 80
|
||||
vim.o.colorcolumn = "-0"
|
@ -1,4 +0,0 @@
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.softtabstop = 2
|
||||
vim.o.textwidth = 80
|
||||
vim.o.colorcolumn = "-0"
|
@ -1,9 +0,0 @@
|
||||
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
||||
{
|
||||
command = '!texclear %'
|
||||
})
|
||||
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.softtabstop = 2
|
||||
vim.o.textwidth = 80
|
||||
vim.o.colorcolumn = "-0"
|
@ -73,28 +73,15 @@ vim.o.foldenable = true
|
||||
vim.o.conceallevel = 0
|
||||
vim.g.markdown_folding = 1
|
||||
|
||||
-- read files correctly
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
c = 'c',
|
||||
h = 'c',
|
||||
html = 'html',
|
||||
java = 'java',
|
||||
js = 'javascript',
|
||||
lua = 'lua',
|
||||
md = 'markdown',
|
||||
nim = 'nim',
|
||||
py = 'python',
|
||||
tex = 'tex',
|
||||
}
|
||||
})
|
||||
|
||||
-- load general mapped keys
|
||||
require('style')
|
||||
|
||||
-- load plugins (autoload all files in plugin folder)
|
||||
require('loadplugins')
|
||||
|
||||
-- set filetypes correctly by extension
|
||||
require('autocmd')
|
||||
|
||||
-- load general mapped keys
|
||||
require('keymap')
|
||||
|
||||
|
116
.config/nvim/lua/autocmd.lua
Normal file
116
.config/nvim/lua/autocmd.lua
Normal file
@ -0,0 +1,116 @@
|
||||
-- read files correctly
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
c = 'c',
|
||||
h = 'c',
|
||||
html = 'html',
|
||||
java = 'java',
|
||||
js = 'javascript',
|
||||
lua = 'lua',
|
||||
md = 'markdown',
|
||||
nim = 'nim',
|
||||
py = 'python',
|
||||
tex = 'tex',
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
-- settings for filetype: c
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
||||
{
|
||||
pattern = { '*.c' },
|
||||
command = '!cclear'
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
||||
{
|
||||
pattern = { 'c' },
|
||||
command = 'set colorcolumn=80'
|
||||
})
|
||||
|
||||
-- settings for filetype: java
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'FileType' },
|
||||
{
|
||||
pattern = { 'java' },
|
||||
command = 'setlocal shiftwidth=2 softtabstop=2',
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
||||
{
|
||||
pattern = { 'java' },
|
||||
command = 'set colorcolumn=100'
|
||||
})
|
||||
|
||||
-- settings for filetype: javascript
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'FileType' },
|
||||
{
|
||||
pattern = { 'javascript' },
|
||||
command = 'setlocal shiftwidth=2 softtabstop=2',
|
||||
})
|
||||
|
||||
-- settings for filetype: lua
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'FileType' },
|
||||
{
|
||||
pattern = { 'lua' },
|
||||
command = 'setlocal shiftwidth=2 softtabstop=2',
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
||||
{
|
||||
pattern = { 'lua' },
|
||||
command = 'set colorcolumn=100'
|
||||
})
|
||||
|
||||
-- settings for filetype: markdown
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'FileType' },
|
||||
{
|
||||
pattern = { 'markdown' },
|
||||
command = 'setlocal shiftwidth=2 softtabstop=2',
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
||||
{
|
||||
pattern = { 'markdown' },
|
||||
command = 'set colorcolumn=100'
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
||||
{
|
||||
pattern = { 'markdown' },
|
||||
command = 'set nofoldenable'
|
||||
})
|
||||
|
||||
-- settings for filetype: nim
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
||||
{
|
||||
pattern = { 'nim' },
|
||||
command = 'set colorcolumn=80'
|
||||
})
|
||||
|
||||
-- settings for filetype: python
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
||||
{
|
||||
pattern = { 'python' },
|
||||
command = 'set colorcolumn=80'
|
||||
})
|
||||
|
||||
-- settings for filetype: tex
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
||||
{
|
||||
pattern = { '*.tex' },
|
||||
command = '!texclear %'
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
||||
{
|
||||
pattern = { 'tex' },
|
||||
command = 'set colorcolumn=80'
|
||||
})
|
@ -25,7 +25,7 @@ super + m
|
||||
thunderbird
|
||||
|
||||
super + shift + l
|
||||
setxkbmap -query | grep -q 'nodeadkeys' && $(setxkbmap de ru ; notify-send 'sxhkd' 'Set keymap to russian') || $(setxkbmap de nodeadkeys ; notify-send 'sxhkd' 'Set keymap to german')
|
||||
setxkbmap -query | grep -q ' de' && $(setxkbmap ru ; notify-send 'sxhkd' 'Set keymap to russian') || $(setxkbmap de nodeadkeys ; notify-send 'sxhkd' 'Set keymap to german')
|
||||
|
||||
super + shift + r
|
||||
pkill -usr1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config'
|
||||
|
Loading…
x
Reference in New Issue
Block a user