1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-04-20 00:37:44 +02:00

Compare commits

..

No commits in common. "6a685bae7a74a42bc3a0be1be8e6a95654a863b0" and "2a2dc266b0552b383375c0e2869c9dc8fd7c125d" have entirely different histories.

4 changed files with 137 additions and 115 deletions

View File

@ -65,6 +65,11 @@ vim.o.undodir = vim.env.XDG_CACHE_HOME .. "/vim/undo"
vim.g.python_host_prog = '/usr/bin/python2' vim.g.python_host_prog = '/usr/bin/python2'
vim.g.python3_host_prog = '/usr/bin/python3' vim.g.python3_host_prog = '/usr/bin/python3'
-- display certain invisible chars
vim.opt.list = true
vim.opt.listchars:append "space:·"
vim.opt.listchars:append "eol:"
-- folding -- folding
vim.o.foldcolumn = '0' vim.o.foldcolumn = '0'
vim.o.foldlevel = 99 vim.o.foldlevel = 99

View File

@ -16,48 +16,56 @@ return require("lazy").setup({
-- display git status per line -- display git status per line
{ {
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
config = {} config = function()
require('gitsigns').setup()
end
}, },
-- show indentation lines -- show indentation lines
{ {
'lukas-reineke/indent-blankline.nvim', 'lukas-reineke/indent-blankline.nvim',
opts = { config = function()
show_current_context = true, require("indent_blankline").setup({
show_current_context_start = true show_current_context = true,
} show_current_context_start = true
})
end,
}, },
-- statusline -- statusline
{ {
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons', }, dependencies = { 'nvim-tree/nvim-web-devicons', },
opts = { config = function()
options = { require('lualine').setup({
symbols = { options = {
error = Error_sign, symbols = {
warn = Warn_sign, error = Error_sign,
hint = Hint_sign, warn = Warn_sign,
info = Info_sign hint = Hint_sign,
info = Info_sign
},
theme = 'tccs',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' }
}, },
theme = 'tccs', })
component_separators = { left = '', right = '' }, end
section_separators = { left = '', right = '' }
}
}
}, },
-- show function signature while typing -- show function signature while typing
{ {
'ray-x/lsp_signature.nvim', 'ray-x/lsp_signature.nvim',
opts = { config = function()
bind = true, require "lsp_signature".setup({
handler_opts = { bind = true,
border = "none" handler_opts = {
}, border = "none"
hint_prefix = Hint_sign, },
hint_scheme = "DiagnosticSignHint" hint_prefix = Hint_sign,
} hint_scheme = "DiagnosticSignHint"
})
end
}, },
-- preview for markdown filetypes -- preview for markdown filetypes
@ -85,7 +93,9 @@ return require("lazy").setup({
-- automatic closing of brackets -- automatic closing of brackets
{ {
'windwp/nvim-autopairs', 'windwp/nvim-autopairs',
config = {} config = function()
require("nvim-autopairs").setup()
end
}, },
-- lang server installations -- lang server installations
@ -108,19 +118,23 @@ return require("lazy").setup({
}, },
{ {
'jay-babu/mason-null-ls.nvim', 'jay-babu/mason-null-ls.nvim',
opts = { config = function()
automatic_installation = true, -- jay-babu/mason-null-ls.nvim
ensure_installed = { "black", "mdformat" } require("mason-null-ls").setup({
automatic_installation = true,
} ensure_installed = { "black", "mdformat" }
})
end
}, },
'LostNeophyte/null-ls-embedded' 'LostNeophyte/null-ls-embedded'
}, },
opts = { config = function()
ui = { require("mason").setup({
icons = Install_signs ui = {
} icons = Install_signs
} }
})
end
}, },
-- lang server management -- lang server management
@ -166,18 +180,6 @@ return require("lazy").setup({
"texlab" "texlab"
} }
}) })
local servers = {
lua_ls = {
Lua = {
diagnostics = {
globals = { 'vim' }
},
telemetry = { enable = false },
},
}
}
local default = { __index = function() return {} end }
setmetatable(servers, default)
require("mason-lspconfig").setup_handlers({ require("mason-lspconfig").setup_handlers({
function(server_name) function(server_name)
require('lspconfig')[server_name].setup({ require('lspconfig')[server_name].setup({
@ -185,8 +187,18 @@ return require("lazy").setup({
capabilities = Capabilities, capabilities = Capabilities,
flags = { flags = {
debounce_text_changes = 150 debounce_text_changes = 150
}, }
settings = servers[server_name] })
end,
["lua_ls"] = function()
require 'lspconfig'.lua_ls.setup({
settings = {
Lua = {
diagnostics = {
globals = { 'vim' }
}
}
}
}) })
end end
}) })
@ -207,7 +219,7 @@ return require("lazy").setup({
{ {
'l3mon4d3/luasnip', 'l3mon4d3/luasnip',
config = function() config = function()
require("luasnip.loaders.from_snipmate") require("luasnip.loaders.from_snipmate").lazy_load()
end, end,
dependencies = { 'saadparwaiz1/cmp_luasnip' } dependencies = { 'saadparwaiz1/cmp_luasnip' }
}, },
@ -282,10 +294,12 @@ return require("lazy").setup({
-- showing color of hex values, etc -- showing color of hex values, etc
{ {
'norcalli/nvim-colorizer.lua', 'norcalli/nvim-colorizer.lua',
opts = { config = function()
'*', require('colorizer').setup({
'!markdown' '*',
} '!markdown'
})
end
}, },
-- fileexplorer on the side -- fileexplorer on the side
@ -294,23 +308,25 @@ return require("lazy").setup({
dependencies = { dependencies = {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
}, },
opts = { config = function()
sort_by = "case_sensitive", require("nvim-tree").setup({
view = { sort_by = "case_sensitive",
width = 30, view = {
}, width = 30,
filters = {
dotfiles = true,
},
renderer = {
group_empty = true,
icons = {
glyphs = {
git = Git_signs
},
}, },
} filters = {
} dotfiles = true,
},
renderer = {
group_empty = true,
icons = {
glyphs = {
git = Git_signs
},
},
}
})
end
}, },
-- better language highlighting by improved parsing -- better language highlighting by improved parsing
@ -320,20 +336,22 @@ return require("lazy").setup({
-- automatically close html-tags -- automatically close html-tags
'windwp/nvim-ts-autotag', 'windwp/nvim-ts-autotag',
}, },
opts = { config = function()
ensure_installed = { require("nvim-treesitter.configs").setup({
"bash", ensure_installed = {
"c", "bash",
"cpp", "c",
"css", "cpp",
"html", "css",
"java", "html",
"markdown", "java",
"latex", "markdown",
"python", "latex",
}, "python",
autotag = { enable = true } },
} autotag = { enable = true }
})
end
}, },
-- folding improvements -- folding improvements
@ -360,38 +378,46 @@ return require("lazy").setup({
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
version = '0.1.2', version = '0.1.2',
dependencies = { 'nvim-lua/plenary.nvim' }, dependencies = { 'nvim-lua/plenary.nvim' },
config = {} config = function()
require("telescope").setup()
end
}, },
-- clean up white spaces and empty lines before writing -- clean up white spaces and empty lines before writing
{ {
"mcauley-penney/tidy.nvim", "mcauley-penney/tidy.nvim",
opts = { event = "VeryLazy",
filetype_exclude = {} config = function()
} require("tidy").setup({
filetype_exclude = {}
})
end
}, },
-- todo symbols and highlighting -- todo symbols and highlighting
{ {
'folke/todo-comments.nvim', 'folke/todo-comments.nvim',
dependencies = { 'nvim-lua/plenary.nvim' }, dependencies = { 'nvim-lua/plenary.nvim' },
opts = { config = function()
keywords = { require 'todo-comments'.setup {
ERRO = { icon = Error_sign, color = "error" }, keywords = {
WARN = { icon = Warn_sign, color = "warning" }, ERRO = { icon = Error_sign, color = "error" },
HACK = { icon = Hack_sign, color = "warning" }, WARN = { icon = Warn_sign, color = "warning" },
HINT = { icon = Hint_sign, color = "hint" }, HACK = { icon = Hack_sign, color = "warning" },
TODO = { icon = Todo_sign, color = "info" }, HINT = { icon = Hint_sign, color = "hint" },
INFO = { icon = Info_sign, color = "hint", alt = { "NOTE" } }, TODO = { icon = Todo_sign, color = "info" },
PERF = { icon = Perfect_sign, color = "default" }, INFO = { icon = Info_sign, color = "hint", alt = { "NOTE" } },
TEST = { icon = Test_sign, color = "test" } PERF = { icon = Perfect_sign, color = "default" },
TEST = { icon = Test_sign, color = "test" }
}
} }
} end
}, },
-- git wrapper -- git wrapper
{ {
'tpope/vim-fugitive', 'tpope/vim-fugitive',
event = "VeryLazy"
}, },
-- markdown language support -- markdown language support
@ -406,18 +432,16 @@ return require("lazy").setup({
-- bulk renamer -- bulk renamer
{ {
'qpkorr/vim-renamer', 'qpkorr/vim-renamer',
event = "VeryLazy"
}, },
-- additional quote/parantheses funtions -- additional quote/parantheses funtions
{ {
"kylechui/nvim-surround", "kylechui/nvim-surround",
config = {} event = "VeryLazy",
}, config = function()
require("nvim-surround").setup()
-- commenting improvements end
{
'numToStr/Comment.nvim',
config = {}
}, },
-- colorscheme -- colorscheme
@ -428,8 +452,6 @@ return require("lazy").setup({
end end
}, },
}, },
-- lazy.nvim configuration
{ {
ui = { ui = {
icons = Lazy_signs icons = Lazy_signs

View File

@ -1,8 +1,3 @@
-- display certain invisible chars
vim.opt.list = true
vim.opt.listchars:append "space:·"
vim.opt.listchars:append "eol:"
-- set signs for various uses -- set signs for various uses
Error_sign = "" Error_sign = ""
Warn_sign = "" Warn_sign = ""

View File

@ -39,7 +39,7 @@ case "$file" in
*\.nim) nim c -r -d:noColors "$file" ;; *\.nim) nim c -r -d:noColors "$file" ;;
*\.py) python "$file" ;; *\.py) python "$file" ;;
*\.go) go run "$file" ;; *\.go) go run "$file" ;;
*\.lua) lua "$file" ;;
*\.sent) setsid sent "$file" 2>/dev/null & ;; *\.sent) setsid sent "$file" 2>/dev/null & ;;
*) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;; *) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;;
esac esac