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,23 +16,28 @@ 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()
require("indent_blankline").setup({
show_current_context = true, show_current_context = true,
show_current_context_start = 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()
require('lualine').setup({
options = { options = {
symbols = { symbols = {
error = Error_sign, error = Error_sign,
@ -43,21 +48,24 @@ return require("lazy").setup({
theme = 'tccs', theme = 'tccs',
component_separators = { left = '', right = '' }, component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' } section_separators = { left = '', right = '' }
} },
} })
end
}, },
-- show function signature while typing -- show function signature while typing
{ {
'ray-x/lsp_signature.nvim', 'ray-x/lsp_signature.nvim',
opts = { config = function()
require "lsp_signature".setup({
bind = true, bind = true,
handler_opts = { handler_opts = {
border = "none" border = "none"
}, },
hint_prefix = Hint_sign, hint_prefix = Hint_sign,
hint_scheme = "DiagnosticSignHint" 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()
-- jay-babu/mason-null-ls.nvim
require("mason-null-ls").setup({
automatic_installation = true, automatic_installation = true,
ensure_installed = { "black", "mdformat" } ensure_installed = { "black", "mdformat" }
})
} end
}, },
'LostNeophyte/null-ls-embedded' 'LostNeophyte/null-ls-embedded'
}, },
opts = { config = function()
require("mason").setup({
ui = { ui = {
icons = Install_signs 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,7 +308,8 @@ return require("lazy").setup({
dependencies = { dependencies = {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
}, },
opts = { config = function()
require("nvim-tree").setup({
sort_by = "case_sensitive", sort_by = "case_sensitive",
view = { view = {
width = 30, width = 30,
@ -310,7 +325,8 @@ return require("lazy").setup({
}, },
}, },
} }
} })
end
}, },
-- better language highlighting by improved parsing -- better language highlighting by improved parsing
@ -320,7 +336,8 @@ return require("lazy").setup({
-- automatically close html-tags -- automatically close html-tags
'windwp/nvim-ts-autotag', 'windwp/nvim-ts-autotag',
}, },
opts = { config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = { ensure_installed = {
"bash", "bash",
"c", "c",
@ -333,7 +350,8 @@ return require("lazy").setup({
"python", "python",
}, },
autotag = { enable = true } autotag = { enable = true }
} })
end
}, },
-- folding improvements -- folding improvements
@ -360,22 +378,28 @@ 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",
config = function()
require("tidy").setup({
filetype_exclude = {} 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()
require 'todo-comments'.setup {
keywords = { keywords = {
ERRO = { icon = Error_sign, color = "error" }, ERRO = { icon = Error_sign, color = "error" },
WARN = { icon = Warn_sign, color = "warning" }, WARN = { icon = Warn_sign, color = "warning" },
@ -387,11 +411,13 @@ return require("lazy").setup({
TEST = { icon = Test_sign, color = "test" } 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