From 5a46aee31c66dfb86911e01a6391644af4529fd0 Mon Sep 17 00:00:00 2001 From: Tovi Jaeschke-Rogers Date: Thu, 4 Aug 2022 22:38:56 +0930 Subject: [PATCH] Thu 04 Aug 2022 22:38:56 ACST --- .config/aliasrc | 1 + .config/nvim/coc-settings.json | 25 -- .config/nvim/init.lua | 11 - .config/nvim/lua/config/cmp.lua | 120 --------- .config/nvim/lua/config/lsp/init.lua | 52 ---- .config/nvim/lua/config/lsp/installer.lua | 26 -- .config/nvim/lua/config/lsp/keymaps.lua | 37 --- .config/nvim/lua/config/luasnip.lua | 14 - .config/nvim/lua/general/autocmd.lua | 52 ---- .config/nvim/lua/general/options.lua | 30 --- .config/nvim/lua/general/remaps.lua | 35 --- .config/nvim/lua/helper/toggle-tab-width.lua | 19 -- .config/nvim/lua/packer-plugins.lua | 78 ------ .config/nvim/lua/utils/init.lua | 37 --- .config/nvim/plugin/coc.lua | 23 -- .config/nvim/plugin/go.lua | 1 - .config/nvim/plugin/gruvbox.lua | 1 - .config/nvim/plugin/packer_compiled.lua | 263 ------------------- .config/nvim/plugin/php-doc.lua | 7 - .config/nvim/plugin/telescope.lua | 61 ----- .config/nvim/plugin/tmux.lua | 17 -- .config/nvim/plugin/treesitter.lua | 24 -- update.sh | 27 +- 23 files changed, 19 insertions(+), 942 deletions(-) delete mode 100644 .config/nvim/coc-settings.json delete mode 100644 .config/nvim/init.lua delete mode 100644 .config/nvim/lua/config/cmp.lua delete mode 100644 .config/nvim/lua/config/lsp/init.lua delete mode 100644 .config/nvim/lua/config/lsp/installer.lua delete mode 100644 .config/nvim/lua/config/lsp/keymaps.lua delete mode 100644 .config/nvim/lua/config/luasnip.lua delete mode 100644 .config/nvim/lua/general/autocmd.lua delete mode 100644 .config/nvim/lua/general/options.lua delete mode 100644 .config/nvim/lua/general/remaps.lua delete mode 100644 .config/nvim/lua/helper/toggle-tab-width.lua delete mode 100644 .config/nvim/lua/packer-plugins.lua delete mode 100644 .config/nvim/lua/utils/init.lua delete mode 100644 .config/nvim/plugin/coc.lua delete mode 100644 .config/nvim/plugin/go.lua delete mode 100644 .config/nvim/plugin/gruvbox.lua delete mode 100644 .config/nvim/plugin/packer_compiled.lua delete mode 100644 .config/nvim/plugin/php-doc.lua delete mode 100644 .config/nvim/plugin/telescope.lua delete mode 100644 .config/nvim/plugin/tmux.lua delete mode 100644 .config/nvim/plugin/treesitter.lua diff --git a/.config/aliasrc b/.config/aliasrc index 220ece7..f6a7d86 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -38,6 +38,7 @@ alias \ t12='docker run -it -v $(pwd):/workpace -v /root/.ssh:/root/.ssh:ro -v ~/.aws:/root/.aws -w /workpace hashicorp/terraform:0.12.27 ' \ ducks='du -cks * | sort -rn | head' \ fn="find . -name" \ + artisan="docker-compose exec fpm php artisan" \ tinker="docker-compose exec fpm php artisan tinker" \ phpunit="docker-compose exec fpm ./vendor/bin/phpunit" \ jsonlint="python -m json.tool" \ diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json deleted file mode 100644 index e708ab4..0000000 --- a/.config/nvim/coc-settings.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "languageserver": { - "ccls": { - "command": "ccls", - "filetypes": [ - "c", - "cpp", - "objc", - "objcpp" - ], - "rootPatterns": [ - ".ccls", - "compile_commands.json", - ".vim/", - ".git/", - ".hg/" - ], - "initializationOptions": { - "cache": { - "directory": "/tmp/ccls" - } - } - } - } -} diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index 13a6964..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1,11 +0,0 @@ - --- General options and remaps -require('general.options') -require('general.remaps') -require('general.autocmd') - --- Helper functions -require('helper.toggle-tab-width') - --- Plugins -require('packer-plugins') diff --git a/.config/nvim/lua/config/cmp.lua b/.config/nvim/lua/config/cmp.lua deleted file mode 100644 index b81bbdc..0000000 --- a/.config/nvim/lua/config/cmp.lua +++ /dev/null @@ -1,120 +0,0 @@ -local M = {} - -function M.setup() - local has_words_before = function() - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match "%s" == nil - end - - local luasnip = require("luasnip") - local cmp = require("cmp") - - cmp.setup { - completion = { completeopt = "menu,menuone,noinsert", keyword_length = 1 }, - experimental = { native_menu = false, ghost_text = false }, - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - formatting = { - format = function(entry, vim_item) - vim_item.menu = ({ - nvim_lsp = "[LSP]", - buffer = "[Buffer]", - luasnip = "[Snip]", - nvim_lua = "[Lua]", - treesitter = "[Treesitter]", - path = "[Path]", - })[entry.source.name] - return vim_item - end, - }, - mapping = { - [""] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }), - [""] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }), - [""] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }), - [""] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }), - [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), - [""] = cmp.mapping { i = cmp.mapping.close(), c = cmp.mapping.close() }, - [""] = cmp.mapping { - i = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false }, - c = function(fallback) - if cmp.visible() then - cmp.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false } - else - fallback() - end - end, - }, - [""] = cmp.mapping( - function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, { - "i", - "s", - "c", - }), - [""] = 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", - "c", - }), - - }, - sources = { - { name = "nvim_lsp" }, - { name = "treesitter" }, - { name = "buffer" }, - { name = "luasnip" }, - { name = "nvim_lua" }, - { name = "path" }, - -- { name = "spell" }, - -- { name = "emoji" }, - -- { name = "calc" }, - }, - window = { - documentation = { - border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" }, - winhighlight = "NormalFloat:NormalFloat,FloatBorder:TelescopeBorder", - }, - }, - } - - -- Use buffer source for `/` - cmp.setup.cmdline("/", { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = "buffer" }, - }, - }) - - -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). - cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) - }) - -end - -return M diff --git a/.config/nvim/lua/config/lsp/init.lua b/.config/nvim/lua/config/lsp/init.lua deleted file mode 100644 index 984c87a..0000000 --- a/.config/nvim/lua/config/lsp/init.lua +++ /dev/null @@ -1,52 +0,0 @@ -local M = {} - -local servers = { - gopls = {}, - html = {}, - jsonls = {}, - pyright = {}, - tsserver = {}, - vimls = {}, - dartls = {}, - dockerls = {}, - intelephense = {}, - sqlls = {}, - volar = {}, -} - -local function on_attach(client, bufnr) - -- Enable completion triggered by - -- See `:help omnifunc` and `:help ins-completion` for more information. - vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") - - -- Use LSP as the handler for formatexpr. - -- See `:help formatexpr` for more information. - vim.api.nvim_buf_set_option(0, "formatexpr", "v:lua.vim.lsp.formatexpr()") - - -- Configure key mappings - require("config.lsp.keymaps").setup(client, bufnr) -end - -local lsp_signature = require "lsp_signature" -lsp_signature.setup { - bind = true, - handler_opts = { - border = "rounded", - }, -} - -local capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()) - -local opts = { - on_attach = on_attach, - capabilities = cababilities, - flags = { - debounce_text_changes = 150, - }, -} - -function M.setup() - require("config.lsp.installer").setup(servers, opts) -end - -return M diff --git a/.config/nvim/lua/config/lsp/installer.lua b/.config/nvim/lua/config/lsp/installer.lua deleted file mode 100644 index 012eb69..0000000 --- a/.config/nvim/lua/config/lsp/installer.lua +++ /dev/null @@ -1,26 +0,0 @@ -local lsp_installer_servers = require "nvim-lsp-installer.servers" -local utils = require "utils" - -local M = {} - -function M.setup(servers, options) - for server_name, _ in pairs(servers) do - local server_available, server = lsp_installer_servers.get_server(server_name) - - if server_available then - server:on_ready(function() - local opts = vim.tbl_deep_extend("force", options, servers[server.name] or {}) - server:setup(opts) - end) - - if not server:is_installed() then - utils.info("Installing " .. server.name) - server:install() - end - else - utils.error(server) - end - end -end - -return M diff --git a/.config/nvim/lua/config/lsp/keymaps.lua b/.config/nvim/lua/config/lsp/keymaps.lua deleted file mode 100644 index 8d6d06c..0000000 --- a/.config/nvim/lua/config/lsp/keymaps.lua +++ /dev/null @@ -1,37 +0,0 @@ -local M = {} - -local keymap = vim.api.nvim_set_keymap -local buf_keymap = vim.api.nvim_buf_set_keymap - -local function keymappings(client, bufnr) - local opts = { noremap = true, silent = true } - - -- Key mappings - vim.keymap.set("n", "K", vim.lsp.buf.hover, opts) - vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) - vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) - vim.keymap.set("n", "[e", function () vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR}) end, opts) - vim.keymap.set("n", "]e", function () vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR}) end, opts) - - vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts) - vim.keymap.set("n", "K", vim.lsp.buf.code_action, opts) - vim.keymap.set("n", "of", vim.diagnostic.open_float, opts) - - -- if client.resolved_capabilities.document_formatting then - -- vim.keymap.set("n", "ff", vim.lsp.buf.formatting, opts) - -- end - - vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) - vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts) - -- vim.keymap.set("n", "gr", function() vim.lsp.buf.references({ includeDeclaration = false }) end, opts) - vim.keymap.set("n", "gh", vim.lsp.buf.signature_help, opts) - vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts) - vim.keymap.set("n", "gT", vim.lsp.buf.type_definition, opts) - -end - -function M.setup(client, bufnr) - keymappings(client, bufnr) -end - -return M diff --git a/.config/nvim/lua/config/luasnip.lua b/.config/nvim/lua/config/luasnip.lua deleted file mode 100644 index 10ecf74..0000000 --- a/.config/nvim/lua/config/luasnip.lua +++ /dev/null @@ -1,14 +0,0 @@ -local M = {} - -function M.setup() - local luasnip = require "luasnip" - - luasnip.config.set_config { - history = false, - updateevents = "TextChanged,TextChangedI", - } - - require("luasnip/loaders/from_vscode").load() -end - -return M diff --git a/.config/nvim/lua/general/autocmd.lua b/.config/nvim/lua/general/autocmd.lua deleted file mode 100644 index 1f54e2a..0000000 --- a/.config/nvim/lua/general/autocmd.lua +++ /dev/null @@ -1,52 +0,0 @@ - -local aucmd_dict = { - FileType = { - { - pattern = "dart,vue,js", - callback = function() - vim.opt_local.tabstop = 2 - vim.opt_local.softtabstop = 2 - vim.opt_local.shiftwidth = 2 - end, - }, - }, - BufWritePre = { - { - command = [[%s/\s\+$//e]], - }, - { - pattern = 'go', - callback = function () require('go.format').gofmt() end, - }, - }, - BufRead = { - { - command = [[if @% !~# '\.git[\/\\]COMMIT_EDITMSG$' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif]] - }, - { - pattern = { '*.docker' }, - callback = function() - vim.opt_local.syntax = 'dockerfile' - end - } - }, - BufNewFile = { - { - pattern = { '*.docker' }, - callback = function() - vim.opt_local.syntax = 'dockerfile' - end - } - }, - VimLeave = { - { - command = [[mksession! ~/.config/nvim/session/shutdown_session.vim]] - }, - }, -} - -for event, opt_tbls in pairs(aucmd_dict) do - for _, opt_tbl in pairs(opt_tbls) do - vim.api.nvim_create_autocmd(event, opt_tbl) - end -end diff --git a/.config/nvim/lua/general/options.lua b/.config/nvim/lua/general/options.lua deleted file mode 100644 index 07aef10..0000000 --- a/.config/nvim/lua/general/options.lua +++ /dev/null @@ -1,30 +0,0 @@ -vim.g.mapleader = ',' - -vim.o.clipboard = 'unnamedplus' - -vim.o.nohlsearch = true -vim.o.incsearch = true -vim.o.ignorecase = true - --- autocmd BufWritePre * :%s/\s\+$//e - -vim.o.mouse = 'a' -vim.o.smartcase = true -vim.o.linebreak = true - -vim.o.noswapfile = true -vim.o.nobackup = true -vim.o.undodir = vim.fn.expand('~/.config/nvim/undodir') -vim.o.undofile = true - -vim.o.encoding = 'utf-8' -vim.o.number = true -vim.o.relativenumber = true - -vim.o.tabstop = 4 -vim.o.softtabstop = 4 -vim.o.expandtab = true -vim.o.shiftwidth = 4 -vim.o.smarttab = true - -vim.o.formatoptions = 'tqj' diff --git a/.config/nvim/lua/general/remaps.lua b/.config/nvim/lua/general/remaps.lua deleted file mode 100644 index 5ba2a80..0000000 --- a/.config/nvim/lua/general/remaps.lua +++ /dev/null @@ -1,35 +0,0 @@ -local options = { noremap = true } - -vim.api.nvim_set_keymap('n', 'c', '"_c', options) - --- Easily open splits -vim.api.nvim_set_keymap('n', 'hs', 'split', options) -vim.api.nvim_set_keymap('n', 'vs', 'vsplit', options) - --- Copy the entire file -vim.api.nvim_set_keymap('n', 'y', 'ggyG', options) - --- Easily navigate tabs -vim.api.nvim_set_keymap('n', '1', '1gt', options) -vim.api.nvim_set_keymap('n', '2', '2gt', options) -vim.api.nvim_set_keymap('n', '3', '3gt', options) -vim.api.nvim_set_keymap('n', '4', '4gt', options) -vim.api.nvim_set_keymap('n', '5', '5gt', options) - --- Manually store session -vim.api.nvim_set_keymap('n', '', 'mksession! ~/.config/nvim/session/manual_session.vim', options) --- Restore manually stored session -vim.api.nvim_set_keymap('n', '', 'source ~/.config/nvim/session/manual_session.vim', options) --- Restore auto saved session created on exit -vim.api.nvim_set_keymap('n', '', 'source ~/.config/nvim/session/shutdown_session.vim', options) - --- Replace all is aliased to S. -vim.api.nvim_set_keymap('n', '', '%s//g', options) - --- Navigating with guides -vim.api.nvim_set_keymap('n', '', '/<++>"_c4l', options) -vim.api.nvim_set_keymap('i', '', '/<++>"_c4l', options) -vim.api.nvim_set_keymap('v', '', '/<++>"_c4l', options) - --- Spell-check -vim.api.nvim_set_keymap('n', 'o', 'setlocal spell! spelllang=en_au', options) diff --git a/.config/nvim/lua/helper/toggle-tab-width.lua b/.config/nvim/lua/helper/toggle-tab-width.lua deleted file mode 100644 index ff702a9..0000000 --- a/.config/nvim/lua/helper/toggle-tab-width.lua +++ /dev/null @@ -1,19 +0,0 @@ -local tabWidth = 4 - -function ToggleTabWidth() - if tabWidth == 2 then - vim.o.tabstop = 4 - vim.o.softtabstop = 4 - vim.o.shiftwidth = 4 - tabWidth = 4 - print('Set tab width to 4') - return - end - vim.o.tabstop = 2 - vim.o.softtabstop = 2 - vim.o.shiftwidth = 2 - tabWidth = 2 - print('Set tab width to 2') -end - -vim.keymap.set('n', 't', ToggleTabWidth, { noremap = true}) diff --git a/.config/nvim/lua/packer-plugins.lua b/.config/nvim/lua/packer-plugins.lua deleted file mode 100644 index bebb1ae..0000000 --- a/.config/nvim/lua/packer-plugins.lua +++ /dev/null @@ -1,78 +0,0 @@ -return require('packer').startup(function() - -- Packer can manage itself - use 'wbthomason/packer.nvim' - - -- colorscheme - use 'gruvbox-community/gruvbox' - - use { 'neoclide/coc.nvim', run = 'yarn install', disable = true } - - use { "williamboman/nvim-lsp-installer" } - - use { - "neovim/nvim-lspconfig", - event = "BufReadPre", - wants = { "cmp-nvim-lsp", "nvim-lsp-installer", "lsp_signature.nvim" }, - config = function() - require("config.lsp").setup() - end, - requires = { - "williamboman/nvim-lsp-installer", - "ray-x/lsp_signature.nvim", - }, - } - - use { - "ray-x/lsp_signature.nvim", - } - - use { - "hrsh7th/nvim-cmp", - event = "InsertEnter", - requires = { - { "hrsh7th/cmp-nvim-lsp", after = "nvim-cmp" }, - { "f3fora/cmp-spell", after = "nvim-cmp" }, - { "hrsh7th/cmp-path", after = "nvim-cmp" }, - { "hrsh7th/cmp-buffer", after = "nvim-cmp" }, - { "hrsh7th/cmp-calc", after = "nvim-cmp" }, - { "quangnguyen30192/cmp-nvim-ultisnips", after = "nvim-cmp" }, - { - "L3MON4D3/LuaSnip", - -- after = 'nvim-cmp', - wants = "friendly-snippets", - requires = { - { "rafamadriz/friendly-snippets", after = 'nvim-cmp' }, - }, - config = function() - require("config.luasnip").setup() - end, - }, - - }, - config = function() - require("config.cmp").setup() - end, - disable = false, - } - - use 'nvim-lua/popup.nvim' - use 'nvim-lua/plenary.nvim' - use 'nvim-telescope/telescope.nvim' - use 'nvim-telescope/telescope-fzy-native.nvim' - - use 'Rican7/php-doc-modded' - - use 'f-person/git-blame.nvim' - - use 'dart-lang/dart-vim-plugin' - - use { 'nvim-treesitter/nvim-treesitter' } - - use 'ray-x/go.nvim' - use 'ray-x/guihua.lua' - - use 'aserowy/tmux.nvim' - - -- Local nvim plugin development - -- use '~/Software/nvim-phpdoc/phpdoc.nvim' -end) diff --git a/.config/nvim/lua/utils/init.lua b/.config/nvim/lua/utils/init.lua deleted file mode 100644 index 03897f8..0000000 --- a/.config/nvim/lua/utils/init.lua +++ /dev/null @@ -1,37 +0,0 @@ -_G.dump = function(...) - print(vim.inspect(...)) -end - -_G.prequire = function(...) - local status, lib = pcall(require, ...) - if status then - return lib - end - return nil -end - -local M = {} - -function M.t(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) -end - -function M.log(msg, hl, name) - name = name or "Neovim" - hl = hl or "Todo" - vim.api.nvim_echo({ { name .. ": ", hl }, { msg } }, true, {}) -end - -function M.warn(msg, name) - vim.notify(msg, vim.log.levels.WARN, { title = name }) -end - -function M.error(msg, name) - vim.notify(msg, vim.log.levels.ERROR, { title = name }) -end - -function M.info(msg, name) - vim.notify(msg, vim.log.levels.INFO, { title = name }) -end - -return M diff --git a/.config/nvim/plugin/coc.lua b/.config/nvim/plugin/coc.lua deleted file mode 100644 index 868502a..0000000 --- a/.config/nvim/plugin/coc.lua +++ /dev/null @@ -1,23 +0,0 @@ --- vim.o.signcolumn = 'number' --- --- vim.cmd[[highlight CocErrorSign ctermfg=Black ctermbg=Magenta]] --- --- -- Bind tab to select next tab complete --- vim.api.nvim_set_keymap("i", "", "pumvisible() ? '' : ''", {noremap = true, silent = true, expr = true}) --- --- vim.api.nvim_set_keymap("n", ".", "(coc-codeaction)", {}) --- vim.api.nvim_set_keymap("n", "l", ":CocCommand eslint.executeAutofix", {}) --- vim.api.nvim_set_keymap("n", "gd", "(coc-definition)", {silent = true}) --- vim.api.nvim_set_keymap("n", "gr", "(coc-references)", {silent = true}) --- vim.api.nvim_set_keymap("n", "K", ":call CocActionAsync('doHover')", {silent = true, noremap = true}) --- vim.api.nvim_set_keymap("n", "rn", "(coc-rename)", {}) --- vim.api.nvim_set_keymap("n", "f", ":CocCommand prettier.formatFile", {noremap = true}) --- --- vim.api.nvim_set_keymap("n", "g[", ":call CocActionAsync('diagnosticPrevious')", {silent = true, noremap = true}) --- vim.api.nvim_set_keymap("n", "g]", ":call CocActionAsync('diagnosticNext')", {silent = true, noremap = true}) --- --- vim.keymap.set("n", "", vim.fn['coc#refresh'](), {silent = true, noremap = true}) --- --- -- Bind Ctrl + j,k to up and down for COC completion --- vim.api.nvim_set_keymap('i', '', "pumvisible() ? '' : ''", { noremap = true, expr = true, silent = true }) --- vim.api.nvim_set_keymap('i', '', "pumvisible() ? '' : ''", { noremap = true, expr = true, silent = true }) diff --git a/.config/nvim/plugin/go.lua b/.config/nvim/plugin/go.lua deleted file mode 100644 index e26b510..0000000 --- a/.config/nvim/plugin/go.lua +++ /dev/null @@ -1 +0,0 @@ -require('go').setup() diff --git a/.config/nvim/plugin/gruvbox.lua b/.config/nvim/plugin/gruvbox.lua deleted file mode 100644 index e387281..0000000 --- a/.config/nvim/plugin/gruvbox.lua +++ /dev/null @@ -1 +0,0 @@ -vim.cmd[[colorscheme gruvbox]] diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua deleted file mode 100644 index 1a570f0..0000000 --- a/.config/nvim/plugin/packer_compiled.lua +++ /dev/null @@ -1,263 +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/tovi/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/tovi/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/tovi/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/tovi/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/home/tovi/.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 = { - LuaSnip = { - config = { "\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19config.luasnip\frequire\0" }, - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/LuaSnip", - url = "https://github.com/L3MON4D3/LuaSnip", - wants = { "friendly-snippets" } - }, - ["cmp-buffer"] = { - after_files = { "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-buffer/after/plugin/cmp_buffer.lua" }, - load_after = { - ["nvim-cmp"] = true - }, - loaded = false, - needs_bufread = false, - path = "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-buffer", - url = "https://github.com/hrsh7th/cmp-buffer" - }, - ["cmp-calc"] = { - after_files = { "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-calc/after/plugin/cmp_calc.lua" }, - load_after = { - ["nvim-cmp"] = true - }, - loaded = false, - needs_bufread = false, - path = "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-calc", - url = "https://github.com/hrsh7th/cmp-calc" - }, - ["cmp-nvim-lsp"] = { - after_files = { "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lsp/after/plugin/cmp_nvim_lsp.lua" }, - load_after = { - ["nvim-cmp"] = true - }, - loaded = false, - needs_bufread = false, - path = "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lsp", - url = "https://github.com/hrsh7th/cmp-nvim-lsp" - }, - ["cmp-nvim-ultisnips"] = { - after_files = { "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-nvim-ultisnips/after/plugin/cmp_nvim_ultisnips.lua" }, - load_after = { - ["nvim-cmp"] = true - }, - loaded = false, - needs_bufread = false, - path = "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-nvim-ultisnips", - url = "https://github.com/quangnguyen30192/cmp-nvim-ultisnips" - }, - ["cmp-path"] = { - after_files = { "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-path/after/plugin/cmp_path.lua" }, - load_after = { - ["nvim-cmp"] = true - }, - loaded = false, - needs_bufread = false, - path = "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-path", - url = "https://github.com/hrsh7th/cmp-path" - }, - ["cmp-spell"] = { - after_files = { "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-spell/after/plugin/cmp-spell.lua" }, - load_after = { - ["nvim-cmp"] = true - }, - loaded = false, - needs_bufread = false, - path = "/home/tovi/.local/share/nvim/site/pack/packer/opt/cmp-spell", - url = "https://github.com/f3fora/cmp-spell" - }, - ["dart-vim-plugin"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/dart-vim-plugin", - url = "https://github.com/dart-lang/dart-vim-plugin" - }, - ["friendly-snippets"] = { - load_after = { - ["nvim-cmp"] = true - }, - loaded = false, - needs_bufread = false, - path = "/home/tovi/.local/share/nvim/site/pack/packer/opt/friendly-snippets", - url = "https://github.com/rafamadriz/friendly-snippets" - }, - ["git-blame.nvim"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/git-blame.nvim", - url = "https://github.com/f-person/git-blame.nvim" - }, - ["go.nvim"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/go.nvim", - url = "https://github.com/ray-x/go.nvim" - }, - gruvbox = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/gruvbox", - url = "https://github.com/gruvbox-community/gruvbox" - }, - ["guihua.lua"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/guihua.lua", - url = "https://github.com/ray-x/guihua.lua" - }, - ["lsp_signature.nvim"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/lsp_signature.nvim", - url = "https://github.com/ray-x/lsp_signature.nvim" - }, - ["nvim-cmp"] = { - after = { "cmp-nvim-ultisnips", "friendly-snippets", "cmp-spell", "cmp-buffer", "cmp-path", "cmp-calc", "cmp-nvim-lsp" }, - config = { "\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15config.cmp\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/home/tovi/.local/share/nvim/site/pack/packer/opt/nvim-cmp", - url = "https://github.com/hrsh7th/nvim-cmp" - }, - ["nvim-lsp-installer"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer", - url = "https://github.com/williamboman/nvim-lsp-installer" - }, - ["nvim-lspconfig"] = { - config = { "\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15config.lsp\frequire\0" }, - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/home/tovi/.local/share/nvim/site/pack/packer/opt/nvim-lspconfig", - url = "https://github.com/neovim/nvim-lspconfig", - wants = { "cmp-nvim-lsp", "nvim-lsp-installer", "lsp_signature.nvim" } - }, - ["nvim-treesitter"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/nvim-treesitter", - url = "https://github.com/nvim-treesitter/nvim-treesitter" - }, - ["packer.nvim"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/packer.nvim", - url = "https://github.com/wbthomason/packer.nvim" - }, - ["php-doc-modded"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/php-doc-modded", - url = "https://github.com/Rican7/php-doc-modded" - }, - ["plenary.nvim"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/plenary.nvim", - url = "https://github.com/nvim-lua/plenary.nvim" - }, - ["popup.nvim"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/popup.nvim", - url = "https://github.com/nvim-lua/popup.nvim" - }, - ["telescope-fzy-native.nvim"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/telescope-fzy-native.nvim", - url = "https://github.com/nvim-telescope/telescope-fzy-native.nvim" - }, - ["telescope.nvim"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/telescope.nvim", - url = "https://github.com/nvim-telescope/telescope.nvim" - }, - ["tmux.nvim"] = { - loaded = true, - path = "/home/tovi/.local/share/nvim/site/pack/packer/start/tmux.nvim", - url = "https://github.com/aserowy/tmux.nvim" - } -} - -time([[Defining packer_plugins]], false) --- Config for: LuaSnip -time([[Config for LuaSnip]], true) -try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19config.luasnip\frequire\0", "config", "LuaSnip") -time([[Config for LuaSnip]], false) -vim.cmd [[augroup packer_load_aucmds]] -vim.cmd [[au!]] - -- Event lazy-loads -time([[Defining lazy-load event autocommands]], true) -vim.cmd [[au BufReadPre * ++once lua require("packer.load")({'nvim-lspconfig'}, { event = "BufReadPre *" }, _G.packer_plugins)]] -vim.cmd [[au InsertEnter * ++once lua require("packer.load")({'nvim-cmp'}, { event = "InsertEnter *" }, _G.packer_plugins)]] -time([[Defining lazy-load event autocommands]], false) -vim.cmd("augroup END") -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/.config/nvim/plugin/php-doc.lua b/.config/nvim/plugin/php-doc.lua deleted file mode 100644 index 7bfee69..0000000 --- a/.config/nvim/plugin/php-doc.lua +++ /dev/null @@ -1,7 +0,0 @@ -vim.keymap.set('n', '', function () - if vim.bo.filetype ~= 'php' then - return - end - - vim.api.nvim_call_function("PhpDocSingle", {}) -end, options) diff --git a/.config/nvim/plugin/telescope.lua b/.config/nvim/plugin/telescope.lua deleted file mode 100644 index 322048c..0000000 --- a/.config/nvim/plugin/telescope.lua +++ /dev/null @@ -1,61 +0,0 @@ -local pickers = require("telescope.pickers") -local finders = require("telescope.finders") -local previewers = require("telescope.previewers") -local action_state = require("telescope.actions.state") -local conf = require("telescope.config").values -local actions = require("telescope.actions") - -require("telescope").setup({ - defaults = { - file_sorter = require("telescope.sorters").get_fzy_sorter, - prompt_prefix = " >", - color_devicons = true, - - file_previewer = require("telescope.previewers").vim_buffer_cat.new, - grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new, - qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new, - - mappings = { - i = { - [""] = false, - [""] = actions.send_to_qflist, - }, - }, - }, -}) - -local M = {} - -function git_branches () - require("telescope.builtin").git_branches({ - attach_mappings = function(_, map) - map("i", "", actions.git_delete_branch) - map("n", "", actions.git_delete_branch) - return true - end, - }) -end - -local options = { noremap = true } - -vim.keymap.set('n', '', function() - local term = vim.fn.input("Grep For > ") - if term == '' then - return - end - require('telescope.builtin').grep_string({ search = term }) -end, options) - -vim.keymap.set('n', '', function() - local ran, errorMessage = pcall(require('telescope.builtin').git_files) - if not ran then - require('telescope.builtin').find_files() - end -end, options) - --- vim.keymap.set('n', '', function() --- end, options) - -vim.keymap.set('n', 'fb', require('telescope.builtin').buffers, options) -vim.keymap.set('n', 'gr', require('telescope.builtin').lsp_references, options) - diff --git a/.config/nvim/plugin/tmux.lua b/.config/nvim/plugin/tmux.lua deleted file mode 100644 index da0ec7e..0000000 --- a/.config/nvim/plugin/tmux.lua +++ /dev/null @@ -1,17 +0,0 @@ -require("tmux").setup({ - -- overwrite default configuration - -- here, e.g. to enable default bindings - copy_sync = { - -- enables copy sync and overwrites all register actions to - -- sync registers *, +, unnamed, and 0 till 9 from tmux in advance - enable = true, - }, - navigation = { - -- enables default keybindings (C-hjkl) for normal mode - enable_default_keybindings = true, - }, - resize = { - -- enables default keybindings (A-hjkl) for normal mode - enable_default_keybindings = true, - } - }) diff --git a/.config/nvim/plugin/treesitter.lua b/.config/nvim/plugin/treesitter.lua deleted file mode 100644 index 1ddb230..0000000 --- a/.config/nvim/plugin/treesitter.lua +++ /dev/null @@ -1,24 +0,0 @@ -require('nvim-treesitter.configs').setup { - -- A list of parser names, or "all" - ensure_installed = { 'go', 'dart' }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - auto_install = true, - - -- List of parsers to ignore installing (for "all") - ignore_install = { "javascript" }, - - highlight = { - -- `false` will disable the whole extension - enable = true, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} diff --git a/update.sh b/update.sh index f6500d0..26e811c 100755 --- a/update.sh +++ b/update.sh @@ -8,21 +8,30 @@ declare -a FILES=( .inputrc .iterm2_shell_integration.bash .xinitrc - .config/aliasrc .config/nvim/init.lua - .config/nvim/lua/general/remaps.lua - .config/nvim/lua/general/options.lua - .config/nvim/lua/general/autocmd.lua + .config/nvim/lua/packer-plugins.lua + .config/nvim/lua/helper/toggle-tab-width.lua + .config/nvim/lua/config/tmux.lua + .config/nvim/lua/config/barbar.lua + .config/nvim/lua/config/treesitter.lua + .config/nvim/lua/config/php-doc.lua + .config/nvim/lua/config/go.lua .config/nvim/lua/config/cmp.lua + .config/nvim/lua/config/general/remaps.lua + .config/nvim/lua/config/general/options.lua + .config/nvim/lua/config/general/autocmd.lua + .config/nvim/lua/config/general/colorscheme.lua + .config/nvim/lua/config/general/init.lua + .config/nvim/lua/config/gitsigns.lua .config/nvim/lua/config/luasnip.lua .config/nvim/lua/config/lsp/init.lua - .config/nvim/lua/config/lsp/installer.lua .config/nvim/lua/config/lsp/keymaps.lua + .config/nvim/lua/config/lsp/installer.lua + .config/nvim/lua/config/nvim-neo-tree.lua + .config/nvim/lua/config/lualine.lua + .config/nvim/lua/config/telescope.lua .config/nvim/lua/utils/init.lua - .config/nvim/lua/helper/toggle-tab-width.lua - .config/nvim/plugin - .config/nvim/lua/packer-plugins.lua - .config/nvim/coc-settings.json + .config/aliasrc .config/lf/ .dwm/autostart.sh .dwm/dwm-sss