diff --git a/basic.vim b/basic.vim deleted file mode 100644 index 37c0c79..0000000 --- a/basic.vim +++ /dev/null @@ -1,25 +0,0 @@ -set number relativenumber -set clipboard=unnamedplus -set mouse=a - -set t_Co=16 -set termguicolors - -filetype plugin indent on -" show existing tab with 4 spaces width -set tabstop=2 -" when indenting with '>', use 4 spaces width -set shiftwidth=2 -" On pressing tab, insert 4 spaces -set expandtab -" Spellcheck -autocmd FileType markdown setlocal spell spelllang=de,en - -set splitright -set splitbelow - -" allow two signs to show up in the sign collumn eg. todo comment and git status -set signcolumn=auto:2 - -" set leader key -let mapleader = "," diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..b529a8e --- /dev/null +++ b/init.lua @@ -0,0 +1,3 @@ +require "plugins" +require "basics" +require "keys" diff --git a/init.vim b/init.vim deleted file mode 100644 index 2b7425f..0000000 --- a/init.vim +++ /dev/null @@ -1,5 +0,0 @@ -source ~/.config/nvim/basic.vim -source ~/.config/nvim/plugins.vim - -autocmd bufnewfile,bufread *.tsx set filetype=typescriptreact -autocmd bufnewfile,bufread *.jsx set filetype=javascriptreact diff --git a/lua/basics.lua b/lua/basics.lua new file mode 100644 index 0000000..b12602d --- /dev/null +++ b/lua/basics.lua @@ -0,0 +1,24 @@ +local set = vim.o + +set.number = true +set.relativenumber = true +set.clipboard = "unnamedplus" +set.mouse = "a" +set.termguicolors = true + +vim.cmd [[filetype plugin indent on]] +set.tabstop = 2 +set.shiftwidth = 2 +set.expandtab = true + +vim.cmd [[autocmd FileType markdown setlocal spell spelllang=de,en]] +vim.cmd [[autocmd bufnewfile,bufread *.tsx set filetype=typescriptreact]] +vim.cmd [[autocmd bufnewfile,bufread *.jsx set filetype=javascriptreact]] + +set.splitright = true +set.splitbelow = true + +set.signcolumn = "auto:2" + +-- set leader +vim.g.mapleader = "," diff --git a/lua/keys.lua b/lua/keys.lua new file mode 100644 index 0000000..a1dade4 --- /dev/null +++ b/lua/keys.lua @@ -0,0 +1 @@ +vim.api.nvim_set_keymap("n", "f", "Telescope find_files", {silent = true}) diff --git a/lua/plugins.lua b/lua/plugins.lua new file mode 100644 index 0000000..e4f7df8 --- /dev/null +++ b/lua/plugins.lua @@ -0,0 +1,135 @@ +local vim = vim +local execute = vim.api.nvim_command +local fn = vim.fn +-- ensure that packer is installed +local install_path = fn.stdpath("data") .. "/site/pack/packer/opt/packer.nvim" +if fn.empty(fn.glob(install_path)) > 0 then + execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path) + execute "packadd packer.nvim" +end +vim.cmd("packadd packer.nvim") +local packer = require "packer" +local util = require "packer.util" + +packer.init( + { + package_root = util.join_paths(vim.fn.stdpath("data"), "site", "pack") + } +) + +return require("packer").startup( + function() + -- Packer can manage itself + use "wbthomason/packer.nvim" + use "MasterGordon/monokai.nvim" + use { + "glepnir/galaxyline.nvim", + branch = "main", + config = function() + require "plugins/galaxyline" + end, + requires = {"kyazdani42/nvim-web-devicons"} + } + use { + "kyazdani42/nvim-tree.lua", + config = function() + require "plugins/nvim-tree" + end, + requires = {"kyazdani42/nvim-web-devicons", opt = true} + } + use "JoosepAlviste/nvim-ts-context-commentstring" + use { + "b3nj5m1n/kommentary", + config = function() + require("kommentary.config").configure_language( + "typescriptreact", + { + single_line_comment_string = "auto", + multi_line_comment_strings = "auto", + hook_function = function() + require("ts_context_commentstring.internal").update_commentstring() + end + } + ) + end + } + use { + "nvim-treesitter/nvim-treesitter", + run = ":TSUpdate", + config = function() + require("nvim-autopairs").setup( + { + enable_check_bracket_line = true + } + ) + require "nvim-treesitter.configs".setup { + context_commentstring = { + enable = true, + enable_autocmd = true + }, + highlight = { + enable = true + }, + indent = { + enable = true + }, + autotag = { + enable = true + } + } + end, + requires = {"JoosepAlviste/nvim-ts-context-commentstring", "windwp/nvim-ts-autotag", "windwp/nvim-autopairs"} + } + use { + "mhartington/formatter.nvim", + config = function() + require "plugins/formatter" + end + } + use { + "mhinz/vim-signify", + config = function() + require "plugins/signify" + end + } + use { + "RishabhRD/nvim-lsputils", + requires = {"RishabhRD/popfix"} + } + use { + "neovim/nvim-lspconfig", + config = function() + require "plugins/lsp" + end, + requires = {"RishabhRD/nvim-lsputils", "onsails/lspkind-nvim"} + } + use { + "hrsh7th/nvim-compe", + config = function() + require "plugins/compe" + end + } + use { + "nvim-telescope/telescope.nvim", + requires = {{"nvim-lua/popup.nvim"}, {"nvim-lua/plenary.nvim"}} + } + use { + "nacro90/numb.nvim", + config = function() + require("numb").setup() + end + } + use { + "norcalli/nvim-colorizer.lua", + config = function() + require "colorizer".setup() + end + } + use { + "tveskag/nvim-blame-line", + config = function() + vim.api.nvim_exec([[autocmd BufEnter * EnableBlameLine]], true) + end + } + end +) diff --git a/plugins/autotag.lua b/lua/plugins/autotag.lua similarity index 100% rename from plugins/autotag.lua rename to lua/plugins/autotag.lua diff --git a/lua/plugins/compe.lua b/lua/plugins/compe.lua new file mode 100644 index 0000000..a3ee41b --- /dev/null +++ b/lua/plugins/compe.lua @@ -0,0 +1,29 @@ +vim.o.completeopt = "menuone,noselect" +require "compe".setup { + enabled = true, + autocomplete = true, + debug = false, + min_length = 1, + preselect = "enable", + throttle_time = 80, + source_timeout = 200, + incomplete_delay = 400, + max_abbr_width = 100, + max_kind_width = 100, + max_menu_width = 100, + documentation = true, + source = { + path = true, + buffer = true, + calc = true, + nvim_lsp = true, + nvim_lua = true, + vsnip = false + } +} + +vim.api.nvim_set_keymap("i", "", "compe#complete()", {silent = true, expr = true}) +vim.api.nvim_set_keymap("i", "", "compe#confirm('')", {silent = true, expr = true}) +vim.api.nvim_set_keymap("i", "", "compe#close('')", {silent = true, expr = true}) +vim.api.nvim_set_keymap("i", "", "compe#scroll({ 'delta': +4 })", {silent = true, expr = true}) +vim.api.nvim_set_keymap("i", "", "compe#scroll({ 'delta': -4 })", {silent = true, expr = true}) diff --git a/plugins/formatter.lua b/lua/plugins/formatter.lua similarity index 100% rename from plugins/formatter.lua rename to lua/plugins/formatter.lua diff --git a/lua/plugins/galaxyline.lua b/lua/plugins/galaxyline.lua new file mode 100644 index 0000000..0523a82 --- /dev/null +++ b/lua/plugins/galaxyline.lua @@ -0,0 +1,231 @@ +local gl = require("galaxyline") +local colors = require("galaxyline.theme").default +local monokai = require("monokai") +local condition = require("galaxyline.condition") +local gls = gl.section +colors.bg = monokai.bg +gl.short_line_list = {"NvimTree", "vista", "dbui", "packer"} + +gls.left[2] = { + ViMode = { + provider = function() + -- auto change color according the vim mode + local mode_color = { + n = colors.green, + i = colors.red, + v = colors.blue, + [""] = colors.blue, + V = colors.blue, + c = colors.magenta, + no = colors.red, + s = colors.orange, + S = colors.orange, + [""] = colors.orange, + ic = colors.yellow, + R = colors.violet, + Rv = colors.violet, + cv = colors.red, + ce = colors.red, + r = colors.cyan, + rm = colors.cyan, + ["r?"] = colors.cyan, + ["!"] = colors.red, + t = colors.red + } + local mode_map = { + ["n"] = "NORMAL ", + ["no"] = "N·OPERATOR PENDING ", + ["v"] = "VISUAL ", + ["V"] = "V·LINE ", + [""] = "V·BLOCK ", + ["s"] = "SELECT ", + ["S"] = "S·LINE ", + [""] = "S·BLOCK ", + ["i"] = "INSERT ", + ["R"] = "REPLACE ", + ["Rv"] = "V·REPLACE ", + ["c"] = "COMMAND ", + ["cv"] = "VIM EX ", + ["ce"] = "EX ", + ["r"] = "PROMPT ", + ["rm"] = "MORE ", + ["r?"] = "CONFIRM ", + ["!"] = "SHELL ", + ["t"] = "TERMINAL " + } + vim.api.nvim_command("hi GalaxyViMode guibg=" .. mode_color[vim.fn.mode()]) + return " " .. mode_map[vim.fn.mode()] + end, + separator = " ", + separator_highlight = {nil, colors.bg}, + highlight = {colors.bg, colors.bg, "bold"} + } +} +gls.left[3] = { + Macro = { + provider = function() + local reg = vim.fn.reg_recording() + + if (reg == nil) or (reg == "") then + return "" + else + return " " .. vim.call("reg_recording") .. " " + end + end, + highlight = {colors.red, colors.bg} + } +} +gls.left[5] = { + FileIcon = { + provider = "FileIcon", + condition = condition.buffer_not_empty, + highlight = {require("galaxyline.provider_fileinfo").get_file_icon_color, colors.bg} + } +} + +gls.left[6] = { + FileName = { + provider = "FileName", + condition = condition.buffer_not_empty, + highlight = {colors.magenta, colors.bg, "bold"} + } +} + +gls.left[7] = { + LineInfo = { + provider = "LineColumn", + separator = " ", + separator_highlight = {"NONE", colors.bg}, + highlight = {colors.fg, colors.bg} + } +} + +gls.left[8] = { + PerCent = { + provider = "LinePercent", + separator = " ", + separator_highlight = {"NONE", colors.bg}, + highlight = {colors.fg, colors.bg, "bold"} + } +} + +gls.left[9] = { + DiagnosticError = { + provider = "DiagnosticError", + icon = "  ", + highlight = {colors.red, colors.bg} + } +} +gls.left[10] = { + DiagnosticWarn = { + provider = "DiagnosticWarn", + icon = "  ", + highlight = {colors.yellow, colors.bg} + } +} + +gls.left[11] = { + DiagnosticHint = { + provider = "DiagnosticHint", + icon = "  ", + highlight = {colors.cyan, colors.bg} + } +} + +gls.left[12] = { + DiagnosticInfo = { + provider = "DiagnosticInfo", + icon = "  ", + highlight = {colors.blue, colors.bg} + } +} + +gls.right[1] = { + FileEncode = { + provider = "FileEncode", + condition = condition.hide_in_width, + separator = " ", + separator_highlight = {"NONE", colors.bg}, + highlight = {colors.green, colors.bg, "bold"} + } +} + +gls.right[2] = { + FileFormat = { + provider = "FileFormat", + condition = condition.hide_in_width, + separator = " ", + separator_highlight = {"NONE", colors.bg}, + highlight = {colors.green, colors.bg, "bold"} + } +} + +gls.right[3] = { + GitIcon = { + provider = function() + return "  " + end, + condition = condition.check_git_workspace, + separator = " ", + separator_highlight = {"NONE", colors.bg}, + highlight = {colors.violet, colors.bg, "bold"} + } +} + +gls.right[4] = { + GitBranch = { + provider = "GitBranch", + condition = condition.check_git_workspace, + highlight = {colors.violet, colors.bg, "bold"} + } +} + +gls.right[5] = { + DiffAdd = { + provider = "DiffAdd", + separator = " ", + separator_highlight = {nil, colors.bg}, + condition = condition.hide_in_width, + icon = "  ", + highlight = {colors.green, colors.bg} + } +} +gls.right[6] = { + DiffModified = { + provider = "DiffModified", + condition = condition.hide_in_width, + icon = " 柳", + highlight = {colors.orane, colors.bg} + } +} +gls.right[7] = { + DiffRemove = { + provider = "DiffRemove", + condition = condition.hide_in_width, + icon = "  ", + highlight = {colors.red, colors.bg} + } +} + +-- File type name +-- -------------- + +gls.short_line_left[1] = { + ShortLineFileName = { + provider = "FileName", + condition = condition.buffer_not_empty, + highlight = {colors.fg, colors.bg}, + separator = " ", + separator_highlight = {nil, colors.bg} + } +} + +-- Buffer icon +-- ----------- + +gls.short_line_right[1] = { + BufferIcon = { + provider = "BufferIcon", + highlight = {colors.fg, colors.bg} + } +} diff --git a/plugins/lsp.lua b/lua/plugins/lsp.lua similarity index 95% rename from plugins/lsp.lua rename to lua/plugins/lsp.lua index 8ce70fe..90bf09f 100644 --- a/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -24,6 +24,9 @@ vim.fn.sign_define( {texthl = "LspDiagnosticsSignInformation", text = "", numhl = "LspDiagnosticsSignInformation"} ) +--- Completion Icons +require("lspkind").init({}) + --- Languages require "lspconfig".bashls.setup {} require "lspconfig".ccls.setup {} @@ -31,7 +34,6 @@ require "lspconfig".clangd.setup {} require "lspconfig".cssls.setup {} require "lspconfig".html.setup {} require "lspconfig".jsonls.setup {} -require "lspconfig".pyls.setup {} require "lspconfig".pyright.setup {} require "lspconfig".tsserver.setup {} require "lspconfig".vimls.setup {} @@ -95,8 +97,3 @@ local on_attach = function(client, bufnr) buf_set_keymap("n", "]d", "lua vim.lsp.diagnostic.goto_next()", opts) buf_set_keymap("n", "q", "lua vim.lsp.diagnostic.set_loclist()", opts) end - -local servers = {"pyright", "rust_analyzer", "tsserver"} -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup {on_attach = on_attach} -end diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua new file mode 100644 index 0000000..26aae27 --- /dev/null +++ b/lua/plugins/nvim-tree.lua @@ -0,0 +1,59 @@ +vim.g.nvim_tree_auto_close = 1 +vim.g.nvim_tree_ignore = {".git", "node_modules", ".cache"} +vim.g.nvim_tree_indent_markers = 1 +vim.api.nvim_set_keymap("", "", ":NvimTreeFindFile", {}) + +vim.g.nvim_tree_icons = { + default = "", + symlink = "", + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★" + }, + folder = { + default = "", + open = "", + symlink = "" + } +} + +vim.g.nvim_tree_disable_default_keybindings = 1 + +local tree_cb = require "nvim-tree.config".nvim_tree_callback +-- default mappings +vim.g.nvim_tree_bindings = { + {key = {"", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")}, + {key = {"<2-RightMouse>", ""}, cb = tree_cb("cd")}, + {key = "s", cb = tree_cb("vsplit")}, + {key = "i", cb = tree_cb("split")}, + {key = "t", cb = tree_cb("tabnew")}, + {key = "<", cb = tree_cb("prev_sibling")}, + {key = ">", cb = tree_cb("next_sibling")}, + {key = "P", cb = tree_cb("parent_node")}, + {key = "", cb = tree_cb("close_node")}, + {key = "", cb = tree_cb("close_node")}, + {key = "", cb = tree_cb("preview")}, + {key = "K", cb = tree_cb("first_sibling")}, + {key = "J", cb = tree_cb("last_sibling")}, + {key = "I", cb = tree_cb("toggle_ignored")}, + {key = "I", cb = tree_cb("toggle_dotfiles")}, + {key = "r", cb = tree_cb("refresh")}, + {key = "a", cb = tree_cb("create")}, + {key = "d", cb = tree_cb("remove")}, + {key = "m", cb = tree_cb("rename")}, + {key = "", cb = tree_cb("full_rename")}, + {key = "x", cb = tree_cb("cut")}, + {key = "c", cb = tree_cb("copy")}, + {key = "p", cb = tree_cb("paste")}, + {key = "y", cb = tree_cb("copy_name")}, + {key = "Y", cb = tree_cb("copy_path")}, + {key = "gy", cb = tree_cb("copy_absolute_path")}, + {key = "[c", cb = tree_cb("prev_git_item")}, + {key = "]c", cb = tree_cb("next_git_item")}, + {key = "-", cb = tree_cb("dir_up")}, + {key = "q", cb = tree_cb("close")}, + {key = "?", cb = tree_cb("toggle_help")} +} diff --git a/lua/plugins/signify.lua b/lua/plugins/signify.lua new file mode 100644 index 0000000..27a37c0 --- /dev/null +++ b/lua/plugins/signify.lua @@ -0,0 +1,2 @@ +vim.g.signify_sign_add = "│" +vim.g.signify_sign_change = "│" diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua new file mode 100644 index 0000000..905014a --- /dev/null +++ b/plugin/packer_compiled.lua @@ -0,0 +1,228 @@ +-- 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/gordon/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?.lua;/home/gordon/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?/init.lua;/home/gordon/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?.lua;/home/gordon/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/gordon/.cache/nvim/packer_hererocks/2.0.5/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)) + 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 = { + ["formatter.nvim"] = { + config = { "\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22plugins/formatter\frequire\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/formatter.nvim" + }, + ["galaxyline.nvim"] = { + config = { "\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins/galaxyline\frequire\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/galaxyline.nvim" + }, + kommentary = { + config = { "\27LJ\1\2^\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\25update_commentstring&ts_context_commentstring.internal\frequire\1\1\0\4\0\a\0\n4\0\0\0%\1\1\0>\0\2\0027\0\2\0%\1\3\0003\2\4\0001\3\5\0:\3\6\2>\0\3\1G\0\1\0\18hook_function\0\1\0\2\31multi_line_comment_strings\tauto\31single_line_comment_string\tauto\20typescriptreact\23configure_language\22kommentary.config\frequire\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/kommentary" + }, + ["lspkind-nvim"] = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/lspkind-nvim" + }, + ["monokai.nvim"] = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/monokai.nvim" + }, + ["numb.nvim"] = { + config = { "\27LJ\1\0022\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\tnumb\frequire\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/numb.nvim" + }, + ["nvim-autopairs"] = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-autopairs" + }, + ["nvim-blame-line"] = { + config = { "\27LJ\1\2R\0\0\2\1\3\0\6+\0\0\0007\0\0\0007\0\1\0%\1\2\0>\0\2\1G\0\1\0\0\0'autocmd BufEnter * EnableBlameLine\14nvim_exec\bapi\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-blame-line" + }, + ["nvim-colorizer.lua"] = { + config = { "\27LJ\1\0027\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\14colorizer\frequire\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua" + }, + ["nvim-compe"] = { + config = { "\27LJ\1\2-\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\18plugins/compe\frequire\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-compe" + }, + ["nvim-lspconfig"] = { + config = { "\27LJ\1\2+\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\16plugins/lsp\frequire\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-lspconfig" + }, + ["nvim-lsputils"] = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-lsputils" + }, + ["nvim-tree.lua"] = { + config = { "\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22plugins/nvim-tree\frequire\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-tree.lua" + }, + ["nvim-treesitter"] = { + config = { "\27LJ\1\2\2\0\0\3\0\14\0\0214\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0>\0\2\0014\0\0\0%\1\4\0>\0\2\0027\0\2\0003\1\6\0003\2\5\0:\2\a\0013\2\b\0:\2\t\0013\2\n\0:\2\v\0013\2\f\0:\2\r\1>\0\2\1G\0\1\0\fautotag\1\0\1\venable\2\vindent\1\0\1\venable\2\14highlight\1\0\1\venable\2\26context_commentstring\1\0\0\1\0\2\19enable_autocmd\2\venable\2\28nvim-treesitter.configs\1\0\1\30enable_check_bracket_line\2\nsetup\19nvim-autopairs\frequire\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-treesitter" + }, + ["nvim-ts-autotag"] = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-ts-autotag" + }, + ["nvim-ts-context-commentstring"] = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring" + }, + ["nvim-web-devicons"] = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/nvim-web-devicons" + }, + ["packer.nvim"] = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/plenary.nvim" + }, + popfix = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/popfix" + }, + ["popup.nvim"] = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/popup.nvim" + }, + ["telescope.nvim"] = { + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/telescope.nvim" + }, + ["vim-signify"] = { + config = { "\27LJ\1\2/\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\20plugins/signify\frequire\0" }, + loaded = true, + path = "/home/gordon/.local/share/nvim/site/pack/packer/start/vim-signify" + } +} + +time([[Defining packer_plugins]], false) +-- Config for: formatter.nvim +time([[Config for formatter.nvim]], true) +try_loadstring("\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22plugins/formatter\frequire\0", "config", "formatter.nvim") +time([[Config for formatter.nvim]], false) +-- Config for: nvim-treesitter +time([[Config for nvim-treesitter]], true) +try_loadstring("\27LJ\1\2\2\0\0\3\0\14\0\0214\0\0\0%\1\1\0>\0\2\0027\0\2\0003\1\3\0>\0\2\0014\0\0\0%\1\4\0>\0\2\0027\0\2\0003\1\6\0003\2\5\0:\2\a\0013\2\b\0:\2\t\0013\2\n\0:\2\v\0013\2\f\0:\2\r\1>\0\2\1G\0\1\0\fautotag\1\0\1\venable\2\vindent\1\0\1\venable\2\14highlight\1\0\1\venable\2\26context_commentstring\1\0\0\1\0\2\19enable_autocmd\2\venable\2\28nvim-treesitter.configs\1\0\1\30enable_check_bracket_line\2\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-treesitter") +time([[Config for nvim-treesitter]], false) +-- Config for: nvim-colorizer.lua +time([[Config for nvim-colorizer.lua]], true) +try_loadstring("\27LJ\1\0027\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\14colorizer\frequire\0", "config", "nvim-colorizer.lua") +time([[Config for nvim-colorizer.lua]], false) +-- Config for: nvim-compe +time([[Config for nvim-compe]], true) +try_loadstring("\27LJ\1\2-\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\18plugins/compe\frequire\0", "config", "nvim-compe") +time([[Config for nvim-compe]], false) +-- Config for: numb.nvim +time([[Config for numb.nvim]], true) +try_loadstring("\27LJ\1\0022\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\nsetup\tnumb\frequire\0", "config", "numb.nvim") +time([[Config for numb.nvim]], false) +-- Config for: nvim-blame-line +time([[Config for nvim-blame-line]], true) +try_loadstring("\27LJ\1\2R\0\0\2\1\3\0\6+\0\0\0007\0\0\0007\0\1\0%\1\2\0>\0\2\1G\0\1\0\0\0'autocmd BufEnter * EnableBlameLine\14nvim_exec\bapi\0", "config", "nvim-blame-line") +time([[Config for nvim-blame-line]], false) +-- Config for: vim-signify +time([[Config for vim-signify]], true) +try_loadstring("\27LJ\1\2/\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\20plugins/signify\frequire\0", "config", "vim-signify") +time([[Config for vim-signify]], false) +-- Config for: kommentary +time([[Config for kommentary]], true) +try_loadstring("\27LJ\1\2^\0\0\2\0\3\0\0064\0\0\0%\1\1\0>\0\2\0027\0\2\0>\0\1\1G\0\1\0\25update_commentstring&ts_context_commentstring.internal\frequire\1\1\0\4\0\a\0\n4\0\0\0%\1\1\0>\0\2\0027\0\2\0%\1\3\0003\2\4\0001\3\5\0:\3\6\2>\0\3\1G\0\1\0\18hook_function\0\1\0\2\31multi_line_comment_strings\tauto\31single_line_comment_string\tauto\20typescriptreact\23configure_language\22kommentary.config\frequire\0", "config", "kommentary") +time([[Config for kommentary]], false) +-- Config for: galaxyline.nvim +time([[Config for galaxyline.nvim]], true) +try_loadstring("\27LJ\1\0022\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\23plugins/galaxyline\frequire\0", "config", "galaxyline.nvim") +time([[Config for galaxyline.nvim]], false) +-- Config for: nvim-lspconfig +time([[Config for nvim-lspconfig]], true) +try_loadstring("\27LJ\1\2+\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\16plugins/lsp\frequire\0", "config", "nvim-lspconfig") +time([[Config for nvim-lspconfig]], false) +-- Config for: nvim-tree.lua +time([[Config for nvim-tree.lua]], true) +try_loadstring("\27LJ\1\0021\0\0\2\0\2\0\0044\0\0\0%\1\1\0>\0\2\1G\0\1\0\22plugins/nvim-tree\frequire\0", "config", "nvim-tree.lua") +time([[Config for nvim-tree.lua]], false) +if should_profile then save_profiles() end + +end) + +if not no_errors then + 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/plugins.vim b/plugins.vim deleted file mode 100644 index 0f20302..0000000 --- a/plugins.vim +++ /dev/null @@ -1,328 +0,0 @@ -call plug#begin() -Plug 'glepnir/galaxyline.nvim' , {'branch': 'main'} -Plug 'kyazdani42/nvim-web-devicons' " for file icons -Plug 'kyazdani42/nvim-tree.lua' -Plug 'junegunn/goyo.vim' -Plug 'JoosepAlviste/nvim-ts-context-commentstring' -Plug 'tpope/vim-commentary' -Plug 'mhinz/vim-signify' -Plug 'neovim/nvim-lspconfig' -Plug 'mhartington/formatter.nvim' -Plug 'hrsh7th/nvim-compe' -Plug 'onsails/lspkind-nvim' -Plug 'MasterGordon/monokai.nvim' -Plug 'ron89/thesaurus_query.vim' -Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} -Plug 'blackcauldron7/surround.nvim' -Plug 'nvim-lua/popup.nvim' -Plug 'nvim-lua/plenary.nvim' -Plug 'nvim-telescope/telescope.nvim' -Plug 'SidOfc/mkdx' -Plug 'nacro90/numb.nvim' -Plug 'glepnir/dashboard-nvim' -Plug 'norcalli/nvim-colorizer.lua' -Plug 'davidgranstrom/nvim-markdown-preview' -Plug 'RishabhRD/popfix' -Plug 'RishabhRD/nvim-lsputils' -Plug 'akinsho/nvim-bufferline.lua' -Plug 'folke/todo-comments.nvim' -Plug 'windwp/nvim-ts-autotag' -Plug 'jiangmiao/auto-pairs' -Plug 'simrat39/symbols-outline.nvim' -Plug 'ray-x/lsp_signature.nvim' - -" post install (yarn install | npm install) then load plugin only for editing supported files -call plug#end() - -nmap f Telescope find_files - -lua require('numb').setup() - -" Theme -colorscheme monokai - -" StatusLine -luafile $HOME/.config/nvim/plugins/galaxyline.lua - -" Lsp Signature -" lua require'lsp_signature'.on_attach() - -" Dashboard -let g:dashboard_default_executive ='telescope' -nnoremap r :DashboardFindHistory - -" Startify -let g:startify_custom_header = startify#pad(split(system('cat $HOME/.config/nvim/splash'), '\n')) -lua << EOF -function _G.webDevIcons(path) - local filename = vim.fn.fnamemodify(path, ':t') - local extension = vim.fn.fnamemodify(path, ':e') - return require'nvim-web-devicons'.get_icon(filename, extension, { default = true }) -end -EOF - -function! StartifyEntryFormat() abort - return 'v:lua.webDevIcons(absolute_path) . " " . entry_path' -endfunction - -" commentstring -lua << EOF -require'nvim-treesitter.configs'.setup { - context_commentstring = { - enable = true - } -} -EOF - -" Outline -noremap o :SymbolsOutline - -" Bufferline -lua < :lua require"bufferline".go_to_buffer(1) -noremap :lua require"bufferline".go_to_buffer(2) -noremap :lua require"bufferline".go_to_buffer(3) -noremap :lua require"bufferline".go_to_buffer(4) -noremap :lua require"bufferline".go_to_buffer(5) -noremap :lua require"bufferline".go_to_buffer(6) -noremap :lua require"bufferline".go_to_buffer(7) -noremap :lua require"bufferline".go_to_buffer(8) -noremap :lua require"bufferline".go_to_buffer(9) -noremap :lua require"bufferline".go_to_buffer(10) -noremap -noremap -noremap -noremap - -" colorizer -lua <p :Prettier - -" Surround -lua require"surround".setup{} - -" NVim Tree Config -let g:nvim_tree_auto_close = 1 -let g:nvim_tree_ignore = [ '.git', 'node_modules', '.cache' ] -let g:nvim_tree_indent_markers = 1 -map :NvimTreeFindFile - -let g:nvim_tree_icons = { - \ 'default': '', - \ 'symlink': '', - \ 'git': { - \ 'unstaged': "✗", - \ 'staged': "✓", - \ 'unmerged': "", - \ 'renamed': "➜", - \ 'untracked': "★" - \ }, - \ 'folder': { - \ 'default': "", - \ 'open': "", - \ 'symlink': "", - \ } - \ } - -let g:nvim_tree_disable_default_keybindings = 1 - -lua <", "o", "<2-LeftMouse>"}, cb = tree_cb("edit") }, - { key = {"<2-RightMouse>", ""}, cb = tree_cb("cd") }, - { key = "s", cb = tree_cb("vsplit") }, - { key = "i", cb = tree_cb("split") }, - { key = "t", cb = tree_cb("tabnew") }, - { key = "<", cb = tree_cb("prev_sibling") }, - { key = ">", cb = tree_cb("next_sibling") }, - { key = "P", cb = tree_cb("parent_node") }, - { key = "", cb = tree_cb("close_node") }, - { key = "", cb = tree_cb("close_node") }, - { key = "", cb = tree_cb("preview") }, - { key = "K", cb = tree_cb("first_sibling") }, - { key = "J", cb = tree_cb("last_sibling") }, - { key = "I", cb = tree_cb("toggle_ignored") }, - { key = "I", cb = tree_cb("toggle_dotfiles") }, - { key = "r", cb = tree_cb("refresh") }, - { key = "c", cb = tree_cb("create") }, - { key = "d", cb = tree_cb("remove") }, - { key = "m", cb = tree_cb("rename") }, - { key = "", cb = tree_cb("full_rename") }, - { key = "x", cb = tree_cb("cut") }, - { key = "c", cb = tree_cb("copy") }, - { key = "p", cb = tree_cb("paste") }, - { key = "y", cb = tree_cb("copy_name") }, - { key = "Y", cb = tree_cb("copy_path") }, - { key = "gy", cb = tree_cb("copy_absolute_path") }, - { key = "[c", cb = tree_cb("prev_git_item") }, - { key = "]c", cb = tree_cb("next_git_item") }, - { key = "-", cb = tree_cb("dir_up") }, - { key = "q", cb = tree_cb("close") }, - { key = "?", cb = tree_cb("toggle_help") }, - } -EOF - -" TreeSitter -lua <s :ThesaurusQueryReplaceCurrentWord -let g:tq_language=['en', 'de'] -let g:tq_enabled_backends=["openthesaurus_de", "woxikon_de", "openoffice_en", "datamuse_com"] - -" Tagalong -let g:tagalong_verbose = 1 -let g:tagalong_filetypes = ['html', 'xml', 'jsx', 'tsx', 'eruby', 'ejs', 'eco', 'php', 'htmldjango', 'javascriptreact', 'typescriptreact', 'typescript.tsx', 'javascript.jsx', 'mako'] -let g:tagalong_additional_filetypes = ['typescript.tsx', 'javascript.jsx', 'mako'] - -" coc.nvim -" source plugins/coc.vim - -" nvim-lsp -luafile $HOME/.config/nvim/plugins/lsp.lua - -" Formatter -luafile $HOME/.config/nvim/plugins/formatter.lua - -" nvim.compe -luafile $HOME/.config/nvim/plugins/compe.lua -inoremap compe#complete() -inoremap compe#confirm('') -inoremap compe#close('') -inoremap compe#scroll({ 'delta': +4 }) -inoremap compe#scroll({ 'delta': -4 }) - -" lspkind -lua <