From c3bfbd3cafdc42ea9f3aff7976bd326f240d0cf3 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 8 Aug 2023 02:56:29 +0200 Subject: [PATCH] nvim: moved configs to loadplugins --- .config/nvim/init.lua | 3 + .config/nvim/lua/autocmd.lua | 3 +- .config/nvim/lua/loadplugins.lua | 401 ++++++++++++++++++++++- .config/nvim/lua/style.lua | 25 ++ .config/nvim/plugin/colorscheme.lua | 3 - .config/nvim/plugin/gitsigns.lua | 2 - .config/nvim/plugin/indent-blankline.lua | 6 - .config/nvim/plugin/lualine.lua | 47 --- .config/nvim/plugin/neotex.lua | 2 - .config/nvim/plugin/nvim-autopairs.lua | 1 - .config/nvim/plugin/nvim-cmp.lua | 205 ------------ .config/nvim/plugin/nvim-colorizer.lua | 5 - .config/nvim/plugin/nvim-tree.lua | 14 - .config/nvim/plugin/nvim-treesitter.lua | 19 -- .config/nvim/plugin/rainbow.lua | 2 - .config/nvim/plugin/telescope.lua | 17 - .config/nvim/plugin/tidy.lua | 5 - .config/nvim/plugin/todo-comments.lua | 62 ---- .config/nvim/plugin/vim-go.lua | 2 - .config/nvim/plugin/vim-markdown.lua | 3 - 20 files changed, 419 insertions(+), 408 deletions(-) create mode 100644 .config/nvim/lua/style.lua delete mode 100644 .config/nvim/plugin/colorscheme.lua delete mode 100644 .config/nvim/plugin/gitsigns.lua delete mode 100644 .config/nvim/plugin/indent-blankline.lua delete mode 100644 .config/nvim/plugin/lualine.lua delete mode 100644 .config/nvim/plugin/neotex.lua delete mode 100644 .config/nvim/plugin/nvim-autopairs.lua delete mode 100644 .config/nvim/plugin/nvim-cmp.lua delete mode 100644 .config/nvim/plugin/nvim-colorizer.lua delete mode 100644 .config/nvim/plugin/nvim-tree.lua delete mode 100644 .config/nvim/plugin/nvim-treesitter.lua delete mode 100644 .config/nvim/plugin/rainbow.lua delete mode 100644 .config/nvim/plugin/telescope.lua delete mode 100644 .config/nvim/plugin/tidy.lua delete mode 100644 .config/nvim/plugin/todo-comments.lua delete mode 100644 .config/nvim/plugin/vim-go.lua delete mode 100644 .config/nvim/plugin/vim-markdown.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index ece59b0..7e4d5e0 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -75,7 +75,10 @@ vim.o.foldcolumn = '0' vim.o.foldlevel = 99 vim.o.foldlevelstart = 99 vim.o.foldenable = true +vim.o.conceallevel = 2 +-- load general mapped keys +require('style') -- set filetypes correctly by extension require('autocmd') diff --git a/.config/nvim/lua/autocmd.lua b/.config/nvim/lua/autocmd.lua index f1174ea..0cb7041 100644 --- a/.config/nvim/lua/autocmd.lua +++ b/.config/nvim/lua/autocmd.lua @@ -16,6 +16,7 @@ vim.filetype.add({ } }) + -- settings for filetype: c vim.api.nvim_create_autocmd({ 'VimLeave' }, @@ -83,7 +84,7 @@ vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' }, vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' }, { pattern = { 'markdown' }, - command = 'set conceallevel=2' + command = 'set nofoldenable' }) -- settings for filetype: nim diff --git a/.config/nvim/lua/loadplugins.lua b/.config/nvim/lua/loadplugins.lua index e0b9264..f611340 100644 --- a/.config/nvim/lua/loadplugins.lua +++ b/.config/nvim/lua/loadplugins.lua @@ -14,13 +14,25 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) - return require("lazy").setup({ -- indicate git diff status of line - 'lewis6991/gitsigns.nvim', + { + 'lewis6991/gitsigns.nvim', + config = function() + require('gitsigns').setup() + end, + }, -- show indentation lines (in empty lines too) - 'lukas-reineke/indent-blankline.nvim', + { + 'lukas-reineke/indent-blankline.nvim', + config = function() + require("indent_blankline").setup({ + show_current_context = true, + show_current_context_start = true, + }) + end, + }, -- improved java syntax highlighting { @@ -31,7 +43,55 @@ return require("lazy").setup({ -- custom statusline { 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons', } + dependencies = { 'nvim-tree/nvim-web-devicons', }, + config = function() + require('lualine').setup({ + options = { + icons_enabled = true, + symbols = { + error = Error_sign, + warn = Warn_sign, + hint = Hint_sign, + info = Info_sign, + }, + theme = 'tccs', + component_separators = { left = '', right = '' }, + section_separators = { left = '', right = '' }, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch', 'diff', 'diagnostics' }, + lualine_c = { 'filename' }, + lualine_x = { 'encoding', 'fileformat', 'filetype' }, + lualine_y = { 'progress' }, + lualine_z = { 'location' } + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { 'filename' }, + lualine_x = { 'location' }, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} + }) + end, }, -- show signature while typing @@ -48,6 +108,9 @@ return require("lazy").setup({ { 'donRaphaco/neotex', ft = { 'tex' }, + config = function() + vim.g.neotex_enabled = 2 + end, }, -- nim language support @@ -57,7 +120,12 @@ return require("lazy").setup({ }, -- automatic closing of brackets - 'windwp/nvim-autopairs', + { + 'windwp/nvim-autopairs', + config = function() + require("nvim-autopairs").setup() + end + }, -- autocompletion and its sources { @@ -82,13 +150,205 @@ return require("lazy").setup({ -- dependencies 'nvim-lua/plenary.nvim', }, + config = function() + -- hrsh7th/nvim-cmp + local cmp = require("cmp") + local luasnip = require("luasnip") + require("luasnip.loaders.from_snipmate").lazy_load() + + cmp.setup { + sorting = { + comparators = { + cmp.config.compare.offset, + cmp.config.compare.exact, + cmp.config.compare.score, + require "cmp-under-comparator".under, + cmp.config.compare.kind, + cmp.config.compare.sort_text, + cmp.config.compare.length, + cmp.config.compare.order, + }, + }, + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = { + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + [''] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { "i", "s" }), + [''] = cmp.mapping.close(), + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + } + }, + sources = { + { name = 'nvim_lsp' }, + { name = 'path' }, + { name = 'buffer' }, + { name = 'luasnip' }, + }, + formatting = { + format = require("lspkind").cmp_format({ + mode = "symbol_text", + preset = "codicons", + maxwidth = 50, + menu = { + nvim_lsp = "[LSP]", + path = "[PATH]", + buffer = "[BUF]", + luasnip = "[SNIP]", + }, + symbol_map = { + Text = "", + Method = "", + Function = "φ", + Constructor = "", + Field = "■", + Variable = "β", + Class = "", + Interface = "", + Module = "", + Property = "", + Unit = "", + Value = "", + Enum = "", + Keyword = "", + Snippet = "", + Color = "", + File = "", + Reference = "", + Folder = "", + EnumMember = "", + Constant = "π", + Struct = "", + Event = "", + Operator = "", + TypeParameter = "" + }, + }), + }, + } + + -- jose-elias-alvarez/null-ls.nvim + require("null-ls").setup({ + sources = { + require("null-ls-embedded").nls_source.with({ + filetypes = { "markdown" }, + }), + require("null-ls").builtins.formatting.black, + require("null-ls").builtins.formatting.mdformat, + }, + }) + + -- williamboman/mason.nvim + require("mason").setup() + + -- williamboman/mason-lspconfig.nvim + require("mason-lspconfig").setup({ + automatic_setup = true, + ensure_installed = { "pyright", "bashls", "texlab", "nimls", "marksman", "jdtls", "lua_ls" } + }) + + -- jay-babu/mason-null-ls.nvim + require("mason-null-ls").setup({ + automatic_installation = true, + ensure_installed = {} + }) + + -- ray-x/lsp_signature.nvim + require "lsp_signature".setup({ + bind = true, + handler_opts = { + border = "none" + }, + hint_prefix = Hint_sign, + hint_scheme = "DiagnosticSignHint", + }) + + -- smiteshp/nvim-navbuddy + local navbuddy = require("nvim-navbuddy") + + -- hrsh7th/cmp-nvim-lsp + local cmp_nvim_lsp = require("cmp_nvim_lsp") + + -- neovim/nvim-lspconfig + local nvim_lsp = require('lspconfig') + + local servers = { "pyright", "bashls", "texlab", "nimls", "marksman" } + + local attach_func = function(client, bufnr) + navbuddy.attach(client, bufnr) + end + + local capabilities = cmp_nvim_lsp.default_capabilities() + capabilities.textDocument.foldingRange = { + dynamicRegistration = false, + lineFoldingOnly = true + } + + for _, lsp in ipairs(servers) do + nvim_lsp[lsp].setup { + on_attach = attach_func, + capabilities = capabilities, + flags = { + debounce_text_changes = 150 + } + } + end + + require 'lspconfig'.jdtls.setup { + on_attach = attach_func, + capabilities = capabilities, + flags = { + debounce_text_changes = 150 + }, + cmd = { 'jdtls' } + } + + require 'lspconfig'.lua_ls.setup { + on_attach = attach_func, + capabilities = capabilities, + settings = { + Lua = { + diagnostics = { globals = { 'vim' } }, + telemetry = { enable = false }, + }, + }, + } + end, }, -- fix for cursorhold function 'antoinemadec/fixcursorhold.nvim', -- showing color of hex values, etc - 'norcalli/nvim-colorizer.lua', + { + 'norcalli/nvim-colorizer.lua', + config = function() + require('colorizer').setup({ + '*', + '!markdown', + }) + end, + }, -- show tags { @@ -106,10 +366,42 @@ return require("lazy").setup({ dependencies = { "nvim-tree/nvim-web-devicons", }, + config = function() + require("nvim-tree").setup({ + sort_by = "case_sensitive", + view = { + width = 30, + }, + renderer = { + group_empty = true, + }, + filters = { + dotfiles = true, + }, + }) + end, }, -- better language highlighting by improved parsing - 'nvim-treesitter/nvim-treesitter', + { + 'nvim-treesitter/nvim-treesitter', + config = function() + require("nvim-treesitter.configs").setup({ + ensure_installed = { + "bash", + "c", + "cpp", + "css", + "html", + "java", + "markdown", + "latex", + "python", + }, + autotag = { enable = true }, + }) + end, + }, -- automatically close html-tags { @@ -121,25 +413,97 @@ return require("lazy").setup({ { 'kevinhwang91/nvim-ufo', dependencies = { 'kevinhwang91/promise-async' }, + config = function() + require('ufo').setup() + vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' }, + { + pattern = { '*' }, + command = 'lua require("ufo").closeAllFolds()' + }) + vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' }, + { + pattern = { '*' }, + command = 'lua require("ufo").openAllFolds()' + }) + end, }, - -- colorful brackets - 'luochen1990/rainbow', - -- fuzzy finder { 'nvim-telescope/telescope.nvim', version = '0.1.2', dependencies = { 'nvim-lua/plenary.nvim' }, + config = function() + require("telescope").setup() + end, }, -- clean up white spaces and empty lines before writing - "mcauley-penney/tidy.nvim", + { + "mcauley-penney/tidy.nvim", + config = function() + require("tidy").setup({ + filetype_exclude = {}, + }) + end + }, -- todo symbols and highlighting { 'folke/todo-comments.nvim', dependencies = { 'nvim-lua/plenary.nvim' }, + config = function() + require 'todo-comments'.setup { + signs = true, + sign_priority = 8, + keywords = { + ERRO = { icon = Error_sign, color = "error" }, + WARN = { icon = Warn_sign, color = "warning" }, + HACK = { icon = Hack_sign, color = "warning" }, + HINT = { icon = Hint_sign, color = "hint" }, + TODO = { icon = Todo_sign, color = "hint" }, + INFO = { icon = Info_sign, color = "info", alt = { "NOTE" } }, + PERF = { icon = Perfect_sign, color = "perfect" }, + TEST = { icon = Test_sign, color = "test" }, + }, + gui_style = { + fg = "NONE", + bg = "BOLD", + }, + merge_keywords = true, + highlight = { + multiline = true, + multiline_pattern = "^.", + multiline_context = 10, + before = "", + keyword = "wide", + after = "fg", + pattern = [[.*<(KEYWORDS)\s*:]], + comments_only = true, + max_line_len = 400, + exclude = {}, + }, + colors = { + error = "DiagnosticSignError", + warning = "DiagnosticSignWarn", + hint = "DiagnosticSignHint", + info = "DiagnosticSignInfo", + perfect = "Special", + test = "Identifier", + }, + search = { + command = "rg", + args = { + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + }, + pattern = [[\b(KEYWORDS):]], + }, + } + end, }, -- git wrapper @@ -149,6 +513,9 @@ return require("lazy").setup({ { 'fatih/vim-go', ft = { 'go' }, + config = function() + vim.g.go_def_mapping_enabled = 0 + end, }, -- markdown language support @@ -156,6 +523,11 @@ return require("lazy").setup({ 'preservim/vim-markdown', ft = { 'markdown' }, dependencies = { 'godlygeek/tabular' }, + config = function() + vim.g.vim_markdown_folding_style_pythonic = 1 + vim.g.vim_markdown_folding_disabled = 0 + vim.g.vim_markdown_conceal = 2 + end, }, -- bulk renamer @@ -165,5 +537,10 @@ return require("lazy").setup({ 'tpope/vim-surround', -- colorscheme - 'tiyn/vim-tccs', + { + 'tiyn/vim-tccs', + config = function() + vim.cmd('colorscheme tccs') + end, + }, }) diff --git a/.config/nvim/lua/style.lua b/.config/nvim/lua/style.lua new file mode 100644 index 0000000..9950843 --- /dev/null +++ b/.config/nvim/lua/style.lua @@ -0,0 +1,25 @@ +Error_sign = " " +Warn_sign = " " +Info_sign = " " +Hint_sign = " " +Hack_sign = " " +Todo_sign = " " +Perfect_sign = " " +Test_sign = " " + +vim.fn.sign_define( + "DiagnosticSignError", + { texthl = "DiagnosticSignError", text = Error_sign, numhl = "DiagnosticSignError" } +) +vim.fn.sign_define( + "DiagnosticSignWarn", + { texthl = "DiagnosticSignWarn", text = Warn_sign, numhl = "DiagnosticSignWarn" } +) +vim.fn.sign_define( + "DiagnosticSignInfo", + { texthl = "DiagnosticSignInfo", text = Info_sign, numhl = "DiagnosticSignInfo" } +) +vim.fn.sign_define( + "DiagnosticSignHint", + { texthl = "DiagnosticSignHint", text = Hint_sign, numhl = "DiagnosticSignHint" } +) diff --git a/.config/nvim/plugin/colorscheme.lua b/.config/nvim/plugin/colorscheme.lua deleted file mode 100644 index 4497d03..0000000 --- a/.config/nvim/plugin/colorscheme.lua +++ /dev/null @@ -1,3 +0,0 @@ --- tiyn/vim-tccs -vim.cmd('colorscheme tccs') -vim.api.nvim_set_hl(0, 'colorcolumn', { bg = '#772222' }) diff --git a/.config/nvim/plugin/gitsigns.lua b/.config/nvim/plugin/gitsigns.lua deleted file mode 100644 index fa23a5e..0000000 --- a/.config/nvim/plugin/gitsigns.lua +++ /dev/null @@ -1,2 +0,0 @@ --- lewis6991/gitsigns.nvim -require('gitsigns').setup() diff --git a/.config/nvim/plugin/indent-blankline.lua b/.config/nvim/plugin/indent-blankline.lua deleted file mode 100644 index 1b9afa3..0000000 --- a/.config/nvim/plugin/indent-blankline.lua +++ /dev/null @@ -1,6 +0,0 @@ --- lukas-reineke/indent-blankline.nvim - -require("indent_blankline").setup { - show_current_context = true, - show_current_context_start = true, -} diff --git a/.config/nvim/plugin/lualine.lua b/.config/nvim/plugin/lualine.lua deleted file mode 100644 index 6ccbf7e..0000000 --- a/.config/nvim/plugin/lualine.lua +++ /dev/null @@ -1,47 +0,0 @@ --- nvim-lualine/lualine.nvim -require('lualine').setup { - options = { - icons_enabled = true, - symbols = { - error = ' ', - warn = ' ', - hint = ' ', - info = ' ', - }, - theme = 'tccs', - component_separators = { left = '', right = '' }, - section_separators = { left = '', right = '' }, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - globalstatus = false, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - } - }, - sections = { - lualine_a = { 'mode' }, - lualine_b = { 'branch', 'diff', 'diagnostics' }, - lualine_c = { 'filename' }, - lualine_x = { 'encoding', 'fileformat', 'filetype' }, - lualine_y = { 'progress' }, - lualine_z = { 'location' } - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { 'filename' }, - lualine_x = { 'location' }, - lualine_y = {}, - lualine_z = {} - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {} -} diff --git a/.config/nvim/plugin/neotex.lua b/.config/nvim/plugin/neotex.lua deleted file mode 100644 index efafbb0..0000000 --- a/.config/nvim/plugin/neotex.lua +++ /dev/null @@ -1,2 +0,0 @@ --- donRaphaco/neotex -vim.g.neotex_enabled = 2 diff --git a/.config/nvim/plugin/nvim-autopairs.lua b/.config/nvim/plugin/nvim-autopairs.lua deleted file mode 100644 index ba62d44..0000000 --- a/.config/nvim/plugin/nvim-autopairs.lua +++ /dev/null @@ -1 +0,0 @@ -require("nvim-autopairs").setup {} diff --git a/.config/nvim/plugin/nvim-cmp.lua b/.config/nvim/plugin/nvim-cmp.lua deleted file mode 100644 index 488317d..0000000 --- a/.config/nvim/plugin/nvim-cmp.lua +++ /dev/null @@ -1,205 +0,0 @@ --- hrsh7th/nvim-cmp -local cmp = require("cmp") -local luasnip = require("luasnip") -require("luasnip.loaders.from_snipmate").lazy_load() - -cmp.setup { - sorting = { - comparators = { - cmp.config.compare.offset, - cmp.config.compare.exact, - cmp.config.compare.score, - require "cmp-under-comparator".under, - cmp.config.compare.kind, - cmp.config.compare.sort_text, - cmp.config.compare.length, - cmp.config.compare.order, - }, - }, - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - mapping = { - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { "i", "s" }), - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end, { "i", "s" }), - [''] = cmp.mapping.close(), - [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, - } - }, - sources = { - { name = 'nvim_lsp' }, - { name = 'path' }, - { name = 'buffer' }, - { name = 'luasnip' }, - }, - formatting = { - format = require("lspkind").cmp_format({ - mode = "symbol_text", - preset = "codicons", - maxwidth = 50, - menu = { - nvim_lsp = "[LSP]", - path = "[PATH]", - buffer = "[BUF]", - luasnip = "[SNIP]", - }, - symbol_map = { - Text = "", - Method = "", - Function = "φ", - Constructor = "", - Field = "■", - Variable = "β", - Class = "", - Interface = "", - Module = "", - Property = "", - Unit = "", - Value = "", - Enum = "", - Keyword = "", - Snippet = "", - Color = "", - File = "", - Reference = "", - Folder = "", - EnumMember = "", - Constant = "π", - Struct = "", - Event = "", - Operator = "", - TypeParameter = "" - }, - }), - }, -} - --- jose-elias-alvarez/null-ls.nvim -local null_ls = require("null-ls") - -null_ls.setup({ - sources = { - require("null-ls-embedded").nls_source.with({ - filetypes = { "markdown" }, - }), - null_ls.builtins.formatting.black, - null_ls.builtins.formatting.mdformat, - }, -}) - --- williamboman/mason.nvim -require("mason").setup() - --- williamboman/mason-lspconfig.nvim -require("mason-lspconfig").setup({ - automatic_setup = true, - ensure_installed = { "pyright", "bashls", "texlab", "nimls", "marksman", "jdtls", "lua_ls" } -}) - --- jay-babu/mason-null-ls.nvim -require("mason-null-ls").setup({ - automatic_installation = true, - ensure_installed = {} -}) - --- ray-x/lsp_signature.nvim -require "lsp_signature".setup({ - bind = true, - handler_opts = { - border = "none" - }, - hint_prefix = " ", - hint_scheme = "DiagnosticSignHint", -}) - --- smiteshp/nvim-navbuddy -local navbuddy = require("nvim-navbuddy") - --- hrsh7th/cmp-nvim-lsp -local cmp_nvim_lsp = require("cmp_nvim_lsp") - --- neovim/nvim-lspconfig -local nvim_lsp = require('lspconfig') - -local servers = { "pyright", "bashls", "texlab", "nimls", "marksman" } - -local attach_func = function(client, bufnr) - navbuddy.attach(client, bufnr) -end - -local capabilities = cmp_nvim_lsp.default_capabilities() -capabilities.textDocument.foldingRange = { - dynamicRegistration = false, - lineFoldingOnly = true -} - -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup { - on_attach = attach_func, - capabilities = capabilities, - flags = { - debounce_text_changes = 150 - } - } -end - -require 'lspconfig'.jdtls.setup { - on_attach = attach_func, - capabilities = capabilities, - flags = { - debounce_text_changes = 150 - }, - cmd = { 'jdtls' } -} - -require 'lspconfig'.lua_ls.setup { - on_attach = attach_func, - capabilities = capabilities, - settings = { - Lua = { - runtime = { version = 'LuaJIT' }, - diagnostics = { globals = { 'vim' } }, - workspace = { library = vim.api.nvim_get_runtime_file("", true) }, - telemetry = { enable = false }, - }, - }, -} - -require('ufo').setup() - -vim.fn.sign_define( - "DiagnosticSignError", - { texthl = "DiagnosticSignError", text = " ", numhl = "DiagnosticSignError" } -) -vim.fn.sign_define( - "DiagnosticSignWarn", - { texthl = "DiagnosticSignWarn", text = " ", numhl = "DiagnosticSignWarn" } -) -vim.fn.sign_define( - "DiagnosticSignInfo", - { texthl = "DiagnosticSignInfo", text = " ", numhl = "DiagnosticSignInfo" } -) -vim.fn.sign_define( - "DiagnosticSignHint", - { texthl = "DiagnosticSignHint", text = " ", numhl = "DiagnosticSignHint" } -) diff --git a/.config/nvim/plugin/nvim-colorizer.lua b/.config/nvim/plugin/nvim-colorizer.lua deleted file mode 100644 index 87abf97..0000000 --- a/.config/nvim/plugin/nvim-colorizer.lua +++ /dev/null @@ -1,5 +0,0 @@ --- norcalli/nvim-colorizer.lua -require 'colorizer'.setup { - '*', - '!markdown', -} diff --git a/.config/nvim/plugin/nvim-tree.lua b/.config/nvim/plugin/nvim-tree.lua deleted file mode 100644 index c792c35..0000000 --- a/.config/nvim/plugin/nvim-tree.lua +++ /dev/null @@ -1,14 +0,0 @@ --- nvim-tree/nvim-tree.lua - -require("nvim-tree").setup({ - sort_by = "case_sensitive", - view = { - width = 30, - }, - renderer = { - group_empty = true, - }, - filters = { - dotfiles = true, - }, -}) diff --git a/.config/nvim/plugin/nvim-treesitter.lua b/.config/nvim/plugin/nvim-treesitter.lua deleted file mode 100644 index e16154a..0000000 --- a/.config/nvim/plugin/nvim-treesitter.lua +++ /dev/null @@ -1,19 +0,0 @@ --- nvim-treesitter/nvim-treesitter - -local ts_config = require "nvim-treesitter.configs" - -ts_config.setup { - ensure_installed = { - "bash", - "c", - "cpp", - "css", - "html", - "java", - "markdown", - "latex", - "python", - }, - - autotag = { enable = true }, -} diff --git a/.config/nvim/plugin/rainbow.lua b/.config/nvim/plugin/rainbow.lua deleted file mode 100644 index 837e990..0000000 --- a/.config/nvim/plugin/rainbow.lua +++ /dev/null @@ -1,2 +0,0 @@ --- luochen1990/rainbow -vim.g.rainbow_active = 1 diff --git a/.config/nvim/plugin/telescope.lua b/.config/nvim/plugin/telescope.lua deleted file mode 100644 index b86e5c1..0000000 --- a/.config/nvim/plugin/telescope.lua +++ /dev/null @@ -1,17 +0,0 @@ -require("telescope").setup { - extensions = { - file_browser = { - theme = "ivy", - -- disables netrw and use telescope-file-browser in its place - hijack_netrw = true, - mappings = { - ["i"] = { - -- your custom insert mode mappings - }, - ["n"] = { - -- your custom normal mode mappings - }, - }, - }, - }, -} diff --git a/.config/nvim/plugin/tidy.lua b/.config/nvim/plugin/tidy.lua deleted file mode 100644 index c5f6e38..0000000 --- a/.config/nvim/plugin/tidy.lua +++ /dev/null @@ -1,5 +0,0 @@ --- mcauley-penney/tidy.nvim - -require("tidy").setup({ - filetype_exclude = {}, -}) diff --git a/.config/nvim/plugin/todo-comments.lua b/.config/nvim/plugin/todo-comments.lua deleted file mode 100644 index dd2fc59..0000000 --- a/.config/nvim/plugin/todo-comments.lua +++ /dev/null @@ -1,62 +0,0 @@ --- folke/todo-comments.nvim - -require 'todo-comments'.setup { - signs = true, -- show icons in the signs column - sign_priority = 8, -- sign priority - -- keywords recognized as todo comments - keywords = { - ERRO = { icon = " ", color = "error" }, - WARN = { icon = " ", color = "warning" }, - HACK = { icon = " ", color = "warning" }, - HINT = { icon = " ", color = "hint" }, - TODO = { icon = " ", color = "hint" }, - INFO = { icon = " ", color = "info", alt = { "NOTE" } }, - PERF = { icon = " ", color = "perfect" }, - TEST = { icon = " ", color = "test" }, - }, - gui_style = { - fg = "NONE", -- The gui style to use for the fg highlight group. - bg = "BOLD", -- The gui style to use for the bg highlight group. - }, - merge_keywords = true, -- when true, custom keywords will be merged with the defaults - -- highlighting of the line containing the todo comment - -- * before: highlights before the keyword (typically comment characters) - -- * keyword: highlights of the keyword - -- * after: highlights after the keyword (todo text) - highlight = { - multiline = true, -- enable multine todo comments - multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword - multiline_context = 10, -- extra lines that will be re-evaluated when changing a line - before = "", -- "fg" or "bg" or empty - keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg) - after = "fg", -- "fg" or "bg" or empty - pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex) - comments_only = true, -- uses treesitter to match keywords in comments only - max_line_len = 400, -- ignore lines longer than this - exclude = {}, -- list of file types to exclude highlighting - }, - -- list of named colors where we try to extract the guifg from the - -- list of highlight groups or use the hex color if hl not found as a fallback - colors = { - error = { "DiagnosticSignError", "ErrorMsg", "#DC2626" }, - warning = { "DiagnosticSignWarn", "WarningMsg", "#FBBF24" }, - hint = { "DiagnosticSignHint", "#10B981" }, - info = { "DiagnosticSignInfo", "#999999" }, - perfect = { "Special", "#FF00FF" }, - test = { "Identifier", "#00dddd" } - }, - search = { - command = "rg", - args = { - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - }, - -- regex that will be used to match keywords. - -- don't replace the (KEYWORDS) placeholder - pattern = [[\b(KEYWORDS):]], -- ripgrep regex - -- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives - }, -} diff --git a/.config/nvim/plugin/vim-go.lua b/.config/nvim/plugin/vim-go.lua deleted file mode 100644 index 0eb49ab..0000000 --- a/.config/nvim/plugin/vim-go.lua +++ /dev/null @@ -1,2 +0,0 @@ --- fatih/vim-go -vim.g.go_def_mapping_enabled = 0 diff --git a/.config/nvim/plugin/vim-markdown.lua b/.config/nvim/plugin/vim-markdown.lua deleted file mode 100644 index 78bedf0..0000000 --- a/.config/nvim/plugin/vim-markdown.lua +++ /dev/null @@ -1,3 +0,0 @@ --- preservim/vim-markdown -vim.g.vim_markdown_folding_style_pythonic = 1 -vim.g.vim_markdown_folding_disabled = 1