diff --git a/lua/setup/aerial.lua b/lua/setup/aerial.lua deleted file mode 100644 index ed6e412..0000000 --- a/lua/setup/aerial.lua +++ /dev/null @@ -1,23 +0,0 @@ -require('aerial').setup({ - backends = { 'lsp', 'treesitter', 'markdown' }, - layout = { - default_direction = "prefer_left" - }, - filter_kind = false, - show_guides = true, -}) -require('telescope').load_extension('aerial') -require('legendary').keymaps( - { - { - 's', - ':AerialToggle', - description = 'Symbols outline', - }, - { - '', - ':Telescope aerial', - description = 'Telescope symbols', - } - } -) diff --git a/lua/setup/gruvbox.lua b/lua/setup/gruvbox.lua deleted file mode 100644 index b3cb624..0000000 --- a/lua/setup/gruvbox.lua +++ /dev/null @@ -1,14 +0,0 @@ -require('gruvbox').setup({ - undercurl = true, - underline = true, - bold = false, - italic = false, -- will make italic comments and special strings - inverse = true, -- invert background for search, diffs, statuslines and errors - invert_selection = false, - invert_signs = false, - invert_tabline = false, - invert_intend_guides = false, - contrast = "hard", -- can be "hard" or "soft" - overrides = {}, -}) -vim.cmd('colorscheme gruvbox') diff --git a/lua/setup/my_gruvbox-baby.lua b/lua/setup/my_gruvbox-baby.lua deleted file mode 100644 index fe8ce6c..0000000 --- a/lua/setup/my_gruvbox-baby.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.g.gruvbox_baby_telescope_theme = 1 -local colors = require("gruvbox-baby.colors").config() -vim.g.gruvbox_baby_highlights = {Visual = {bg = '#384741'}} -vim.cmd[[colorscheme gruvbox-baby]] diff --git a/lua/setup/my_gruvbox-material.lua b/lua/setup/my_gruvbox-material.lua deleted file mode 100644 index c5b0136..0000000 --- a/lua/setup/my_gruvbox-material.lua +++ /dev/null @@ -1,5 +0,0 @@ -vim.g.gruvbox_material_background = 'hard' -vim.g.gruvbox_material_foreground = 'original' -vim.g.gruvbox_material_cursor = 'purple' -vim.g.gruvbox_material_diagnostic_virtual_text = 'colored' -vim.cmd('colorscheme gruvbox-material') diff --git a/lua/setup/my_legendary.lua b/lua/setup/my_legendary.lua deleted file mode 100644 index 8f9a429..0000000 --- a/lua/setup/my_legendary.lua +++ /dev/null @@ -1,54 +0,0 @@ -require('legendary').setup({ - default_opts = { - keymaps = { silent = true }, - commands = {}, - autocmds = {}, - }, - keymaps = { - { - 'p', - function() - require("legendary").find() - end, - description = 'legendary keymaps', - mode = { 'n', 'x', 'i' } - }, - { - '', - ':tabnew .', - description = 'Open a new tab', - }, - { - '', - ':vsplit .', - description = 'Open a new vertical split', - }, - { - '', - ':split .', - description = 'Open a new horizontal split', - }, - { - 'a', - '"ayiw', - description = 'Word under cursor into register a', - }, - { - 'x', - 'za', - description = 'Toggle fold', - }, - }, - commands = - { - { - ':set guifont=JetBrainsMonoNL\\ NF:h12', - description = 'Big font size', - }, - { - ':set guifont=JetBrainsMonoNL\\ NF:h9', - description = 'Reset font size', - }, - - } -}) diff --git a/lua/setup/my_litee.lua b/lua/setup/my_litee.lua deleted file mode 100644 index b2a600c..0000000 --- a/lua/setup/my_litee.lua +++ /dev/null @@ -1,55 +0,0 @@ --- configure the litee.nvim library -require('litee.lib').setup({ - tree = { - icon_set = "codicons" - }, - panel = { - orientation = "left", - panel_size = 30 - } -}) --- configure litee-calltree.nvim -require('litee.calltree').setup({ - map_resize_keys = false, - on_open = 'panel', - keymaps = { - expand = "", - collapse = "zc", - collapse_all = "zM", - jump = "", - jump_split = "s", - jump_vsplit = "v", - jump_tab = "t", - hover = "i", - details = "d", - close = "X", - close_panel_pop_out = "", - help = "?", - hide = "H", - switch = "S", - focus = "f" - }, -}) --- configure litee-symboltree.nvim -require('litee.symboltree').setup({ - map_resize_keys = false, - on_open = 'panel', - keymaps = { - expand = '', - collapse = 'zc', - collapse_all = 'zM', - jump = '', - jump_split = 's', - jump_vsplit = 'v', - jump_tab = 't', - hover = 'i', - details = 'd', - close = 'X', - close_panel_pop_out = '', - help = '?', - hide = 'H', - }, -}) - -require('litee.gh').setup({}) - diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua deleted file mode 100644 index dc92e27..0000000 --- a/lua/setup/my_lspconfig.lua +++ /dev/null @@ -1,217 +0,0 @@ -require('mason').setup() -require('mason-lspconfig').setup({ - automatic_installation = true, -}) - -local capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - -OpenDiagFloat = function() - for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do - if vim.api.nvim_win_get_config(winid).zindex then - return - end - end - vim.diagnostic.open_float({ focusable = false, width=80 }) -end - -local on_attach = function(client, bufnr) - local function buf_set_option(...) - vim.api.nvim_buf_set_option(bufnr, ...) - end - - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()') - - -- Mappings. - local opts = { noremap = true, silent = false, buffer = bufnr } - vim.keymap.set('n', ',', vim.diagnostic.goto_prev, opts) - vim.keymap.set('n', ';', vim.diagnostic.goto_next, opts) - vim.keymap.set('n', 'a', vim.lsp.buf.code_action, opts) - vim.keymap.set('n', 'd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'e', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'h', vim.lsp.buf.hover, opts) - vim.keymap.set('n', 'c', vim.lsp.buf.outgoing_calls, opts) - vim.keymap.set('n', 'C', vim.lsp.buf.incoming_calls, opts) - vim.keymap.set('n', 'm', vim.lsp.buf.rename, opts) - local tele_builtins = require('telescope.builtin') - vim.keymap.set('n', '', tele_builtins.lsp_dynamic_workspace_symbols, opts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) - vim.keymap.set('n', 'r', tele_builtins.lsp_references, opts) - vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, opts) - vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) - - vim.cmd([[autocmd CursorHold lua OpenDiagFloat()]]) - - -- Set some keybinds conditional on server capabilities - if client.server_capabilities.documentFormattingProvider then - vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) - end - if client.server_capabilities.documentRangeFormattingProvider then - vim.keymap.set('x', 'f', vim.lsp.buf.format, opts) - end - - -- Set autocommands conditional on server_capabilities - if client.server_capabilities.documentHighlightProvider then - vim.api.nvim_set_hl( - 0, - "LspReferenceText", - { bold = true, - ctermbg = 'red', - bg = "#5a524c"} - ) - vim.api.nvim_set_hl( - 0, - "LspReferenceRead", - { bold = true, - ctermbg = 'red', - bg = 'DarkGreen' } - ) - vim.api.nvim_set_hl( - 0, - "LspReferenceWrite", - { bold = true, - ctermbg = 'red', - bg = 'DarkRed' } - ) - vim.api.nvim_create_augroup("lsp_document_highlight", { clear = true }) - vim.api.nvim_clear_autocmds { buffer = bufnr, group = "lsp_document_highlight" } - vim.api.nvim_create_autocmd("CursorHold", { - callback = vim.lsp.buf.document_highlight, - buffer = bufnr, - group = "lsp_document_highlight", - desc = "Document Highlight", - }) - vim.api.nvim_create_autocmd("CursorMoved", { - callback = vim.lsp.buf.clear_references, - buffer = bufnr, - group = "lsp_document_highlight", - desc = "Clear All the References", - }) - end - - require('lsp_signature').on_attach({ - bind = true, -- This is mandatory, otherwise border config won't get registered. - handler_opts = { - border = 'single', - }, - hi_parameter = 'IncSearch', - }, bufnr) -end - -require('lspconfig')['pyright'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -require('lspconfig')['groovyls'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -require('lspconfig')['cmake'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -local clangd_capabilities = capabilities -clangd_capabilities.textDocument.semanticHighlighting = true -clangd_capabilities.offsetEncoding = { "utf-16" } -require("clangd_extensions").setup { - server = { - capabilities = clangd_capabilities, - on_attach = on_attach, - cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, - root_dir = require('lspconfig').util.root_pattern( - '.clangd', - '.clang-tidy', - '.clang-format', - 'compile_commands.json', - 'compile_flags.txt', - 'configure.ac', - '.git', - 'build_nvim' - ) - }, - extensions = - { - inlay_hints = { - -- Only show inlay hints for the current line - only_current_line = true, - } - } - -} --- require('clangd_extensions').setup({ --- server = { --- on_attach = on_attach, --- capabilities = capabilities, --- cmd = { 'clangd', '--compile-commands-dir=build_nvim' }, --- }, --- }) - -require('lspconfig')['jsonls'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -local lua_rtp = vim.split(package.path, ';') -table.insert(lua_rtp, 'lua/?.lua') -table.insert(lua_rtp, 'lua/?/init.lua') -require('lspconfig').sumneko_lua.setup { - capabilities = capabilities, - on_attach = on_attach, - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = lua_rtp, - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { 'vim', 'use' }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file('', true), - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - }, - } -} - -require('lspconfig')['dockerls'].setup { - capabilities = capabilities, - on_attach = on_attach, -} - -require('lspconfig')['yamlls'].setup { - capabilities = capabilities, - on_attach = on_attach, - settings = { - yaml = { - validate = true - } - } -} - -local null_ls = require('null-ls') -null_ls.setup({ - sources = { - null_ls.builtins.code_actions.gitsigns, - null_ls.builtins.formatting.autopep8, - null_ls.builtins.formatting.prettier, - null_ls.builtins.diagnostics.flake8, - null_ls.builtins.formatting.isort, - null_ls.builtins.formatting.cmake_format, - }, - on_attach = on_attach, - capabilities = capabilities, -}) - -vim.diagnostic.config({ virtual_text = false }) diff --git a/lua/setup/nvim-autopairs.lua b/lua/setup/nvim-autopairs.lua deleted file mode 100644 index f96cb3e..0000000 --- a/lua/setup/nvim-autopairs.lua +++ /dev/null @@ -1 +0,0 @@ -require('nvim-autopairs').setup({}) diff --git a/lua/setup/nvim-tree.lua b/lua/setup/nvim-tree.lua deleted file mode 100644 index fa7bca7..0000000 --- a/lua/setup/nvim-tree.lua +++ /dev/null @@ -1,7 +0,0 @@ --- disable netrw at the very start of your init.lua (strongly advised) -vim.g.loaded = 1 -vim.g.loaded_netrwPlugin = 1 - --- empty setup using defaults -require('nvim-tree').setup() -vim.keymap.set('n', '\\', 'NvimTreeToggle') diff --git a/lua/setup/octo.lua b/lua/setup/octo.lua deleted file mode 100644 index a06b954..0000000 --- a/lua/setup/octo.lua +++ /dev/null @@ -1 +0,0 @@ -require('octo').setup() diff --git a/lua/setup/telescope.lua b/lua/setup/telescope.lua deleted file mode 100644 index e3b98c3..0000000 --- a/lua/setup/telescope.lua +++ /dev/null @@ -1,165 +0,0 @@ -local actions = require('telescope.actions') - -local mappingTab = { - i = { - [''] = actions.select_tab, - [''] = actions.select_default, - }, -} - -require('telescope').setup({ - defaults = { - mappings = { - i = { - [''] = actions.close, - [''] = actions.select_default + actions.center, - [''] = actions.send_selected_to_loclist, - [''] = actions.smart_send_to_qflist, - }, - }, - }, - pickers = { - -- Your special builtin config goes in here - buffers = { - sort_lastused = true, - theme = 'ivy', - mappings = { - i = { - [''] = actions.delete_buffer, - [''] = actions.select_default, - }, - n = { - [''] = actions.delete_buffer, - }, - }, - }, - find_files = { - theme = 'ivy', - previewer = false, - mappings = { - n = { - ['c'] = function(prompt_bufnr) - local selection = require("telescope.actions.state").get_selected_entry() - local dir = vim.fn.fnamemodify(selection.path, ":p:h") - require("telescope.actions").close(prompt_bufnr) - -- Depending on what you want put `cd`, `lcd`, `tcd` - vim.cmd(string.format("silent lcd %s", dir)) - end - } - } - }, - oldfiles = { - theme = 'ivy', - }, - git_files = { - theme = 'ivy', - previewer = false, - }, - lsp_references = { - show_line = false; - include_declaration = false, - }, - lsp_dynamic_workspace_symbols = {}, - }, -}) - -require('telescope').load_extension('fzf') - -Project_files = function() - local opts = {} -- define here if you want to define something - local ok = pcall(require "telescope.builtin".git_files, opts) - if not ok then require "telescope.builtin".find_files(opts) end -end - -require('legendary').keymaps( - { - { - 'p', - ':Telescope projects', - description = 'Select project', - }, - { - 'f', - ':lua require("telescope.builtin").find_files({no_ignore=true})', - description = 'Find file', - }, - { - 'g', - ':lua Project_files()', - description = 'Find git files', - }, - { - 'o', - ':Telescope oldfiles', - description = 'Find old files', - }, - { - 'h', - ':Telescope command_history', - description = 'Open command history', - }, - { - 'b', - ':Telescope buffers', - description = 'Select buffer', - }, - { - 'q', - ':Telescope quickfix', - description = 'Quickfix list with telescope', - }, - { - 'l', - ':Telescope live_grep', - description = 'Search in project', - }, - { - 'k', - function () - vim.ui.input({prompt = 'Glob:', default = vim.api.nvim_buf_get_name(0) }, - function (glob) - require('telescope.builtin').live_grep({glob_pattern = glob}) - end - ) - end, - description = 'Search in project', - }, - { - '', - ':Telescope neoclip', - description = 'Open clipboard history', - }, - { - 'j', - ':Telescope jumplist', - description = 'Open jumplist', - }, - { - '', - ':Telescope current_buffer_fuzzy_find', - description = 'Find in buffer', - }, - { - 'd', - ':Telescope grep_string', - description = 'Find in workspace', - } - } -) - -require('legendary').funcs( - { - { - function() - require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true }) - end, - description = 'Search in open files', - }, - { - function() - require("telescope.builtin").find_files({ no_ignore = false }) - end, - description = 'Find file no_ignore=false', - }, - } -)