nvim: added comment.nvim

master
tiyn 1 year ago
parent df7a259d62
commit 6a685bae7a

@ -16,56 +16,48 @@ return require("lazy").setup({
-- display git status per line -- display git status per line
{ {
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
config = function() config = {}
require('gitsigns').setup()
end
}, },
-- show indentation lines -- show indentation lines
{ {
'lukas-reineke/indent-blankline.nvim', 'lukas-reineke/indent-blankline.nvim',
config = function() opts = {
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', },
config = function() opts = {
require('lualine').setup({ options = {
options = { symbols = {
symbols = { error = Error_sign,
error = Error_sign, warn = Warn_sign,
warn = Warn_sign, hint = Hint_sign,
hint = Hint_sign, info = Info_sign
info = Info_sign
},
theme = 'tccs',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' }
}, },
}) theme = 'tccs',
end component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' }
}
}
}, },
-- show function signature while typing -- show function signature while typing
{ {
'ray-x/lsp_signature.nvim', 'ray-x/lsp_signature.nvim',
config = function() opts = {
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
@ -93,9 +85,7 @@ return require("lazy").setup({
-- automatic closing of brackets -- automatic closing of brackets
{ {
'windwp/nvim-autopairs', 'windwp/nvim-autopairs',
config = function() config = {}
require("nvim-autopairs").setup()
end
}, },
-- lang server installations -- lang server installations
@ -118,23 +108,19 @@ return require("lazy").setup({
}, },
{ {
'jay-babu/mason-null-ls.nvim', 'jay-babu/mason-null-ls.nvim',
config = function() opts = {
-- jay-babu/mason-null-ls.nvim automatic_installation = true,
require("mason-null-ls").setup({ ensure_installed = { "black", "mdformat" }
automatic_installation = true,
ensure_installed = { "black", "mdformat" } }
})
end
}, },
'LostNeophyte/null-ls-embedded' 'LostNeophyte/null-ls-embedded'
}, },
config = function() opts = {
require("mason").setup({ ui = {
ui = { icons = Install_signs
icons = Install_signs }
} }
})
end
}, },
-- lang server management -- lang server management
@ -180,6 +166,18 @@ 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({
@ -187,18 +185,8 @@ 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
}) })
@ -219,7 +207,7 @@ return require("lazy").setup({
{ {
'l3mon4d3/luasnip', 'l3mon4d3/luasnip',
config = function() config = function()
require("luasnip.loaders.from_snipmate").lazy_load() require("luasnip.loaders.from_snipmate")
end, end,
dependencies = { 'saadparwaiz1/cmp_luasnip' } dependencies = { 'saadparwaiz1/cmp_luasnip' }
}, },
@ -294,12 +282,10 @@ return require("lazy").setup({
-- showing color of hex values, etc -- showing color of hex values, etc
{ {
'norcalli/nvim-colorizer.lua', 'norcalli/nvim-colorizer.lua',
config = function() opts = {
require('colorizer').setup({ '*',
'*', '!markdown'
'!markdown' }
})
end
}, },
-- fileexplorer on the side -- fileexplorer on the side
@ -308,25 +294,23 @@ return require("lazy").setup({
dependencies = { dependencies = {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
}, },
config = function() opts = {
require("nvim-tree").setup({ sort_by = "case_sensitive",
sort_by = "case_sensitive", view = {
view = { width = 30,
width = 30, },
}, filters = {
filters = { dotfiles = true,
dotfiles = true, },
}, renderer = {
renderer = { group_empty = true,
group_empty = true, icons = {
icons = { glyphs = {
glyphs = { git = Git_signs
git = Git_signs
},
}, },
} },
}) }
end }
}, },
-- better language highlighting by improved parsing -- better language highlighting by improved parsing
@ -336,22 +320,20 @@ return require("lazy").setup({
-- automatically close html-tags -- automatically close html-tags
'windwp/nvim-ts-autotag', 'windwp/nvim-ts-autotag',
}, },
config = function() opts = {
require("nvim-treesitter.configs").setup({ ensure_installed = {
ensure_installed = { "bash",
"bash", "c",
"c", "cpp",
"cpp", "css",
"css", "html",
"html", "java",
"java", "markdown",
"markdown", "latex",
"latex", "python",
"python", },
}, autotag = { enable = true }
autotag = { enable = true } }
})
end
}, },
-- folding improvements -- folding improvements
@ -378,46 +360,38 @@ 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 = function() config = {}
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",
event = "VeryLazy", opts = {
config = function() filetype_exclude = {}
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' },
config = function() opts = {
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" }, HACK = { icon = Hack_sign, color = "warning" },
HACK = { icon = Hack_sign, color = "warning" }, HINT = { icon = Hint_sign, color = "hint" },
HINT = { icon = Hint_sign, color = "hint" }, TODO = { icon = Todo_sign, color = "info" },
TODO = { icon = Todo_sign, color = "info" }, INFO = { icon = Info_sign, color = "hint", alt = { "NOTE" } },
INFO = { icon = Info_sign, color = "hint", alt = { "NOTE" } }, PERF = { icon = Perfect_sign, color = "default" },
PERF = { icon = Perfect_sign, color = "default" }, 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
@ -432,16 +406,18 @@ 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",
event = "VeryLazy", config = {}
config = function() },
require("nvim-surround").setup()
end -- commenting improvements
{
'numToStr/Comment.nvim',
config = {}
}, },
-- colorscheme -- colorscheme
@ -452,6 +428,8 @@ return require("lazy").setup({
end end
}, },
}, },
-- lazy.nvim configuration
{ {
ui = { ui = {
icons = Lazy_signs icons = Lazy_signs

Loading…
Cancel
Save