1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-05-12 18:57:46 +02:00

Compare commits

..

No commits in common. "24fd1ca9e0d81acea4a45d4739697c085b2af75d" and "928f9c7c27953078e98f3791b8c00a5546a523a9" have entirely different histories.

13 changed files with 57 additions and 50 deletions

View File

@ -1,7 +1,9 @@
vim.api.nvim_create_autocmd({ 'VimLeave' }, vim.api.nvim_create_autocmd({ 'VimLeave' },
{ {
callback = function() os.execute('cclear') end command = '!cclear'
}) })
vim.o.shiftwidth = 2 vim.o.shiftwidth = 2
vim.o.softtabstop = 2 vim.o.softtabstop = 2
vim.o.textwidth = 80
vim.o.colorcolumn = "-0"

View File

@ -1,3 +1,4 @@
vim.o.shiftwidth = 2 vim.o.shiftwidth = 2
vim.o.softtabstop = 2 vim.o.softtabstop = 2
vim.o.textwidth = 100 vim.o.textwidth = 100
vim.o.colorcolumn = "-0"

View File

@ -1,3 +1,4 @@
vim.o.shiftwidth = 2 vim.o.shiftwidth = 2
vim.o.softtabstop = 2 vim.o.softtabstop = 2
vim.o.textwidth = 100 vim.o.textwidth = 100
vim.o.colorcolumn = "-0"

View File

@ -1,3 +1,4 @@
vim.o.shiftwidth = 2 vim.o.shiftwidth = 2
vim.o.softtabstop = 2 vim.o.softtabstop = 2
vim.o.textwidth = 100 vim.o.textwidth = 100
vim.o.colorcolumn = "-0"

View File

@ -6,6 +6,4 @@ vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
vim.o.shiftwidth = 2 vim.o.shiftwidth = 2
vim.o.softtabstop = 2 vim.o.softtabstop = 2
vim.o.textwidth = 100 vim.o.textwidth = 100
vim.o.colorcolumn = "-0"
-- iamcco/markdown-preview.nvim
vim.keymap.set('n', '<leader>p', ':MarkdownPreviewToggle<CR>', { noremap = true })

View File

@ -0,0 +1,4 @@
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.textwidth = 80
vim.o.colorcolumn = "-0"

View File

@ -0,0 +1,4 @@
vim.o.shiftwidth = 2
vim.o.softtabstop = 2
vim.o.textwidth = 80
vim.o.colorcolumn = "-0"

View File

@ -1,10 +1,9 @@
vim.api.nvim_create_autocmd({ 'VimLeave' }, vim.api.nvim_create_autocmd({ 'VimLeave' },
{ {
callback = function() os.execute('texclear ' .. vim.fn.expand('%')) end command = '!texclear %'
}) })
vim.o.shiftwidth = 2 vim.o.shiftwidth = 2
vim.o.softtabstop = 2 vim.o.softtabstop = 2
vim.o.textwidth = 80
-- frabjous/knap vim.o.colorcolumn = "-0"
vim.keymap.set('n', '<leader>p', require("knap").toggle_autopreviewing, { noremap = true })

View File

