From d0c422a6da5d08e6147ef9546b7ac807df36747a Mon Sep 17 00:00:00 2001 From: Daryl Ronningen Date: Sat, 9 Jul 2022 06:20:26 -0700 Subject: [PATCH] move neovim config to own repo --- .config/nvim | 1 + .config/nvim/init.lua | 27 -- .config/nvim/lua/user/alpha.lua | 36 -- .config/nvim/lua/user/autocommands.lua | 46 --- .config/nvim/lua/user/autopairs.lua | 17 - .config/nvim/lua/user/bufferline.lua | 34 -- .config/nvim/lua/user/cmp.lua | 152 -------- .config/nvim/lua/user/colorizer.lua | 17 - .config/nvim/lua/user/colorscheme.lua | 5 - .config/nvim/lua/user/comment.lua | 22 -- .config/nvim/lua/user/copilot.lua | 6 - .config/nvim/lua/user/dap.lua | 12 - .config/nvim/lua/user/discord.lua | 6 - .config/nvim/lua/user/gitsigns.lua | 52 --- .config/nvim/lua/user/illuminate.lua | 3 - .config/nvim/lua/user/impatient.lua | 6 - .config/nvim/lua/user/indentline.lua | 16 - .config/nvim/lua/user/keymaps.lua | 125 ------- .config/nvim/lua/user/lsp/handlers.lua | 91 ----- .config/nvim/lua/user/lsp/init.lua | 4 - .config/nvim/lua/user/lsp/mason.lua | 20 - .config/nvim/lua/user/lsp/nullls.lua | 28 -- .config/nvim/lua/user/lsp/settings/jsonls.lua | 18 - .../lua/user/lsp/settings/sumneko_lua.lua | 11 - .../nvim/lua/user/lsp/settings/tsserver.lua | 6 - .config/nvim/lua/user/lsp/signature.lua | 11 - .config/nvim/lua/user/lualine.lua | 38 -- .config/nvim/lua/user/notify.lua | 16 - .config/nvim/lua/user/nvimtree.lua | 102 ----- .config/nvim/lua/user/options.lua | 43 --- .config/nvim/lua/user/plugins.lua | 160 -------- .config/nvim/lua/user/spectre.lua | 9 - .config/nvim/lua/user/telescope.lua | 76 ---- .config/nvim/lua/user/toggleterm.lua | 27 -- .config/nvim/lua/user/treesitter.lua | 22 -- .config/nvim/lua/user/trouble.lua | 6 - .config/nvim/lua/user/whichkey.lua | 6 - .config/nvim/lua/user/whitespace.lua | 15 - .config/nvim/lua/user/winbar.lua | 64 ---- .config/nvim/plugin/packer_compiled.lua | 352 ------------------ .gitmodules | 4 + 41 files changed, 5 insertions(+), 1707 deletions(-) create mode 160000 .config/nvim delete mode 100644 .config/nvim/init.lua delete mode 100644 .config/nvim/lua/user/alpha.lua delete mode 100644 .config/nvim/lua/user/autocommands.lua delete mode 100644 .config/nvim/lua/user/autopairs.lua delete mode 100644 .config/nvim/lua/user/bufferline.lua delete mode 100644 .config/nvim/lua/user/cmp.lua delete mode 100644 .config/nvim/lua/user/colorizer.lua delete mode 100644 .config/nvim/lua/user/colorscheme.lua delete mode 100644 .config/nvim/lua/user/comment.lua delete mode 100644 .config/nvim/lua/user/copilot.lua delete mode 100644 .config/nvim/lua/user/dap.lua delete mode 100644 .config/nvim/lua/user/discord.lua delete mode 100644 .config/nvim/lua/user/gitsigns.lua delete mode 100644 .config/nvim/lua/user/illuminate.lua delete mode 100644 .config/nvim/lua/user/impatient.lua delete mode 100644 .config/nvim/lua/user/indentline.lua delete mode 100644 .config/nvim/lua/user/keymaps.lua delete mode 100644 .config/nvim/lua/user/lsp/handlers.lua delete mode 100644 .config/nvim/lua/user/lsp/init.lua delete mode 100644 .config/nvim/lua/user/lsp/mason.lua delete mode 100644 .config/nvim/lua/user/lsp/nullls.lua delete mode 100644 .config/nvim/lua/user/lsp/settings/jsonls.lua delete mode 100644 .config/nvim/lua/user/lsp/settings/sumneko_lua.lua delete mode 100644 .config/nvim/lua/user/lsp/settings/tsserver.lua delete mode 100644 .config/nvim/lua/user/lsp/signature.lua delete mode 100644 .config/nvim/lua/user/lualine.lua delete mode 100644 .config/nvim/lua/user/notify.lua delete mode 100644 .config/nvim/lua/user/nvimtree.lua delete mode 100644 .config/nvim/lua/user/options.lua delete mode 100644 .config/nvim/lua/user/plugins.lua delete mode 100644 .config/nvim/lua/user/spectre.lua delete mode 100644 .config/nvim/lua/user/telescope.lua delete mode 100644 .config/nvim/lua/user/toggleterm.lua delete mode 100644 .config/nvim/lua/user/treesitter.lua delete mode 100644 .config/nvim/lua/user/trouble.lua delete mode 100644 .config/nvim/lua/user/whichkey.lua delete mode 100644 .config/nvim/lua/user/whitespace.lua delete mode 100644 .config/nvim/lua/user/winbar.lua delete mode 100644 .config/nvim/plugin/packer_compiled.lua create mode 100644 .gitmodules diff --git a/.config/nvim b/.config/nvim new file mode 160000 index 0000000..8df1114 --- /dev/null +++ b/.config/nvim @@ -0,0 +1 @@ +Subproject commit 8df1114f709aceeec12cef6020720c5128f20c5d diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index 1677fb0..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1,27 +0,0 @@ -require("user.options") -require("user.keymaps") -require("user.plugins") -require("user.notify") -require("user.cmp") -require("user.lsp") -require("user.colorscheme") -require("user.telescope") -require("user.treesitter") -require("user.autopairs") -require("user.comment") -require("user.gitsigns") -require("user.nvimtree") -require("user.bufferline") -require("user.whitespace") -require("user.lualine") -require("user.toggleterm") -require("user.impatient") -require("user.indentline") -require("user.alpha") -require("user.whichkey") -require("user.trouble") -require("user.colorizer") -require("user.discord") -require("user.spectre") -require("user.dap") -require("user.copilot") diff --git a/.config/nvim/lua/user/alpha.lua b/.config/nvim/lua/user/alpha.lua deleted file mode 100644 index 44ecdd0..0000000 --- a/.config/nvim/lua/user/alpha.lua +++ /dev/null @@ -1,36 +0,0 @@ -local status_ok, alpha = pcall(require, "alpha") -if not status_ok then - return -end - -local dashboard = require("alpha.themes.dashboard") -dashboard.section.header.val = { - " ▟▙", - " ▝▘", - "██▃▅▇█▆▖ ▗▟████▙▖ ▄████▄ ██▄ ▄██ ██ ▗▟█▆▄▄▆█▙▖", - "██▛▔ ▝██ ██▄▄▄▄██ ██▛▔▔▜██ ▝██ ██▘ ██ ██▛▜██▛▜██", - "██ ██ ██▀▀▀▀▀▘ ██▖ ▗██ ▜█▙▟█▛ ██ ██ ██ ██", - "██ ██ ▜█▙▄▄▄▟▊ ▀██▙▟██▀ ▝████▘ ██ ██ ██ ██", - "▀▀ ▀▀ ▝▀▀▀▀▀ ▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀", -} -dashboard.section.buttons.val = { - dashboard.button("f", " Find file", ":Telescope find_files "), - dashboard.button("e", " New file", ":ene startinsert "), - dashboard.button("r", " Recently used files", ":Telescope oldfiles "), - dashboard.button("t", " Find text", ":Telescope live_grep "), - dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua "), - dashboard.button("q", " Quit Neovim", ":qa"), -} - -local function footer() - return "I use Arch BTW" -end - -dashboard.section.footer.val = footer() - -dashboard.section.footer.opts.hl = "Type" -dashboard.section.header.opts.hl = "Include" -dashboard.section.buttons.opts.hl = "Keyword" - -dashboard.opts.opts.noautocmd = true -alpha.setup(dashboard.opts) diff --git a/.config/nvim/lua/user/autocommands.lua b/.config/nvim/lua/user/autocommands.lua deleted file mode 100644 index d31bf83..0000000 --- a/.config/nvim/lua/user/autocommands.lua +++ /dev/null @@ -1,46 +0,0 @@ --- Use 'q' to quit from common plugins -vim.api.nvim_create_autocmd({ "FileType" }, { - pattern = { "qf", "help", "man", "lspinfo", "spectre_panel", "lir" }, - callback = function() - vim.cmd([[ - nnoremap q :close - set nobuflisted - ]]) - end, -}) - --- Remove statusline and tabline when in Alpha -vim.api.nvim_create_autocmd({ "User" }, { - pattern = { "AlphaReady" }, - callback = function() - vim.cmd([[ - set showtabline=0 | autocmd BufUnload set showtabline=2 - set laststatus=0 | autocmd BufUnload set laststatus=3 - ]]) - end, -}) - --- Set wrap and spell in markdown and gitcommit -vim.api.nvim_create_autocmd({ "FileType" }, { - pattern = { "gitcommit", "markdown" }, - callback = function() - vim.opt_local.wrap = true - vim.opt_local.spell = true - end, -}) - -vim.cmd("autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif") - --- Fixes Autocomment -vim.api.nvim_create_autocmd({ "BufWinEnter" }, { - callback = function() - vim.cmd("set formatoptions-=cro") - end, -}) - --- Highlight Yanked Text -vim.api.nvim_create_autocmd({ "TextYankPost" }, { - callback = function() - vim.highlight.on_yank({ higroup = "Visual", timeout = 200 }) - end, -}) diff --git a/.config/nvim/lua/user/autopairs.lua b/.config/nvim/lua/user/autopairs.lua deleted file mode 100644 index 2cf6873..0000000 --- a/.config/nvim/lua/user/autopairs.lua +++ /dev/null @@ -1,17 +0,0 @@ --- Setup nvim-cmp. -local status_ok, npairs = pcall(require, "nvim-autopairs") -if not status_ok then - return -end - -npairs.setup({ - check_ts = true, -- treesitter integration - disable_filetype = { "TelescopePrompt" }, -}) - -local cmp_autopairs = require("nvim-autopairs.completion.cmp") -local cmp_status_ok, cmp = pcall(require, "cmp") -if not cmp_status_ok then - return -end -cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({})) diff --git a/.config/nvim/lua/user/bufferline.lua b/.config/nvim/lua/user/bufferline.lua deleted file mode 100644 index 777afa3..0000000 --- a/.config/nvim/lua/user/bufferline.lua +++ /dev/null @@ -1,34 +0,0 @@ -local status_ok, bufferline = pcall(require, "bufferline") -if not status_ok then - return -end - -bufferline.setup({ - options = { - numbers = "ordinal", - close_command = "Bdelete! %d", - right_mouse_command = "Bdelete! %d", - left_mouse_command = "buffer %d", - middle_mouse_command = nil, - indicator_icon = "▎", - buffer_close_icon = "", - modified_icon = "●", - close_icon = "", - left_trunc_marker = "", - right_trunc_marker = "", - max_name_length = 30, - max_prefix_length = 30, - tab_size = 21, - diagnostics = "nvim_lsp", - diagnostics_update_in_insert = true, - offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, - show_buffer_icons = true, - show_buffer_close_icons = true, - show_close_icon = true, - show_tab_indicators = true, - persist_buffer_sort = true, - separator_style = "thin", - enforce_regular_tabs = true, - always_show_bufferline = true, - }, -}) diff --git a/.config/nvim/lua/user/cmp.lua b/.config/nvim/lua/user/cmp.lua deleted file mode 100644 index 27565ea..0000000 --- a/.config/nvim/lua/user/cmp.lua +++ /dev/null @@ -1,152 +0,0 @@ -local cmp_status_ok, cmp = pcall(require, "cmp") -if not cmp_status_ok then - return -end - -local npm_status_ok, npm = pcall(require, "cmp-npm") -if not npm_status_ok then - return -end - -local snip_status_ok, luasnip = pcall(require, "luasnip") -if not snip_status_ok then - return -end - -require("luasnip/loaders/from_vscode").lazy_load() - -local check_backspace = function() - local col = vim.fn.col(".") - 1 - return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") -end - -npm.setup({}) - -local kind_icons = { - Text = "", - Method = "m", - Function = "", - Constructor = "", - Field = "", - Variable = "", - Class = "", - Interface = "", - Module = "", - Property = "", - Unit = "", - Value = "", - Enum = "", - Keyword = "", - Snippet = "", - Color = "", - File = "", - Reference = "", - Folder = "", - EnumMember = "", - Constant = "", - Struct = "", - Event = "", - Operator = "", - TypeParameter = "", -} - -cmp.setup({ - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - mapping = { - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }), - [""] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }), - [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), - [""] = cmp.config.disable, - [""] = cmp.mapping({ - i = cmp.mapping.abort(), - c = cmp.mapping.close(), - }), - [""] = cmp.mapping.confirm({ select = true }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expandable() then - luasnip.expand() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - elseif check_backspace() then - fallback() - else - fallback() - end - end, { - "i", - "s", - }), - [""] = 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", - }), - }, - formatting = { - fields = { "abbr", "kind", "menu" }, - format = function(entry, vim_item) - vim_item.kind = string.format("%s", kind_icons[vim_item.kind]) - vim_item.menu = ({ - nvim_lsp = "[LSP]", - copilot = "[COPILOT]", - npm = "[NPM]", - nvim_lua = "[NVIM_LUA]", - luasnip = "[SNIPPET]", - buffer = "[BUFFER]", - path = "[PATH6]", - })[entry.source.name] - return vim_item - end, - }, - sources = { - { name = "copilot" }, - { name = "nvim_lsp" }, - { name = "npm" }, - { name = "nvim_lua" }, - { name = "luasnip" }, - { name = "buffer" }, - { name = "path" }, - }, - confirm_opts = { - behavior = cmp.ConfirmBehavior.Replace, - select = false, - }, - window = { - documentation = { - border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" }, - }, - }, - experimental = { - ghost_text = true, - native_menu = false, - }, -}) - -cmp.setup.cmdline("/", { - sources = { - { name = "buffer" }, - }, -}) - -cmp.setup.cmdline(":", { - sources = cmp.config.sources({ - { name = "path" }, - }, { - { name = "cmdline" }, - }), -}) diff --git a/.config/nvim/lua/user/colorizer.lua b/.config/nvim/lua/user/colorizer.lua deleted file mode 100644 index 875aa13..0000000 --- a/.config/nvim/lua/user/colorizer.lua +++ /dev/null @@ -1,17 +0,0 @@ -local status_ok, colorizer = pcall(require, "colorizer") -if not status_ok then - return -end - -colorizer.setup({ "*" }, { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = false, -- "Name" codes like Blue oe blue - RRGGBBAA = true, -- #RRGGBBAA hex codes - rgb_fn = true, -- CSS rgb() and rgba() functions - hsl_fn = true, -- CSS hsl() and hsla() functions - css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn - -- Available modes: foreground, background, virtualtext - mode = "background", -- Set the display mode.) -}) diff --git a/.config/nvim/lua/user/colorscheme.lua b/.config/nvim/lua/user/colorscheme.lua deleted file mode 100644 index f42924d..0000000 --- a/.config/nvim/lua/user/colorscheme.lua +++ /dev/null @@ -1,5 +0,0 @@ -vim.g.nord_italic = false -vim.g.nord_contrast = true -vim.g.nord_borders = true -require("nord").set() -require("lsp-colors").setup() diff --git a/.config/nvim/lua/user/comment.lua b/.config/nvim/lua/user/comment.lua deleted file mode 100644 index 07c1a2a..0000000 --- a/.config/nvim/lua/user/comment.lua +++ /dev/null @@ -1,22 +0,0 @@ -local status_ok, comment = pcall(require, "Comment") -if not status_ok then - return -end - -comment.setup({ - pre_hook = function(ctx) - local U = require("Comment.utils") - - local location = nil - if ctx.ctype == U.ctype.block then - location = require("ts_context_commentstring.utils").get_cursor_location() - elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then - location = require("ts_context_commentstring.utils").get_visual_start_location() - end - - return require("ts_context_commentstring.internal").calculate_commentstring({ - key = ctx.ctype == U.ctype.line and "__default" or "__multiline", - location = location, - }) - end, -}) diff --git a/.config/nvim/lua/user/copilot.lua b/.config/nvim/lua/user/copilot.lua deleted file mode 100644 index 47d7e89..0000000 --- a/.config/nvim/lua/user/copilot.lua +++ /dev/null @@ -1,6 +0,0 @@ -local status_ok, copilot = pcall(require, "copilot") -if not status_ok then - return -end - -copilot.setup({}) diff --git a/.config/nvim/lua/user/dap.lua b/.config/nvim/lua/user/dap.lua deleted file mode 100644 index b4cbd4c..0000000 --- a/.config/nvim/lua/user/dap.lua +++ /dev/null @@ -1,12 +0,0 @@ -local dapui_status_ok, dapui = pcall(require, "dapui") -if not dapui_status_ok then - return -end - -local vtest_status_ok, vtest = pcall(require, "nvim-dap-virtual-text") -if not vtest_status_ok then - return -end - -dapui.setup() -vtest.setup() diff --git a/.config/nvim/lua/user/discord.lua b/.config/nvim/lua/user/discord.lua deleted file mode 100644 index 4c0d982..0000000 --- a/.config/nvim/lua/user/discord.lua +++ /dev/null @@ -1,6 +0,0 @@ -local status_ok, discord = pcall(require, "presence") -if not status_ok then - return -end - -discord:setup({}) diff --git a/.config/nvim/lua/user/gitsigns.lua b/.config/nvim/lua/user/gitsigns.lua deleted file mode 100644 index 62320ca..0000000 --- a/.config/nvim/lua/user/gitsigns.lua +++ /dev/null @@ -1,52 +0,0 @@ -local status_ok, gitsigns = pcall(require, "gitsigns") -if not status_ok then - return -end - -gitsigns.setup({ - signs = { - add = { hl = "GitSignsAdd", text = "▎", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, - change = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, - delete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, - topdelete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, - changedelete = { - hl = "GitSignsChange", - text = "▎", - numhl = "GitSignsChangeNr", - linehl = "GitSignsChangeLn", - }, - }, - signcolumn = true, - numhl = false, - linehl = false, - word_diff = false, - watch_gitdir = { - interval = 1000, - follow_files = true, - }, - attach_to_untracked = true, - current_line_blame = true, - current_line_blame_opts = { - virt_text = true, - virt_text_pos = "eol", - delay = 1000, - ignore_whitespace = false, - }, - current_line_blame_formatter_opts = { - relative_time = false, - }, - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, - max_file_length = 40000, - preview_config = { - border = "single", - style = "minimal", - relative = "cursor", - row = 0, - col = 1, - }, - yadm = { - enable = false, - }, -}) diff --git a/.config/nvim/lua/user/illuminate.lua b/.config/nvim/lua/user/illuminate.lua deleted file mode 100644 index 862843e..0000000 --- a/.config/nvim/lua/user/illuminate.lua +++ /dev/null @@ -1,3 +0,0 @@ -vim.g.Illuminate_ftblacklist = {'alpha', 'NvimTree'} -vim.api.nvim_set_keymap('n', '', 'lua require"illuminate".next_reference{wrap=true}', {noremap=true}) -vim.api.nvim_set_keymap('n', '', 'lua require"illuminate".next_reference{reverse=true,wrap=true}', {noremap=true}) diff --git a/.config/nvim/lua/user/impatient.lua b/.config/nvim/lua/user/impatient.lua deleted file mode 100644 index fa64f00..0000000 --- a/.config/nvim/lua/user/impatient.lua +++ /dev/null @@ -1,6 +0,0 @@ -local status_ok, impatient = pcall(require, "impatient") -if not status_ok then - return -end - -impatient.enable_profile() diff --git a/.config/nvim/lua/user/indentline.lua b/.config/nvim/lua/user/indentline.lua deleted file mode 100644 index 6ebf918..0000000 --- a/.config/nvim/lua/user/indentline.lua +++ /dev/null @@ -1,16 +0,0 @@ -local status_ok, indent_blankline = pcall(require, "indent_blankline") -if not status_ok then - return -end - -vim.g.indent_blankline_filetype_exclude = { - "help", - "packer", - "NvimTree", - "Trouble", - "alpha", -} - -indent_blankline.setup({ - show_current_context = true, -}) diff --git a/.config/nvim/lua/user/keymaps.lua b/.config/nvim/lua/user/keymaps.lua deleted file mode 100644 index e357c5a..0000000 --- a/.config/nvim/lua/user/keymaps.lua +++ /dev/null @@ -1,125 +0,0 @@ -local opts = { noremap = true, silent = true } - -local term_opts = { silent = true } - --- Shorten function name -local keymap = vim.api.nvim_set_keymap - ---Remap space as leader key -keymap("", "", "", opts) -vim.g.mapleader = " " -vim.g.maplocalleader = " " - --- Modes --- normal_mode = "n", --- insert_mode = "i", --- visual_mode = "v", --- visual_block_mode = "x", --- term_mode = "t", --- command_mode = "c", - --- Normal -- --- Better window navigation -keymap("n", "", "h", opts) -keymap("n", "", "j", opts) -keymap("n", "", "k", opts) -keymap("n", "", "l", opts) - --- Resize with arrows -keymap("n", "", ":resize +2", opts) -keymap("n", "", ":resize -2", opts) -keymap("n", "", ":vertical resize -2", opts) -keymap("n", "", ":vertical resize +2", opts) - --- Navigate buffers -keymap("n", "", ":bnext", opts) -keymap("n", "", ":bprevious", opts) - --- Telescope -keymap("n", "ff", ":Telescope frecency", opts) -keymap("n", "fg", ":Telescope live_grep", opts) -keymap("n", "fb", ":Telescope buffers", opts) -keymap("n", "fe", ":Telescope emoji", opts) -keymap("n", "fp", ":Telescope project", opts) -keymap("n", "fd", ":Telescope dap commands", opts) - --- Comment -keymap("n", "/", ":lua require('Comment').toggle()", opts) - --- Nvim-Tree -keymap("n", "e", ":NvimTreeToggle", opts) - --- Trouble -keymap("n", "xx", ":Trouble", opts) -keymap("n", "xw", ":Trouble workspace_diagnostics", opts) -keymap("n", "xd", ":Trouble document_diagnostics", opts) -keymap("n", "xl", ":Trouble loclist", opts) -keymap("n", "xq", ":Trouble quickfix", opts) - --- DAP -keymap("n", "", ":lua require('dapui').toggle()", opts) -keymap("n", "", ":lua require('dap').toggle_breakpoint()", opts) -keymap("n", "", ":lua require('dap').continue()", opts) -keymap("n", "", ":lua require('dap').step_over()", opts) -keymap("n", "", ":lua require('dap').step_into()", opts) -keymap("n", "", ":lua require('dap').step_out()", opts) -keymap("n", "dsc", ":lua require('dap').continue()", opts) -keymap("n", "dsv", ":lua require('dap').step_over()", opts) -keymap("n", "dsi", ":lua require('dap').step_into()", opts) -keymap("n", "dso", ":lua require('dap').step_out()", opts) -keymap("n", "dhh", ":lua require('dap.ui.variables').hover()", opts) -keymap("v", "dhv", ":lua require('dap.ui.variables').visual_hover()", opts) -keymap("n", "duh", ":lua require('dap.ui.widgets').hover()", opts) -keymap( - "n", - "duf", - ":lua local widgets=require('dap.ui.widgets');widgets.centered_float(widgets.scopes)", - opts -) -keymap("n", "dro", ":lua require('dap').repl.open()", opts) -keymap("n", "drl", ":lua require('dap').repl.run_last()", opts) -keymap("n", "dbc", ":lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))", opts) -keymap( - "n", - "dbm", - ":lua require('dap').set_breakpoint({ nil, nil, vim.fn.input('Log point message: ') })", - opts -) -keymap("n", "dbt", ":lua require('dap').toggle_breakpoint()", opts) -keymap("n", "dc", ":lua require('dap.ui.variables').scopes()", opts) -keymap("n", "di", ":lua require('dapui').toggle()", opts) - --- Spectre -keymap("n", "S", ":lua require('spectre').open()", opts) -keymap("n", "sw", ":lua require('spectre').open_visual({select_word=true})", opts) -keymap("n", "s", ":lua require('spectre').open_visual()", opts) -keymap("n", "sp", ":lua require('spectre').open_file_search()", opts) - --- Insert -- - --- Visual -- --- Stay in indent mode -keymap("v", "<", "", ">gv", opts) - --- Move text up and down -keymap("v", "", ":m .+1==", opts) -keymap("v", "", ":m .-2==", opts) -keymap("v", "p", '"_dP', opts) - --- Comment -keymap("v", "/", ':lua require("Comment.api").gc(vim.fn.visualmode())', opts) - --- Visual Block -- --- Move text up and down -keymap("x", "J", ":move '>+1gv-gv", opts) -keymap("x", "K", ":move '<-2gv-gv", opts) -keymap("x", "", ":move '>+1gv-gv", opts) -keymap("x", "", ":move '<-2gv-gv", opts) - --- Terminal -- --- Better terminal navigation -keymap("t", "", "h", term_opts) -keymap("t", "", "j", term_opts) -keymap("t", "", "k", term_opts) -keymap("t", "", "l", term_opts) diff --git a/.config/nvim/lua/user/lsp/handlers.lua b/.config/nvim/lua/user/lsp/handlers.lua deleted file mode 100644 index af72d1a..0000000 --- a/.config/nvim/lua/user/lsp/handlers.lua +++ /dev/null @@ -1,91 +0,0 @@ -local M = {} - -M.setup = function() - local signs = { - { name = "DiagnosticSignError", text = "" }, - { name = "DiagnosticSignWarn", text = "" }, - { name = "DiagnosticSignHint", text = "" }, - { name = "DiagnosticSignInfo", text = "" }, - } - - for _, sign in ipairs(signs) do - vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) - end - - local config = { - virtual_text = false, - signs = { - active = signs, - }, - update_in_insert = true, - underline = true, - severity_sort = true, - float = { - focusable = false, - style = "minimal", - border = "rounded", - source = "always", - header = "", - prefix = "", - }, - } - - vim.diagnostic.config(config) - - vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "rounded", - }) - - vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = "rounded", - }) -end - -local function lsp_highlight_document(client) - local status_ok, illuminate = pcall(require, "illuminate") - if not status_ok then - return - end - illuminate.on_attach(client) -end - -local function lsp_keymaps(bufnr) - local opts = { noremap = true, silent = true } - - vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", ":lua vim.lsp.buf.declaration()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", ":lua vim.lsp.buf.definition()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "K", ":lua vim.lsp.buf.hover()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", ":lua vim.lsp.buf.implementation()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "", ":lua vim.lsp.buf.signature_help()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "grn", ":lua vim.lsp.buf.rename()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "gr", ":lua vim.lsp.buf.references()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "gca", ":lua vim.lsp.buf.code_action()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "gl", ":lua vim.diagnostic.open_float()", opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "[d", ':lua vim.diagnostic.goto_prev({ border = "rounded" })', opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", ':lua vim.diagnostic.goto_next({ border = "rounded" })', opts) - vim.api.nvim_buf_set_keymap(bufnr, "n", "q", "lua vim.diagnostic.setloclist()", opts) - vim.cmd([[ command! Format execute 'lua vim.lsp.buf.formatting()' ]]) -end - -M.on_attach = function(client, bufnr) - lsp_keymaps(bufnr) - lsp_highlight_document(client) - - if client.server_capabilities.documentSymbolProvider then - local navic = require("nvim-navic") - navic.attach(client, bufnr) - end -end - -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities.textDocument.completion.completionItem.snippetSupport = true - -local status_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") - -if not status_ok then - return -end - -M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities) - -return M diff --git a/.config/nvim/lua/user/lsp/init.lua b/.config/nvim/lua/user/lsp/init.lua deleted file mode 100644 index 16fd3d1..0000000 --- a/.config/nvim/lua/user/lsp/init.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("user.lsp.handlers").setup() -require("user.lsp.mason") -require("user.lsp.nullls") -require("user.lsp.signature") diff --git a/.config/nvim/lua/user/lsp/mason.lua b/.config/nvim/lua/user/lsp/mason.lua deleted file mode 100644 index ecf332c..0000000 --- a/.config/nvim/lua/user/lsp/mason.lua +++ /dev/null @@ -1,20 +0,0 @@ -local status_ok, mason = pcall(require, "mason") -if not status_ok then - return -end - -local lspconfig = require("lspconfig") - -mason.setup() -require("mason-lspconfig").setup({ - automatic_installation = true, -}) - -lspconfig.util.default_config = vim.tbl_extend("force", lspconfig.util.default_config, { - on_attach = require("user.lsp.handlers").on_attach, - capabilities = require("user.lsp.handlers").capabilities, -}) - -require("user.lsp.settings.sumneko_lua") -require("user.lsp.settings.jsonls") -require("user.lsp.settings.tsserver") diff --git a/.config/nvim/lua/user/lsp/nullls.lua b/.config/nvim/lua/user/lsp/nullls.lua deleted file mode 100644 index 2d08457..0000000 --- a/.config/nvim/lua/user/lsp/nullls.lua +++ /dev/null @@ -1,28 +0,0 @@ -local null_ls_status_ok, null_ls = pcall(require, "null-ls") -if not null_ls_status_ok then - return -end - -local formatting = null_ls.builtins.formatting -local code_actions = null_ls.builtins.code_actions -local diagnostics = null_ls.builtins.diagnostics - -null_ls.setup({ - debug = false, - sources = { - formatting.stylua, - code_actions.eslint_d, - diagnostics.eslint_d, - formatting.eslint_d, - }, - on_attach = function(client) - if client.server_capabilities.documentFormattingProvider then - vim.cmd([[ - augroup LspFormatting - autocmd! * - autocmd BufWritePre lua vim.lsp.buf.format() - augroup END - ]]) - end - end, -}) diff --git a/.config/nvim/lua/user/lsp/settings/jsonls.lua b/.config/nvim/lua/user/lsp/settings/jsonls.lua deleted file mode 100644 index 29140f4..0000000 --- a/.config/nvim/lua/user/lsp/settings/jsonls.lua +++ /dev/null @@ -1,18 +0,0 @@ -local status_ok, lspconfig = pcall(require, "lspconfig") -if not status_ok then - return -end - -local schemastore_status_ok, schemastore = pcall(require, "schemastore") -if not schemastore_status_ok then - return -end - -lspconfig.jsonls.setup({ - settings = { - json = { - schemas = schemastore.json.schemas(), - validate = { enable = true }, - }, - }, -}) diff --git a/.config/nvim/lua/user/lsp/settings/sumneko_lua.lua b/.config/nvim/lua/user/lsp/settings/sumneko_lua.lua deleted file mode 100644 index 67eccf6..0000000 --- a/.config/nvim/lua/user/lsp/settings/sumneko_lua.lua +++ /dev/null @@ -1,11 +0,0 @@ -local lspconfig = require("lspconfig") - -lspconfig.sumneko_lua.setup({ - settings = { - Lua = { - diagnostics = { - globals = { "vim" }, - }, - }, - }, -}) diff --git a/.config/nvim/lua/user/lsp/settings/tsserver.lua b/.config/nvim/lua/user/lsp/settings/tsserver.lua deleted file mode 100644 index c9b7428..0000000 --- a/.config/nvim/lua/user/lsp/settings/tsserver.lua +++ /dev/null @@ -1,6 +0,0 @@ -local status_ok, lspconfig = pcall(require, "lspconfig") -if not status_ok then - return -end - -lspconfig.tsserver.setup({}) diff --git a/.config/nvim/lua/user/lsp/signature.lua b/.config/nvim/lua/user/lsp/signature.lua deleted file mode 100644 index fc01c76..0000000 --- a/.config/nvim/lua/user/lsp/signature.lua +++ /dev/null @@ -1,11 +0,0 @@ -local status_ok, signature = pcall(require, "lsp_signature") -if not status_ok then - return -end - -local cfg = { - floating_window = false, -- show hint in a floating window, set to false for virtual text only mode -} - -signature.setup(cfg) -- no need to specify bufnr if you don't use toggle_key -signature.on_attach(cfg) -- no need to specify bufnr if you don't use toggle_key diff --git a/.config/nvim/lua/user/lualine.lua b/.config/nvim/lua/user/lualine.lua deleted file mode 100644 index 84d2335..0000000 --- a/.config/nvim/lua/user/lualine.lua +++ /dev/null @@ -1,38 +0,0 @@ -local status_ok, lualine = pcall(require, "lualine") -if not status_ok then - return -end - -lualine.setup({ - options = { - icons_enabled = true, - theme = "auto", - component_separators = { left = "", right = "" }, - section_separators = { left = "", right = "" }, - disabled_filetypes = { "alpha", "NvimTree" }, - always_divide_middle = true, - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { "branch", "diff", "diagnostics" }, - lualine_c = { "filename", "filesize" }, - 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 = {}, - extensions = { - "nvim-tree", - "toggleterm", - "fzf", - "quickfix", - }, -}) diff --git a/.config/nvim/lua/user/notify.lua b/.config/nvim/lua/user/notify.lua deleted file mode 100644 index 15eec94..0000000 --- a/.config/nvim/lua/user/notify.lua +++ /dev/null @@ -1,16 +0,0 @@ -local status_ok, notify = pcall(require, "notify") -if not status_ok then - return -end - -notify.setup({ - stages = "fade_in_slide_out", - on_open = nil, - on_close = nil, - render = "default", - timeout = 175, - background_colour = "Normal", - minimum_width = 10, -}) - -vim.notify = notify diff --git a/.config/nvim/lua/user/nvimtree.lua b/.config/nvim/lua/user/nvimtree.lua deleted file mode 100644 index a1f9fae..0000000 --- a/.config/nvim/lua/user/nvimtree.lua +++ /dev/null @@ -1,102 +0,0 @@ -local status_ok, nvim_tree = pcall(require, "nvim-tree") -if not status_ok then - return -end - -local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config") -if not config_status_ok then - return -end - -local tree_cb = nvim_tree_config.nvim_tree_callback -vim.api.nvim_create_autocmd("BufEnter", { - nested = true, - callback = function() - if #vim.api.nvim_list_wins() == 1 and vim.api.nvim_buf_get_name(0):match("NvimTree_") ~= nil then - vim.cmd("quit") - end - end, -}) - -nvim_tree.setup({ - disable_netrw = true, - hijack_netrw = true, - open_on_setup = false, - ignore_ft_on_setup = { - "alpha", - }, - open_on_tab = true, - hijack_cursor = true, - update_cwd = true, - diagnostics = { - enable = true, - icons = { - hint = "", - info = "", - warning = "", - error = "", - }, - }, - update_focused_file = { - enable = true, - update_cwd = true, - ignore_list = {}, - }, - git = { - enable = true, - ignore = true, - timeout = 500, - }, - view = { - width = 30, - height = 30, - hide_root_folder = false, - side = "left", - mappings = { - custom_only = false, - list = { - { key = { "l", "", "o" }, cb = tree_cb("edit") }, - { key = "h", cb = tree_cb("close_node") }, - { key = "v", cb = tree_cb("vsplit") }, - }, - }, - number = false, - relativenumber = false, - }, - actions = { - open_file = { - quit_on_open = false, - window_picker = { - enable = false, - }, - }, - }, - renderer = { - icons = { - glyphs = { - default = "", - symlink = "", - git = { - unstaged = "", - staged = "S", - unmerged = "", - renamed = "➜", - deleted = "", - untracked = "U", - ignored = "◌", - }, - folder = { - default = "", - open = "", - empty = "", - empty_open = "", - symlink = "", - }, - }, - }, - }, - filesystem_watchers = { - enable = true, - interval = 100, - }, -}) diff --git a/.config/nvim/lua/user/options.lua b/.config/nvim/lua/user/options.lua deleted file mode 100644 index a6eae2f..0000000 --- a/.config/nvim/lua/user/options.lua +++ /dev/null @@ -1,43 +0,0 @@ -vim.opt.backup = false -vim.opt.clipboard = "unnamedplus" -vim.opt.cmdheight = 2 -vim.opt.completeopt = { "menuone", "noselect" } -vim.opt.conceallevel = 0 -vim.opt.fileencoding = "utf-8" -vim.opt.hlsearch = true -vim.opt.ignorecase = true -vim.opt.mouse = "a" -vim.opt.pumheight = 10 -vim.opt.showmode = false -vim.opt.showtabline = 2 -vim.opt.smartcase = true -vim.opt.smartindent = true -vim.opt.splitbelow = true -vim.opt.splitright = true -vim.opt.swapfile = false -vim.opt.termguicolors = true -vim.opt.timeoutlen = 500 -vim.opt.undofile = true -vim.opt.updatetime = 50 -vim.opt.writebackup = false -vim.opt.expandtab = false -vim.opt.shiftwidth = 2 -vim.opt.tabstop = 2 -vim.opt.number = true -vim.opt.relativenumber = false -vim.opt.numberwidth = 4 -vim.opt.signcolumn = "yes" -vim.opt.wrap = false -vim.opt.scrolloff = 8 -vim.opt.sidescrolloff = 8 -vim.opt.shortmess:append("c") -vim.opt.guicursor = "" -vim.opt.incsearch = true -vim.opt.colorcolumn = "120" -vim.opt.list = true -vim.opt.listchars:append("lead:.") -vim.opt.winbar = "%{%v:lua.require'user.winbar'.get_winbar()%}" - -vim.cmd("set whichwrap+=<,>,[,],h,l") -vim.cmd([[set iskeyword+=-]]) -vim.cmd([[set formatoptions-=cro]]) diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua deleted file mode 100644 index 18b1b45..0000000 --- a/.config/nvim/lua/user/plugins.lua +++ /dev/null @@ -1,160 +0,0 @@ -local fn = vim.fn - -local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" -if fn.empty(fn.glob(install_path)) > 0 then - PACKER_BOOTSTRAP = fn.system({ - "git", - "clone", - "--depth", - "1", - "https://github.com/wbthomason/packer.nvim", - install_path, - }) - print("Installing packer close and reopen Neovim...") - vim.cmd([[packadd packer.nvim]]) -end - -vim.cmd([[ - augroup packer_user_config - autocmd! - autocmd BufWritePost plugins.lua source | PackerSync - augroup end -]]) - -local status_ok, packer = pcall(require, "packer") -if not status_ok then - return -end - -packer.init({ - display = { - open_fn = function() - return require("packer.util").float({ border = "rounded" }) - end, - }, -}) - -return packer.startup(function(use) - use("wbthomason/packer.nvim") - - -- Plugin Deps - use("nvim-lua/popup.nvim") - use("nvim-lua/plenary.nvim") - use("kyazdani42/nvim-web-devicons") - - -- Themes - use("shaunsingh/nord.nvim") - use("folke/lsp-colors.nvim") - - -- Completion - use("hrsh7th/nvim-cmp") - use("hrsh7th/cmp-buffer") - use("hrsh7th/cmp-path") - use("hrsh7th/cmp-cmdline") - use("saadparwaiz1/cmp_luasnip") - use("hrsh7th/cmp-nvim-lsp") - use("hrsh7th/cmp-nvim-lua") - use("David-Kunz/cmp-npm") - use("zbirenbaum/copilot-cmp") - - -- Snippets - use("L3MON4D3/LuaSnip") - use("rafamadriz/friendly-snippets") - - -- LSP - use("neovim/nvim-lspconfig") - use("williamboman/mason.nvim") - use("jose-elias-alvarez/null-ls.nvim") - use("b0o/SchemaStore.nvim") - use("ray-x/lsp_signature.nvim") - -- use("github/copilot.vim") -- ENABLE ON FIRST TIME ONLY! - use("zbirenbaum/copilot.lua") - - -- Trouble - use("folke/trouble.nvim") - - -- Telescope - use("nvim-telescope/telescope.nvim") - use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" }) - use("nvim-telescope/telescope-dap.nvim") - - -- Treesitter - use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }) - use("p00f/nvim-ts-rainbow") - use("JoosepAlviste/nvim-ts-context-commentstring") - - -- Autopairs - use("windwp/nvim-autopairs") - - -- Comments - use("numToStr/Comment.nvim") - - -- Git - use("lewis6991/gitsigns.nvim") - - -- Nvim-Tree - use("kyazdani42/nvim-tree.lua") - - -- Bufferline - use("akinsho/bufferline.nvim") - use("moll/vim-bbye") - - -- Whitespace - use("ntpeters/vim-better-whitespace") - - -- Lualine - use("nvim-lualine/lualine.nvim") - - -- Toggleterm - use("akinsho/toggleterm.nvim") - - -- Impatient - use("lewis6991/impatient.nvim") - - -- Indent Line - use("lukas-reineke/indent-blankline.nvim") - - -- Alpha - use("goolord/alpha-nvim") - - -- WhichKey - use("folke/which-key.nvim") - - -- Illuminate - use("RRethy/vim-illuminate") - - -- Colorizer - use("norcalli/nvim-colorizer.lua") - - -- Navic - use("SmiteshP/nvim-navic") - - -- Wakatime - use("wakatime/vim-wakatime") - - -- Discord - use("andweeb/presence.nvim") - - -- DAP - use("mfussenegger/nvim-dap") - use("rcarriga/nvim-dap-ui") - use("theHamsta/nvim-dap-virtual-text") - - -- Spectre - use("windwp/nvim-spectre") - - -- Notify - use("rcarriga/nvim-notify") - - -- Markdown Preview - use({ - "iamcco/markdown-preview.nvim", - run = function() - vim.fn["mkdp#util#install"]() - end, - }) - - if PACKER_BOOTSTRAP then - require("packer").sync() - end -end) diff --git a/.config/nvim/lua/user/spectre.lua b/.config/nvim/lua/user/spectre.lua deleted file mode 100644 index 4e5f59d..0000000 --- a/.config/nvim/lua/user/spectre.lua +++ /dev/null @@ -1,9 +0,0 @@ -local status_ok, spectre = pcall(require, "spectre") -if not status_ok then - return -end - -spectre.setup({ - live_update = true, - is_insert_mode = true, -}) diff --git a/.config/nvim/lua/user/telescope.lua b/.config/nvim/lua/user/telescope.lua deleted file mode 100644 index 1cce2b9..0000000 --- a/.config/nvim/lua/user/telescope.lua +++ /dev/null @@ -1,76 +0,0 @@ -local status_ok, telescope = pcall(require, "telescope") -if not status_ok then - return -end - -telescope.load_extension("fzf") -telescope.load_extension("dap") - -local actions = require("telescope.actions") - -telescope.setup({ - defaults = { - prompt_prefix = " ", - selection_caret = " ", - path_display = { "smart" }, - mappings = { - i = { - [""] = actions.cycle_history_next, - [""] = actions.cycle_history_prev, - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - [""] = actions.close, - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - [""] = actions.select_default, - [""] = actions.select_horizontal, - [""] = actions.select_vertical, - [""] = actions.select_tab, - [""] = actions.preview_scrolling_up, - [""] = actions.preview_scrolling_down, - [""] = actions.results_scrolling_up, - [""] = actions.results_scrolling_down, - [""] = actions.toggle_selection + actions.move_selection_worse, - [""] = actions.toggle_selection + actions.move_selection_better, - [""] = actions.send_to_qflist + actions.open_qflist, - [""] = actions.send_selected_to_qflist + actions.open_qflist, - [""] = actions.complete_tag, - [""] = actions.which_key, - }, - n = { - [""] = actions.close, - [""] = actions.select_default, - [""] = actions.select_horizontal, - [""] = actions.select_vertical, - [""] = actions.select_tab, - [""] = actions.toggle_selection + actions.move_selection_worse, - [""] = actions.toggle_selection + actions.move_selection_better, - [""] = actions.send_to_qflist + actions.open_qflist, - [""] = actions.send_selected_to_qflist + actions.open_qflist, - ["j"] = actions.move_selection_next, - ["k"] = actions.move_selection_previous, - ["H"] = actions.move_to_top, - ["M"] = actions.move_to_middle, - ["L"] = actions.move_to_bottom, - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - ["gg"] = actions.move_to_top, - ["G"] = actions.move_to_bottom, - [""] = actions.preview_scrolling_up, - [""] = actions.preview_scrolling_down, - [""] = actions.results_scrolling_up, - [""] = actions.results_scrolling_down, - ["?"] = actions.which_key, - }, - }, - }, - pickers = {}, - extensions = { - fzf = { - fuzzy = true, - override_generic_sorter = true, - override_file_sorter = true, - case_mode = "ignore_case", - }, - }, -}) diff --git a/.config/nvim/lua/user/toggleterm.lua b/.config/nvim/lua/user/toggleterm.lua deleted file mode 100644 index a12e361..0000000 --- a/.config/nvim/lua/user/toggleterm.lua +++ /dev/null @@ -1,27 +0,0 @@ -local status_ok, toggleterm = pcall(require, "toggleterm") -if not status_ok then - return -end - -toggleterm.setup({ - size = 20, - open_mapping = [[]], - hide_numbers = true, - shade_filetypes = {}, - shade_terminals = true, - shading_factor = 2, - start_in_insert = true, - insert_mappings = true, - persist_size = true, - direction = "float", - close_on_exit = true, - shell = vim.o.shell, - float_opts = { - border = "curved", - winblend = 0, - highlights = { - border = "Normal", - background = "Normal", - }, - }, -}) diff --git a/.config/nvim/lua/user/treesitter.lua b/.config/nvim/lua/user/treesitter.lua deleted file mode 100644 index 68e1021..0000000 --- a/.config/nvim/lua/user/treesitter.lua +++ /dev/null @@ -1,22 +0,0 @@ -local configs = require("nvim-treesitter.configs") -configs.setup({ - ensure_installed = "all", - sync_install = false, - ignore_install = { "" }, - highlight = { - enable = true, - disable = { "" }, - additional_vim_regex_highlighting = true, - }, - rainbow = { - enable = true, - }, - autopairs = { - enable = true, - }, - context_commentstring = { - enable = true, - enable_autocmd = false, - }, - indent = { enable = true, disable = { "yaml" } }, -}) diff --git a/.config/nvim/lua/user/trouble.lua b/.config/nvim/lua/user/trouble.lua deleted file mode 100644 index f92d2cc..0000000 --- a/.config/nvim/lua/user/trouble.lua +++ /dev/null @@ -1,6 +0,0 @@ -local status_ok, trouble = pcall(require, "trouble") -if not status_ok then - return -end - -trouble.setup({}) diff --git a/.config/nvim/lua/user/whichkey.lua b/.config/nvim/lua/user/whichkey.lua deleted file mode 100644 index d63b00b..0000000 --- a/.config/nvim/lua/user/whichkey.lua +++ /dev/null @@ -1,6 +0,0 @@ -local status_ok, which_key = pcall(require, "which-key") -if not status_ok then - return -end - -which_key.setup({}) diff --git a/.config/nvim/lua/user/whitespace.lua b/.config/nvim/lua/user/whitespace.lua deleted file mode 100644 index d9d2c5a..0000000 --- a/.config/nvim/lua/user/whitespace.lua +++ /dev/null @@ -1,15 +0,0 @@ -vim.g.better_whitespace_enabled = 1 -vim.g.strip_whitespace_on_save = 1 -vim.g.show_spaces_that_precede_tabs = 1 -vim.g.strip_whitelines_at_eof = 1 -vim.g.better_whitespace_filetypes_blacklist = { - "diff", - "git", - "gitcommit", - "unite", - "qf", - "help", - "markdown", - "fugitive", - "toggleterm", -} diff --git a/.config/nvim/lua/user/winbar.lua b/.config/nvim/lua/user/winbar.lua deleted file mode 100644 index 43ae000..0000000 --- a/.config/nvim/lua/user/winbar.lua +++ /dev/null @@ -1,64 +0,0 @@ -local M = {} - -local navic = require("nvim-navic") - -local function get_buf_option(opt) - local status_ok, buf_option = pcall(vim.api.nvim_buf_get_option, 0, opt) - if not status_ok then - return nil - else - return buf_option - end -end - -local function is_empty(s) - return s == nil or s == "" -end - -M.winbar_filetype_exclude = { - "help", - "startify", - "dashboard", - "packer", - "neogitstatus", - "NvimTree", - "Trouble", - "alpha", - "lir", - "Outline", - "spectre_panel", - "toggleterm", -} - -local excludes = function() - if vim.tbl_contains(M.winbar_filetype_exclude, vim.bo.filetype) then - vim.opt_local.winbar = nil - return true - end - return false -end - -local function get_filename() - return "%#WinBarFilename#" .. "%t" .. "%*" -end - -local function get_location() - local location = navic.get_location() - if not is_empty(location) then - return "%#WinBarContext#" .. " " .. ">" .. " " .. location .. "%*" - end - return "" -end - -function M.get_winbar() - if excludes() then - return "" - end - if navic.is_available() then - return get_filename() .. get_location() - else - return get_filename() - end -end - -return M diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua deleted file mode 100644 index b0ac084..0000000 --- a/.config/nvim/plugin/packer_compiled.lua +++ /dev/null @@ -1,352 +0,0 @@ --- Automatically generated packer.nvim plugin loader code - -if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then - vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') - return -end - -vim.api.nvim_command('packadd packer.nvim') - -local no_errors, error_msg = pcall(function() - - local time - local profile_info - local should_profile = false - if should_profile then - local hrtime = vim.loop.hrtime - profile_info = {} - time = function(chunk, start) - if start then - profile_info[chunk] = hrtime() - else - profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 - end - end - else - time = function(chunk, start) end - end - -local function save_profiles(threshold) - local sorted_times = {} - for chunk_name, time_taken in pairs(profile_info) do - sorted_times[#sorted_times + 1] = {chunk_name, time_taken} - end - table.sort(sorted_times, function(a, b) return a[2] > b[2] end) - local results = {} - for i, elem in ipairs(sorted_times) do - if not threshold or threshold and elem[2] > threshold then - results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' - end - end - - _G._packer = _G._packer or {} - _G._packer.profile_output = results -end - -time([[Luarocks path setup]], true) -local package_path_str = "/home/relms/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/relms/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/relms/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/relms/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/home/relms/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" -if not string.find(package.path, package_path_str, 1, true) then - package.path = package.path .. ';' .. package_path_str -end - -if not string.find(package.cpath, install_cpath_pattern, 1, true) then - package.cpath = package.cpath .. ';' .. install_cpath_pattern -end - -time([[Luarocks path setup]], false) -time([[try_loadstring definition]], true) -local function try_loadstring(s, component, name) - local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) - if not success then - vim.schedule(function() - vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) - end) - end - return result -end - -time([[try_loadstring definition]], false) -time([[Defining packer_plugins]], true) -_G.packer_plugins = { - ["Comment.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/Comment.nvim", - url = "https://github.com/numToStr/Comment.nvim" - }, - LuaSnip = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/LuaSnip", - url = "https://github.com/L3MON4D3/LuaSnip" - }, - ["SchemaStore.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/SchemaStore.nvim", - url = "https://github.com/b0o/SchemaStore.nvim" - }, - ["alpha-nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/alpha-nvim", - url = "https://github.com/goolord/alpha-nvim" - }, - ["bufferline.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/bufferline.nvim", - url = "https://github.com/akinsho/bufferline.nvim" - }, - ["cmp-buffer"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/cmp-buffer", - url = "https://github.com/hrsh7th/cmp-buffer" - }, - ["cmp-cmdline"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/cmp-cmdline", - url = "https://github.com/hrsh7th/cmp-cmdline" - }, - ["cmp-npm"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/cmp-npm", - url = "https://github.com/David-Kunz/cmp-npm" - }, - ["cmp-nvim-lsp"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", - url = "https://github.com/hrsh7th/cmp-nvim-lsp" - }, - ["cmp-nvim-lua"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", - url = "https://github.com/hrsh7th/cmp-nvim-lua" - }, - ["cmp-path"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/cmp-path", - url = "https://github.com/hrsh7th/cmp-path" - }, - cmp_luasnip = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/cmp_luasnip", - url = "https://github.com/saadparwaiz1/cmp_luasnip" - }, - ["copilot-cmp"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/copilot-cmp", - url = "https://github.com/zbirenbaum/copilot-cmp" - }, - ["copilot.lua"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/copilot.lua", - url = "https://github.com/zbirenbaum/copilot.lua" - }, - ["friendly-snippets"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/friendly-snippets", - url = "https://github.com/rafamadriz/friendly-snippets" - }, - ["gitsigns.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", - url = "https://github.com/lewis6991/gitsigns.nvim" - }, - ["impatient.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/impatient.nvim", - url = "https://github.com/lewis6991/impatient.nvim" - }, - ["indent-blankline.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim", - url = "https://github.com/lukas-reineke/indent-blankline.nvim" - }, - ["lsp-colors.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/lsp-colors.nvim", - url = "https://github.com/folke/lsp-colors.nvim" - }, - ["lsp_signature.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/lsp_signature.nvim", - url = "https://github.com/ray-x/lsp_signature.nvim" - }, - ["lualine.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/lualine.nvim", - url = "https://github.com/nvim-lualine/lualine.nvim" - }, - ["markdown-preview.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/markdown-preview.nvim", - url = "https://github.com/iamcco/markdown-preview.nvim" - }, - ["mason.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/mason.nvim", - url = "https://github.com/williamboman/mason.nvim" - }, - ["nord.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nord.nvim", - url = "https://github.com/shaunsingh/nord.nvim" - }, - ["null-ls.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/null-ls.nvim", - url = "https://github.com/jose-elias-alvarez/null-ls.nvim" - }, - ["nvim-autopairs"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-autopairs", - url = "https://github.com/windwp/nvim-autopairs" - }, - ["nvim-cmp"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-cmp", - url = "https://github.com/hrsh7th/nvim-cmp" - }, - ["nvim-colorizer.lua"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua", - url = "https://github.com/norcalli/nvim-colorizer.lua" - }, - ["nvim-dap"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-dap", - url = "https://github.com/mfussenegger/nvim-dap" - }, - ["nvim-dap-ui"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-dap-ui", - url = "https://github.com/rcarriga/nvim-dap-ui" - }, - ["nvim-dap-virtual-text"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-dap-virtual-text", - url = "https://github.com/theHamsta/nvim-dap-virtual-text" - }, - ["nvim-lspconfig"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", - url = "https://github.com/neovim/nvim-lspconfig" - }, - ["nvim-navic"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-navic", - url = "https://github.com/SmiteshP/nvim-navic" - }, - ["nvim-notify"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-notify", - url = "https://github.com/rcarriga/nvim-notify" - }, - ["nvim-spectre"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-spectre", - url = "https://github.com/windwp/nvim-spectre" - }, - ["nvim-tree.lua"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", - url = "https://github.com/kyazdani42/nvim-tree.lua" - }, - ["nvim-treesitter"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-treesitter", - url = "https://github.com/nvim-treesitter/nvim-treesitter" - }, - ["nvim-ts-context-commentstring"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring", - url = "https://github.com/JoosepAlviste/nvim-ts-context-commentstring" - }, - ["nvim-ts-rainbow"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-ts-rainbow", - url = "https://github.com/p00f/nvim-ts-rainbow" - }, - ["nvim-web-devicons"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", - url = "https://github.com/kyazdani42/nvim-web-devicons" - }, - ["packer.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/packer.nvim", - url = "https://github.com/wbthomason/packer.nvim" - }, - ["plenary.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/plenary.nvim", - url = "https://github.com/nvim-lua/plenary.nvim" - }, - ["popup.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/popup.nvim", - url = "https://github.com/nvim-lua/popup.nvim" - }, - ["presence.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/presence.nvim", - url = "https://github.com/andweeb/presence.nvim" - }, - ["telescope-dap.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/telescope-dap.nvim", - url = "https://github.com/nvim-telescope/telescope-dap.nvim" - }, - ["telescope-fzf-native.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim", - url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" - }, - ["telescope.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/telescope.nvim", - url = "https://github.com/nvim-telescope/telescope.nvim" - }, - ["toggleterm.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/toggleterm.nvim", - url = "https://github.com/akinsho/toggleterm.nvim" - }, - ["trouble.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/trouble.nvim", - url = "https://github.com/folke/trouble.nvim" - }, - ["vim-bbye"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/vim-bbye", - url = "https://github.com/moll/vim-bbye" - }, - ["vim-better-whitespace"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/vim-better-whitespace", - url = "https://github.com/ntpeters/vim-better-whitespace" - }, - ["vim-illuminate"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/vim-illuminate", - url = "https://github.com/RRethy/vim-illuminate" - }, - ["vim-wakatime"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/vim-wakatime", - url = "https://github.com/wakatime/vim-wakatime" - }, - ["which-key.nvim"] = { - loaded = true, - path = "/home/relms/.local/share/nvim/site/pack/packer/start/which-key.nvim", - url = "https://github.com/folke/which-key.nvim" - } -} - -time([[Defining packer_plugins]], false) -if should_profile then save_profiles() end - -end) - -if not no_errors then - error_msg = error_msg:gsub('"', '\\"') - vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') -end diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..0a52535 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule ".config/nvim"] + path = .config/nvim + url = https://code.relms.dev/Relms/neovim-config + branch = main