@ -73,11 +73,6 @@ vim.o.foldenable = true
vim.o.conceallevel = 0 vim.o.conceallevel = 0
vim.g.markdown_folding = 1 vim.g.markdown_folding = 1
-- standard settings for colorcolumn and tabbing
vim.o.shiftwidth = 4
vim.o.softtabstop = 4
vim.o.textwidth = 80
-- read files correctly -- read files correctly
vim.filetype.add({ vim.filetype.add({
extension = { extension = {

View File

@ -33,6 +33,24 @@ vim.keymap.set('n', '<leader>ss', ':%s//gI<Left><Left><Left>', { noremap = true
-- irc compatibility for interactivity -- irc compatibility for interactivity
vim.keymap.set('n', '<leader>is', ':.w >> in<cr>dd', { noremap = true }) vim.keymap.set('n', '<leader>is', ':.w >> in<cr>dd', { noremap = true })
-- the following keymap settings are plugin dependent
-- frabjous/knap
vim.api.nvim_create_autocmd('FileType', {
pattern = 'tex',
callback = function()
vim.keymap.set('n', '<leader>p', ':lua require("knap").toggle_autopreviewing()<CR>', { noremap = true })
end,
})
-- iamcco/markdown-preview.nvim
vim.api.nvim_create_autocmd('FileType', {
pattern = 'markdown',
callback = function()
vim.keymap.set('n', '<leader>p', ':MarkdownPreviewToggle<CR>', { noremap = true })
end,
})
-- SmiteshP/nvim-navbuddy -- SmiteshP/nvim-navbuddy
vim.keymap.set('n', '<F3>', ':Navbuddy<CR>', {}) vim.keymap.set('n', '<F3>', ':Navbuddy<CR>', {})
@ -40,8 +58,8 @@ vim.keymap.set('n', '<F3>', ':Navbuddy<CR>', {})
vim.keymap.set('n', '<F2>', ':NvimTreeToggle toggle<CR>', {}) vim.keymap.set('n', '<F2>', ':NvimTreeToggle toggle<CR>', {})
-- numtostr/fterm.nvim -- numtostr/fterm.nvim
vim.keymap.set({ 'n', 't' }, '<leader>t', require("FTerm").toggle, { noremap = true }) vim.keymap.set('n', '<leader>t', ':lua require("FTerm").toggle()<CR>', { noremap = true })
vim.keymap.set('t', '<leader>t', '<C-\\><C-n>:lua require("FTerm").toggle()<CR>', { noremap = true })
local lazygit = require("FTerm"):new({ local lazygit = require("FTerm"):new({
cmd = 'lazygit', cmd = 'lazygit',
}) })
@ -55,16 +73,16 @@ vim.keymap.set( 'n', '<leader>gdc', ":DiffviewClose<CR>")
vim.keymap.set( 'n', '<leader>x', ":TroubleToggle<CR>") vim.keymap.set( 'n', '<leader>x', ":TroubleToggle<CR>")
-- hrsh7th/nvim-cmp -- hrsh7th/nvim-cmp
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, { noremap = true }) vim.keymap.set('n', 'gD', ':lua vim.lsp.buf.declaration()<CR>', { noremap = true })
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { noremap = true }) vim.keymap.set('n', 'gd', ':lua vim.lsp.buf.definition()<CR>', { noremap = true })
vim.keymap.set('n', 'gy', vim.lsp.buf.type_definition, { noremap = true }) vim.keymap.set('n', 'gy', ':lua vim.lsp.buf.type_definition()<CR>', { noremap = true })
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, { noremap = true }) vim.keymap.set('n', 'gi', ':lua vim.lsp.buf.implementation()<CR>', { noremap = true })
vim.keymap.set('n', 'gr', vim.lsp.buf.references, { noremap = true }) vim.keymap.set('n', 'gr', ':lua vim.lsp.buf.references()<CR>', { noremap = true })
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { noremap = true }) vim.keymap.set('n', 'K', ':lua vim.lsp.buf.hover()<CR>', { noremap = true })
vim.keymap.set('n', '<F8>', vim.lsp.buf.format, { noremap = true }) vim.keymap.set('n', '<F8>', ':lua vim.lsp.buf.format()<CR>', { noremap = true })
-- filipdutescu/renamer.nvim -- filipdutescu/renamer.nvim
vim.keymap.set('n', '<F5>', require("renamer").rename, { noremap = true }) vim.keymap.set('n', '<F5>', ':lua require("renamer").rename()<CR>', { noremap = true })
-- nvim-telescope/telescope.nvim -- nvim-telescope/telescope.nvim
vim.keymap.set('n', '<F4>', ':Telescope find_files<CR>', { noremap = true }) vim.keymap.set('n', '<F4>', ':Telescope find_files<CR>', { noremap = true })

View File

@ -73,10 +73,7 @@ return require("lazy").setup({
}, },
sections = { sections = {
lualine_b = { lualine_b = {
{ { require('gitblame').get_current_blame_text, cond = require('gitblame').is_blame_text_available }
require('gitblame').get_current_blame_text,
cond = require('gitblame').is_blame_text_available
}
}, },
lualine_c = {}, lualine_c = {},
lualine_x = { lualine_x = {
@ -325,6 +322,9 @@ return require("lazy").setup({
end end
}, },
-- fix for cursorhold function
-- 'antoinemadec/fixcursorhold.nvim',
-- showing color of hex values, etc -- showing color of hex values, etc
{ {
'nvchad/nvim-colorizer.lua', 'nvchad/nvim-colorizer.lua',
@ -426,12 +426,12 @@ return require("lazy").setup({
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' }, vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{ {
pattern = { '*' }, pattern = { '*' },
callback = function() require("ufo").closeAllFolds() end command = 'lua require("ufo").closeAllFolds()'
}) })
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' }, vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{ {
pattern = { '*' }, pattern = { '*' },
callback = function() require("ufo").openAllFolds() end command = 'lua require("ufo").openAllFolds()'
}) })
end end
}, },
@ -657,14 +657,6 @@ return require("lazy").setup({
end end
}, },
-- markdown improvements
{
'preservim/vim-markdown',
ft = { 'markdown' },
dependencies = { 'godlygeek/tabular' },
config = function()
end
},
}, },
-- lazy.nvim configuration -- lazy.nvim configuration
{ {

View File

@ -1,7 +1,9 @@
-- set signs for various uses -- display certain invisible chars
Space_sign = "·" vim.opt.list = true
Return_sign = "" vim.opt.listchars:append "space:·"
vim.opt.listchars:append "eol:"
-- set signs for various uses
Error_sign = "" Error_sign = ""
Warn_sign = "" Warn_sign = ""
Info_sign = "" Info_sign = ""
@ -109,12 +111,3 @@ vim.fn.sign_define(
"DiagnosticSignHint", "DiagnosticSignHint",
{ texthl = "DiagnosticSignHint", text = Hint_sign, numhl = "DiagnosticSignHint" } { texthl = "DiagnosticSignHint", text = Hint_sign, numhl = "DiagnosticSignHint" }
) )
-- enable colorcolumn when textwidth is set
vim.o.colorcolumn = "-0"
vim.o.cursorline = true
-- display certain invisible chars
vim.o.list = true
vim.opt.listchars:append("space:" .. Space_sign)
vim.opt.listchars:append("eol:" .. Return_sign)

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
.dotfiles .dotfiles
.config/nvim/plugin/packer_compiled.lua .config/nvim/plugin/packer_compiled.lua
.config/nvim/lazy-lock.json