diff --git a/init.lua b/init.lua index 8178c55..b13e90e 100755 --- a/init.lua +++ b/init.lua @@ -1,19 +1,156 @@ -require('settings') +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +vim.g.mapleader = ',' +vim.g.localmapleader = ',' + +require('lazy').setup('plugins') require('keymaps') -require('colors') -require('plugins/plugins') -require('plugins/nvim-tree') -require('plugins/indent-blankline') -require('plugins/feline') -require('plugins/nvim-cmp') -require('plugins/nvim-lspconfig') -require('plugins/nvim-treesitter') -require('plugins/alpha-nvim') -require('plugins/telescope') -require('plugins/symbols-outline') -require('plugins/mason-lspconfig') -require('plugins/snippets') -require('plugins/neoscroll') -require('plugins/null-ls') -require('plugins/nvim-mapper') -require('plugins/todo-comments') + +-- General Neovim settings and configuration +----------------------------------------------------------- + +----------------------------------------------------------- +-- Neovim API aliases +----------------------------------------------------------- +local fn = vim.fn -- Call Vim functions +local cmd = vim.cmd -- Execute Vim commands +local exec = vim.api.nvim_exec -- Execute Vimscript +local g = vim.g -- Global variables +local opt = vim.opt -- Set options (global/buffer/windows-scoped) +local o = vim.o + +----------------------------------------------------------- +-- General +----------------------------------------------------------- +g.mapleader = ',' -- Change leader to a comma +opt.mouse = 'a' -- Enable mouse support +opt.clipboard = 'unnamedplus' -- Copy/paste to system clipboard +opt.swapfile = false -- Don't use swapfile +opt.shadafile = "NONE" +opt.shadafile = "" +opt.shell = "/bin/zsh" +opt.updatetime = 200 +opt.cursorline = true +g.markdown_folding = 1 +opt.spell=true +opt.spelllang = 'en_us' +cmd [[ autocmd BufWritePre * :%s/\s\+$//e ]] +vim.api.nvim_set_hl(0, "ColorColumn", {guibg=lightmagenta}) +----------------------------------------------------------- +-- Neovim UI +----------------------------------------------------------- +opt.number = true -- Show line number +opt.relativenumber = true -- Show Current Line with Relative numbers above and below cursor. +opt.showmatch = true -- Highlight matching parenthesis +opt.foldmethod = 'syntax' -- Enable folding (default 'foldmarker') +opt.colorcolumn = '120' -- Line length marker at 80 columns +opt.textwidth = 120 +opt.splitright = true -- Vertical split to the right +opt.splitbelow = true -- Horizontal split to the bottom +opt.ignorecase = true -- Ignore case letters when search +opt.smartcase = true -- Ignore lowercase for the whole pattern +opt.linebreak = true -- Wrap on word boundary +opt.signcolumn = 'yes:2' -- Signs column always on, minimum 2. +opt.wrap = true + +----------------------------------------------------------- +-- Memory, CPU +----------------------------------------------------------- +opt.hidden = true -- Enable background buffers +opt.history = 100 -- Remember N lines in historma:y +opt.lazyredraw = true -- Faster scrolling +opt.synmaxcol = 240 -- Max column for syntax highlight +----------------------------------------------------------- +-- Colorscheme +----------------------------------------------------------- +opt.termguicolors = true -- Enable 24-bit RGB colors +----------------------------------------------------------- +-- Tabs, indent +----------------------------------------------------------- +opt.expandtab = true -- Use spaces instead of tabs +opt.shiftwidth = 1 -- Shift 4 spaces when tab +opt.tabstop = 1 -- 1 tab == 4 spaces +opt.smartindent = true -- Autoindent new lines +----------------------------------------------------------- +-- Glow Settings +----------------------------------------------------------- +g.glow_binary_path = '/bin' +g.glow_border = 'rounded' +g.glow_width = 120 +g.glow_use_pager = true +g.glow_style = 'dark' +----------------------------------------------------------- +-- MKDX Settings, mkdx#settings. +----------------------------------------------------------- +-- 2 spaces for selected filetypes +cmd [[ + autocmd FileType md,liquid,xml,html,xhtml,css,scss,javascript,lua,yaml setlocal shiftwidth=2 tabstop=8 noexpandtab +]] + + +local disabled_built_ins = { + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "gzip", + "zip", + "zipPlugin", + "tar", + "tarPlugin", + "getscript", + "getscriptPlugin", + "vimball", + "vimballPlugin", + "2html_plugin", + "logipat", + "rrhelper", + "spellfile_plugin", + "matchit" +} + +for _, plugin in pairs(disabled_built_ins) do + vim.g["loaded_" .. plugin] = 1 +end + +--[[ +Deletes all trailing whitespaces in a file if it's not binary nor a diff. +]]-- +function _G.trim_trailing_whitespaces() + if not o.binary and o.filetype ~= 'diff' then + local current_view = fn.winsaveview() + cmd([[keeppatterns %s/\s\+$//e]]) + fn.winrestview(current_view) + end +end + + +-- require('settings') +--require('keymaps') +--require('plugins/plugins'), +--require('plugins/nvim-tree'), +--require('plugins/indent-blankline'), +--require('plugins/feline'), +--require('plugins/nvim-cmp'), +--require('plugins/nvim-lspconfig'), +--require('plugins/nvim-treesitter'), +--require('plugins/alpha-nvim'), +--require('plugins/telescope'), +--require('plugins/symbols-outline'), +--require('plugins/mason-lspconfig'), +--require('plugins/snippets'), +--require('plugins/neoscroll'), +--require('plugins/null-ls'), +--require('plugins/nvim-mapper'), +--require('plugins/todo-comments') diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..8a01834 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,61 @@ +{ + "LuaSnip": { "branch": "master", "commit": "563827f00bb4fe43269e3be653deabc0005f1302" }, + "alpha-nvim": { "branch": "main", "commit": "0349fc0aa0c1d940ec3be395cb110483b416bc84" }, + "cellular-automaton.nvim": { "branch": "main", "commit": "679943b8e1e5ef79aaeeaf4b00782c52eb4e928f" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, + "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "colorschemes": { "branch": "master", "commit": "e29f32990d6e2c7c3a4763326194fbd847b49dac" }, + "dracula.nvim": { "branch": "main", "commit": "798274ba3c454a9aa3cd71f95a86ea55cbbbb142" }, + "feline.nvim": { "branch": "master", "commit": "d48b6f92c6ccdd6654c956f437be49ea160b5b0c" }, + "friendly-snippets": { "branch": "main", "commit": "80597f3ea824946c87fd29f82b5ed4f24ef473f3" }, + "gitsigns.nvim": { "branch": "main", "commit": "f29f0b22fd66c910b892aae3bc18a4872c002738" }, + "glow.nvim": { "branch": "main", "commit": "2bb4afb6e9dbc93993a1d7d4168dac08c74590ac" }, + "indent-blankline.nvim": { "branch": "master", "commit": "8299fe7703dfff4b1752aeed271c3b95281a952d" }, + "lazy.nvim": { "branch": "main", "commit": "bab744565e9d8d743b1889c66707aa2e8018ae86" }, + "lsp-colors.nvim": { "branch": "main", "commit": "d0b245232aeb197bbd097111d8b69621b0671edb" }, + "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7a97a77eee486ae152d2c559a459eda7c8aa12aa" }, + "mason.nvim": { "branch": "main", "commit": "14ae1ca58440b158a0a35cf90773013caddf788a" }, + "mini.fuzzy": { "branch": "stable", "commit": "292ecf747cf7f7af12d6804389ee7ddafaad2bf9" }, + "mini.move": { "branch": "main", "commit": "78fdbc1a59b55ee729d6cd053968e398346687fe" }, + "mini.pairs": { "branch": "stable", "commit": "fec9aba50912d8c3d92d07d6a77952de84f8d7ad" }, + "mini.trailspace": { "branch": "main", "commit": "cfbe50f17e92868a5cb65d7fcedae4340553f5a2" }, + "mkdnflow.nvim": { "branch": "main", "commit": "941c3a4aee26b28573ac3b67ace2dfd84fc7964c" }, + "monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" }, + "neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" }, + "neovim": { "branch": "main", "commit": "845a6ad5443e3559dde42910c4523a5835c9233b" }, + "nord.nvim": { "branch": "main", "commit": "70df2b61de21b953fd577f292a973cd22e0ca686" }, + "null-ls.nvim": { "branch": "main", "commit": "60b4a7167c79c7d04d1ff48b55f2235bf58158a7" }, + "nvim": { "branch": "main", "commit": "c5ed88194ae1d581d3083725a0dc7c90dd3446be" }, + "nvim-cmp": { "branch": "main", "commit": "cfafe0a1ca8933f7b7968a287d39904156f2c57d" }, + "nvim-dap": { "branch": "master", "commit": "401f5f22b2d7f9bdbb9294d0235136091458816a" }, + "nvim-dap-python": { "branch": "master", "commit": "d4400d075c21ed8fb8e8ac6a5ff56f58f6e93531" }, + "nvim-lspconfig": { "branch": "master", "commit": "b5bb6e3d7c775c241726d1ef564902263e93e2cd" }, + "nvim-mapper": { "branch": "main", "commit": "7585479199ad7c3fdfed47ae79d26198f948cfc5" }, + "nvim-notify": { "branch": "master", "commit": "bdd647f61a05c9b8a57c83b78341a0690e9c29d7" }, + "nvim-tree.lua": { "branch": "master", "commit": "02fdc262eba188198a7deb2117b3b996e6763d65" }, + "nvim-treesitter": { "branch": "master", "commit": "f6df07be122de665fb363476cc3680c90f5bdf05" }, + "nvim-web-devicons": { "branch": "master", "commit": "ade34ca7d19543904b28b903e606be8930fb9ee3" }, + "plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" }, + "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, + "prettier.nvim": { "branch": "main", "commit": "918b99f5ddd7a56395fd393767ab6a3c15a50789" }, + "sidebar.nvim": { "branch": "main", "commit": "990ce5f562c9125283ccac5473235b1a56fea6dc" }, + "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "304508fb7bea78e3c0eeddd88c4837501e403ae8" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, + "telescope-live-grep-args.nvim": { "branch": "master", "commit": "7de3baef1ec4fb77f7a8195fe87bebd513244b6a" }, + "telescope.nvim": { "branch": "master", "commit": "b79cd6c88b3d96b0f49cb7d240807cd59b610cd8" }, + "tmux.nvim": { "branch": "main", "commit": "feafcf8f48c49c720ee64e745648d69d42cb9c5a" }, + "todo-comments.nvim": { "branch": "main", "commit": "74c7d28cb50b0713c881ef69bcb6cdd77d8907d1" }, + "tokyonight.nvim": { "branch": "main", "commit": "a0abe53df53616d13da327636cb0bcac3ea7f5af" }, + "trouble.nvim": { "branch": "main", "commit": "556ef3089709a6e253df1e500381fec5eb48e48a" }, + "vem-tabline": { "branch": "master", "commit": "8399cf77603b6c2110a39ea3efe1053f64b057aa" }, + "vim-wakatime": { "branch": "master", "commit": "ee4ab57adf62a309aeef383a2da23b6e48e5ae50" }, + "vista.vim": { "branch": "master", "commit": "33774aff5d8b224f24c2e4c6015c613c1a17bf74" }, + "which-key.nvim": { "branch": "main", "commit": "5224c261825263f46f6771f1b644cae33cd06995" } +} \ No newline at end of file diff --git a/lua/colors.lua b/lua/colors.lua deleted file mode 100644 index 7ce213b..0000000 --- a/lua/colors.lua +++ /dev/null @@ -1,63 +0,0 @@ ------------------------------------------------------------ --- Color schemes configuration file ------------------------------------------------------------ - --- Import color scheme with: ---- require('colors').colorscheme_name - -local M = {} -M.dracula_nvim = { - bg = '#282A36', - fg = '#F8F8F2', - selection = '#44475A', - comment = '#6272A4', - red = '#FF5555', - orange = '#FFB86C', - yellow = '#F1FA8C', - green = '#50fa7b', - purple = '#BD93F9', - cyan = '#8BE9FD', - pink = '#FF79C6', - bright_red = '#FF6E6E', - bright_green = '#69FF94', - bright_yellow = '#FFFFA5', - bright_blue = '#D6ACFF', - bright_magenta = '#FF92DF', - bright_cyan = '#A4FFFF', - bright_white = '#FFFFFF', - menu = '#21222C', - visual = '#3E4452', - gutter_fg = '#4B5263', - nontext = '#3B4048', -} - - -- Theme: Monokai -M.monokai = { - bg = '#202328', --default: #272a30 - fg = '#f8f8f0', - pink = '#f92672', - green = '#a6e22e', - cyan = '#66d9ef', - yellow = '#e6db74', - orange = '#fd971f', - purple = '#ae81ff', - red = '#e95678', -} - --- Theme: Rosé Pine (main) ---- See: https://github.com/rose-pine/neovim/blob/main/lua/rose-pine/palette.lua ---- color names are adapted to the format above -M.rose_pine = { - bg = '#111019', --default: #191724 - fg = '#e0def4', - gray = '#908caa', - pink = '#eb6f92', - green = '#9ccfd8', - cyan = '#31748f', - yellow = '#f6c177', - orange = '#2a2837', - purple = '#c4a7e7', - red = '#ebbcba', -} - -return M diff --git a/lua/plugins/alpha-nvim.lua b/lua/plugins/alpha-nvim.lua deleted file mode 100644 index 9db83fe..0000000 --- a/lua/plugins/alpha-nvim.lua +++ /dev/null @@ -1,53 +0,0 @@ ------------------------------------------------------------ --- Dashboard configuration file ------------------------------------------------------------ - --- Plugin: alpha-nvim --- url: https://github.com/goolord/alpha-nvim - --- For configuration examples see: https://github.com/goolord/alpha-nvim/discussions/16 - - -local alpha = require 'alpha' -local dashboard = require 'alpha.themes.dashboard' - --- Footer -local function footer() - local version = vim.version() - local print_version = "v" .. version.major .. '.' .. version.minor .. '.' .. version.patch - local datetime = os.date('%Y/%m/%d %H:%M:%S') - - return print_version .. ' ' .. datetime -end - --- Banner -local banner = { -" ", -" █████ █████ ██████ █████ ███ ", -"░░███ ░░███ ░░██████ ░░███ ░███ ", -" ░███ ░███ ██████ █████ ████ ░███░███ ░███ ██████ ████████ █████████████ ░███ ", -" ░███████████ ███░░███░░███ ░███ ░███░░███░███ ███░░███░░███░░███░░███░░███░░███░███ ", -" ░███░░░░░███ ░███████ ░███ ░███ ░███ ░░██████ ░███ ░███ ░███ ░░░ ░███ ░███ ░███░███ ", -" ░███ ░███ ░███░░░ ░███ ░███ ░███ ░░█████ ░███ ░███ ░███ ░███ ░███ ░███░░░ ", -" █████ █████░░██████ ░░███████ █████ ░░█████░░██████ █████ █████░███ ████████ ", -"░░░░░ ░░░░░ ░░░░░░ ░░░░░███ ░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░ ░░░░░░░░ ", -" ███ ░███ ", -" ░░██████ ", -" ░░░░░░ ", -} - - -dashboard.section.header.val = banner - --- Menu -dashboard.section.buttons.val = { - dashboard.button('e', ' New file', ':ene startinsert'), - dashboard.button('f', ' Find file', ':Telescope file_browser'), - dashboard.button('s', '⋅ Find Word', ':Telescope live_grep'), - dashboard.button('u', ' Update plugins', ':PackerUpdate'), - dashboard.button('q', ' Quit', ':qa'), -} - -dashboard.section.footer.val = footer() - -alpha.setup(dashboard.config) diff --git a/lua/plugins/alpha.lua b/lua/plugins/alpha.lua new file mode 100644 index 0000000..4608f93 --- /dev/null +++ b/lua/plugins/alpha.lua @@ -0,0 +1,55 @@ +----------------------------------------------------------- +-- Dashboard configuration file +----------------------------------------------------------- + +-- Plugin: alpha-nvim +-- url: https://github.com/goolord/alpha-nvim + +-- For configuration examples see: https://github.com/goolord/alpha-nvim/discussions/16 + +return { + "goolord/alpha-nvim", + dependencies = { + "kyazdani42/nvim-web-devicons", + }, + config = function () + local alpha = require 'alpha' + local dashboard = require 'alpha.themes.dashboard' + -- Banner + dashboard.section.header.val = { + + [[ ]], + [[ █████ █████ ██████ █████ ███ ]], + [[ ░░███ ░░███ ░░██████ ░░███ ░███ ]], + [[ ░███ ░███ ██████ █████ ████ ░███░███ ░███ ██████ ████████ █████████████ ░███ ]], + [[ ░███████████ ███░░███░░███ ░███ ░███░░███░███ ███░░███░░███░░███░░███░░███░░██ ]], + [[ ░███░░░░░███ ░███████ ░███ ░███ ░███ ░░██████ ░███ ░███ ░███ ░░░ ░███ ░███ ░███░███ ]], + [[ ░███ ░███ ░███░░░ ░███ ░███ ░███ ░░█████ ░███ ░███ ░███ ░███ ░███ ░███░░░ ]], + [[ █████ █████░░██████ ░░███████ █████ ░░█████░░██████ █████ █████░███ ████████ ]], + [[ ░░░░░ ░░░░░ ░░░░░░ ░░░░░███ ░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░ ░░░░░░░░ ]], + [[ ███ ░███ ]], + [[ ░░██████ ]], + [[ ░░░░░░ ]], + } + + -- Menu + dashboard.section.buttons.val = { + dashboard.button('e', ' New file', ':ene startinsert'), + dashboard.button('f', ' Find file', ':Telescope file_browser'), + dashboard.button('s', '⋅ Find Word', ':Telescope live_grep'), + dashboard.button('u', ' Update plugins', ':PackerUpdate'), + dashboard.button('q', ' Quit', ':qa'), + } + + local handle = io.popen('fortune') + -- Footer + local function footer() + local version = vim.version() + local print_version = "v" .. version.major .. '.' .. version.minor .. '.' .. version.patch + local datetime = os.date('%Y/%m/%d %H:%M:%S') + return print_version .. ' ' .. datetime + end + dashboard.section.footer.val = footer() + alpha.setup(dashboard.config) + end +} diff --git a/lua/plugins/feline.lua b/lua/plugins/feline.lua deleted file mode 100644 index ea3efc7..0000000 --- a/lua/plugins/feline.lua +++ /dev/null @@ -1,257 +0,0 @@ ----------------------------------------------------------- --- Statusline configuration file ------------------------------------------------------------ - --- Plugin: feline.nvim --- url: https://github.com/famiu/feline.nvim - ---- For the configuration see the Usage section: ---- https://github.com/famiu/feline.nvim/blob/master/USAGE.md - ---- Thanks to ibhagwan for the example to follow: ---- https://github.com/ibhagwan/nvim-lua - - -local colors = require('colors').dracula_nvim - -local vi_mode_colors = { - NORMAL = colors.cyan, - INSERT = colors.green, - VISUAL = colors.yellow, - OP = colors.cyan, - BLOCK = colors.cyan, - REPLACE = colors.red, - ['V-REPLACE'] = colors.red, - ENTER = colors.orange, - MORE = colors.orange, - SELECT = colors.yellow, - COMMAND = colors.pink, - SHELL = colors.pink, - TERM = colors.pink, - NONE = colors.purple -} --- Providers (LSP, vi_mode) -local lsp = require 'feline.providers.lsp' -local vi_mode_utils = require 'feline.providers.vi_mode' - --- LSP diagnostic -local lsp_get_diag = function(str) - local count = vim.lsp,diagnostic.get_count(0, str) - return (count > 0) and ' '..count..' ' or '' -end - --- My components -local comps = { - -- vi_mode -> NORMAL, INSERT.. - vi_mode = { - left = { - provider = function() - local label = ' '..vi_mode_utils.get_vim_mode()..' ' - return label - end, - hl = function() - local set_color = { - name = vi_mode_utils.get_mode_highlight_name(), - fg = colors.bg, - bg = vi_mode_utils.get_mode_color(), - style = 'bold', - } - return set_color - end, - left_sep = ' ', - right_sep = ' ', - } - }, - -- Parse file information: - file = { - -- File name - info = { - provider = { - name = 'file_info', - opts = { - type = 'relative', - file_modified_icon = '', - } - }, - hl = { fg = colors.cyan }, - icon = '', - }, - -- File type - type = { - provider = function() - local type = vim.bo.filetype:lower() - local extension = vim.fn.expand '%:e' - local icon = require('nvim-web-devicons').get_icon(extension) - if icon == nil then - icon = ' ' - end - return ' ' .. icon .. ' ' .. type - end, - hl = { fg = colors.fg }, - left_sep = ' ', - righ_sep = ' ', - }, - -- Operating system - os = { - provider = function() - local os = vim.bo.fileformat:lower() - local icon - if os == 'unix' then - icon = '  ' - elseif os == 'mac' then - icon = '  ' - else - icon = '  ' - end - return icon .. os - end, - hl = { fg = colors.fg }, - --left_sep = ' ', - right_sep = ' ', - }, - -- Line-column - position = { - provider = { name = 'position' }, - hl = { - fg = colors.fg, - style = 'bold', - }, - left_sep = ' ', - right_sep = ' ', - }, - -- Cursor position in % - line_percentage = { - provider = { name = 'line_percentage' }, - hl = { - fg = colors.cyan, - style = 'bold', - }, - left_sep = ' ', - right_sep = ' ', - }, - -- Simple scrollbar - scroll_bar = { - provider = { name = 'scroll_bar' }, - hl = { fg = colors.fg }, - left_sep = ' ', - right_sep = ' ', - }, - }, - -- LSP info - diagnos = { - err = { - provider = 'diagnostic_errors', - icon = '⚠ ', - hl = { fg = colors.red }, - left_sep = ' ', - }, - warn = { - provider = 'diagnostic_warnings', - icon = ' ', - hl = { fg = colors.yellow }, - left_sep = ' ', - }, - info = { - provider = 'diagnostic_info', - icon = ' ', - hl = { fg = colors.green }, - left_sep = ' ', - }, - hint = { - provider = 'diagnostic_hints', - icon = ' ', - hl = { fg = colors.cyan }, - left_sep = ' ', - }, - }, - lsp = { - name = { - provider = 'lsp_client_names', - icon = '  ', - hl = { fg = colors.pink }, - left_sep = ' ', - right_sep = ' ', - } - }, - -- git info - git = { - branch = { - provider = 'git_branch', - icon = ' ', - hl = { fg = colors.pink }, - left_sep = ' ', - }, - add = { - provider = 'git_diff_added', - icon = '  ', - hl = { fg = colors.green }, - left_sep = ' ', - }, - change = { - provider = 'git_diff_changed', - icon = '  ', - hl = { fg = colors.orange }, - left_sep = ' ', - }, - remove = { - provider = 'git_diff_removed', - icon = '  ', - hl = { fg = colors.red }, - left_sep = ' ', - } - } -} - --- Get active/inactive components ---- see: https://github.com/famiu/feline.nvim/blob/master/USAGE.md#components -local components = { - active = {}, - inactive = {}, -} - -table.insert(components.active, {}) -table.insert(components.active, {}) -table.insert(components.inactive, {}) -table.insert(components.inactive, {}) - --- Right section -table.insert(components.active[1], comps.vi_mode.left) -table.insert(components.active[1], comps.file.info) -table.insert(components.active[1], comps.git.branch) -table.insert(components.active[1], comps.git.add) -table.insert(components.active[1], comps.git.change) -table.insert(components.active[1], comps.git.remove) -table.insert(components.inactive[1], comps.file.info) - --- Left Section -table.insert(components.active[2], comps.diagnos.err) -table.insert(components.active[2], comps.diagnos.warn) -table.insert(components.active[2], comps.diagnos.hint) -table.insert(components.active[2], comps.diagnos.info) -table.insert(components.active[2], comps.lsp.name) -table.insert(components.active[2], comps.file.type) -table.insert(components.active[2], comps.file.os) -table.insert(components.active[2], comps.file.position) -table.insert(components.active[2], comps.file.line_percentage) - --- Call feline -require('feline').setup { - theme = { - bg = colors.bg, - fg = colors.fg, - }, - components = components, - vi_mode_colors = vi_mode_colors, - force_inactive = { - filetypes = { - '^NvimTree$', - '^packer$', - '^vista$', - '^help$', - }, - buftypes = { - '^terminal$' - }, - bufnames = {}, - }, -} diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index f580ecc..a109509 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,42 +1,48 @@ -require('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, -- Toggle with `:Gitsigns toggle_signs` - numhl = false, -- Toggle with `:Gitsigns toggle_numhl` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` - word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` - watch_gitdir = { - interval = 1000, - follow_files = true - }, - attach_to_untracked = true, - current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = false, - }, - current_line_blame_formatter = ', - ', - sign_priority = 1, - update_debounce = 100, - status_formatter = nil, -- Use default - max_file_length = 40000, - preview_config = { - -- Options passed to nvim_open_win - border = 'double', - style = 'normal', - relative = 'cursor', - row = 0, - col = 2 - }, - yadm = { - enable = false - }, +return -- Signs for Git Status Information + { + 'lewis6991/gitsigns.nvim', + config = function() + require('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, -- Toggle with `:Gitsigns toggle_signs` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { + interval = 1000, + follow_files = true + }, + attach_to_untracked = true, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, + current_line_blame_formatter = ', - ', + sign_priority = 1, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, + preview_config = { + -- Options passed to nvim_open_win + border = 'double', + style = 'normal', + relative = 'cursor', + row = 0, + col = 2 + }, + yadm = { + enable = false + }, + } + end } diff --git a/lua/plugins/headlines.lua b/lua/plugins/headlines.lua deleted file mode 100644 index 6c3aed1..0000000 --- a/lua/plugins/headlines.lua +++ /dev/null @@ -1,124 +0,0 @@ -require("headlines").setup { - markdown = { - query = vim.treesitter.parse_query( - "markdown", - [[ - (atx_heading [ - (atx_h1_marker) - (atx_h2_marker) - (atx_h3_marker) - (atx_h4_marker) - (atx_h5_marker) - (atx_h6_marker) - ] @headline) - - (thematic_break) @dash - - (fenced_code_block) @codeblock - - (block_quote_marker) @quote - (block_quote (paragraph (inline (block_continuation) @quote))) - ]] - ), - headline_highlights = { "Headline" }, - codeblock_highlight = "CodeBlock", - dash_highlight = "Dash", - dash_string = "-", - quote_highlight = "Quote", - quote_string = "┃", - fat_headlines = true, - }, - rmd = { - query = vim.treesitter.parse_query( - "markdown", - [[ - (atx_heading [ - (atx_h1_marker) - (atx_h2_marker) - (atx_h3_marker) - (atx_h4_marker) - (atx_h5_marker) - (atx_h6_marker) - ] @headline) - - (thematic_break) @dash - - (fenced_code_block) @codeblock - - (block_quote_marker) @quote - (block_quote (paragraph (inline (block_continuation) @quote))) - ]] - ), - treesitter_language = "markdown", - headline_highlights = { "Headline" }, - codeblock_highlight = "CodeBlock", - dash_highlight = "Dash", - dash_string = "-", - quote_highlight = "Quote", - quote_string = "┃", - fat_headlines = true, - }, - norg = { - query = vim.treesitter.parse_query( - "norg", - [[ - [ - (heading1_prefix) - (heading2_prefix) - (heading3_prefix) - (heading4_prefix) - (heading5_prefix) - (heading6_prefix) - ] @headline - - (weak_paragraph_delimiter) @dash - (strong_paragraph_delimiter) @doubledash - - ((ranged_tag - name: (tag_name) @_name - (#eq? @_name "code") - ) @codeblock (#offset! @codeblock 0 0 1 0)) - - (quote1_prefix) @quote - ]] - ), - headline_highlights = { "Headline" }, - codeblock_highlight = "CodeBlock", - dash_highlight = "Dash", - dash_string = "-", - doubledash_highlight = "DoubleDash", - doubledash_string = "=", - quote_highlight = "Quote", - quote_string = "┃", - fat_headlines = true, - }, - org = { - query = vim.treesitter.parse_query( - "org", - [[ - (headline (stars) @headline) - - ( - (expr) @dash - (#match? @dash "^-----+$") - ) - - (block - name: (expr) @_name - (#eq? @_name "SRC") - ) @codeblock - - (paragraph . (expr) @quote - (#eq? @quote ">") - ) - ]] - ), - headline_highlights = { "Headline" }, - codeblock_highlight = "CodeBlock", - dash_highlight = "Dash", - dash_string = "-", - quote_highlight = "Quote", - quote_string = "┃", - fat_headlines = true, - }, -} diff --git a/lua/plugins/indent-blankline.lua b/lua/plugins/indent-blankline.lua deleted file mode 100644 index edbd6c0..0000000 --- a/lua/plugins/indent-blankline.lua +++ /dev/null @@ -1,42 +0,0 @@ ------------------------------------------------------------ --- Indent line configuration file ------------------------------------------------------------ - --- Plugin: indent-blankline --- url: https://github.com/lukas-reineke/indent-blankline.nvim - -vim.opt.termguicolors = true -vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]] -vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]] -vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]] -vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]] -vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]] -vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]] - -vim.opt.list = true -vim.opt.listchars:append "space:⋅" -vim.opt.listchars:append "eol: " - -require("indent_blankline").setup { - space_char_blankline = " ", - char_highlight_list = { - "IndentBlanklineIndent1", - "IndentBlanklineIndent2", - "IndentBlanklineIndent3", - "IndentBlanklineIndent4", - "IndentBlanklineIndent5", - "IndentBlanklineIndent6", - }, -} ---[[ - -vim.opt.list = true -vim.opt.listchars:append "space:⋅" -vim.opt.listchars:append "eol:↴" - -require("indent_blankline").setup { - space_char_blankline = " ", - show_current_context = true, - show_current_context_start = true, -} ---]] diff --git a/lua/plugins/plugins.lua b/lua/plugins/init.lua similarity index 69% rename from lua/plugins/plugins.lua rename to lua/plugins/init.lua index a47d0d8..e23bc0e 100755 --- a/lua/plugins/plugins.lua +++ b/lua/plugins/init.lua @@ -1,12 +1,4 @@ -local cmd = vim.cmd -cmd [[packadd packer.nvim]] - -return require'packer'.startup(function() - -- Needed to run Packer, it can run itself - use 'wbthomason/packer.nvim' - - -- Wakatime Tracking - use 'wakatime/vim-wakatime' +return { ---------------------------------------------------------------- -- LSP and Autocomplete Plugins @@ -14,25 +6,25 @@ return require'packer'.startup(function() ----------------------------------------------------------------- -- Easy Way to install Language Servers - use { 'williamboman/mason.nvim', + { 'williamboman/mason.nvim', config = function() require("mason").setup() end -} - use 'williamboman/mason-lspconfig.nvim' - use 'neovim/nvim-lspconfig' +}, + 'williamboman/mason-lspconfig.nvim', + 'neovim/nvim-lspconfig', -- Manage all your Keymaps! - use { + { "lazytanuki/nvim-mapper", config = function() require("nvim-mapper").setup{} end, before = "telescope.nvim" -} +}, -- Neovim Autocomplete with LSP - use { + { 'hrsh7th/nvim-cmp', - requires = { + dependencies = { 'neovim/nvim-lspconfig', 'L3MON4D3/LuaSnip', 'hrsh7th/cmp-nvim-lsp', @@ -44,75 +36,75 @@ return require'packer'.startup(function() 'hrsh7th/cmp-nvim-lsp-signature-help', 'f3fora/cmp-spell', } - } - use ({ + }, + { 'L3MON4D3/LuaSnip', tag = "v1.1.0", wants = { "friendly-snippets", "vim-snippets" }, - }) + }, -- Treesitter interface - use { + { 'nvim-treesitter/nvim-treesitter', - run = function() require('nvim-treesitter.install').update({ with_sync = true }) end, - } + build = function() require('nvim-treesitter.install').update({ with_sync = true }) end, + }, -- Null-LS - use({ + { "jose-elias-alvarez/null-ls.nvim", config = function() require("null-ls").setup({ debug = true, }) end, - requires = { "nvim-lua/plenary.nvim" }, -}) + dependencies = { "nvim-lua/plenary.nvim" }, +}, ------------------------------------------------------------ -- General Functionality ------------------------------------------------------------ -- Change Color of virtual column bar - -- use "lukas-reineke/virt-column.nvim" + -- 'lukas-reineke/virt-column.nvim' -- Tmux Navigation - use({ + { "aserowy/tmux.nvim", config = function() require("tmux").setup() end -}) +}, -- Find & Search LSP Tags - use 'liuchengxu/vista.vim' + 'liuchengxu/vista.vim', -- Snippets - use 'rafamadriz/friendly-snippets' + 'rafamadriz/friendly-snippets', -- Rename and Work with Buffer & Tabs - use 'pacha/vem-tabline' + 'pacha/vem-tabline', -- Nvim Tree File Manager on the Left - use 'nvim-tree/nvim-tree.lua' + 'nvim-tree/nvim-tree.lua', -- Trouble Shows Errors with Files. - use { + { "folke/trouble.nvim", - requires = "nvim-tree/nvim-web-devicons", + dependencies = "kyazdani42/nvim-web-devicons", config = function() require("trouble").setup { } end - } + }, -- Which Key - use { + { "folke/which-key.nvim", config = function() require("which-key").setup { } end - } + }, -- Top Right Notify Pop Up - use 'rcarriga/nvim-notify' + 'rcarriga/nvim-notify', -- echasnovski Mini Modules (Selected) - use { + { 'echasnovski/mini.move', config = function() require('mini.move').setup({ @@ -129,26 +121,26 @@ return require'packer'.startup(function() } }) end - } - use 'echasnovski/mini.trailspace' - use { + }, + 'echasnovski/mini.trailspace', + { 'echasnovski/mini.pairs', branch = 'stable', config = function() require('mini.pairs').setup() end - } - use { + }, + { 'echasnovski/mini.fuzzy', branch = 'stable', config = function() require('mini.fuzzy').setup() end - } + }, ----------------------------------------------------------- -- Markdown Plugins ------------------------------------------------------------ - use({ + { 'jakewvincent/mkdnflow.nvim', config = function() require('mkdnflow').setup({ @@ -164,61 +156,66 @@ return require'packer'.startup(function() wrap = true }) end -}) +}, -use({ "iamcco/markdown-preview.nvim", run = "cd app && npm install", setup = function() vim.g.mkdp_filetypes = { - "markdown" } end, ft = { "markdown" }, }) +{ "iamcco/markdown-preview.nvim", build = "cd app && npm install", setup = function() vim.g.mkdp_filetypes = { + "markdown" } end, ft = { "markdown" }, }, -- Prettier Plugin for Neovim specifically - use'MunifTanjim/prettier.nvim' + 'MunifTanjim/prettier.nvim', -- DAP (Debug adaptor Protocol) - use 'mfussenegger/nvim-dap' + 'mfussenegger/nvim-dap', - use ({ + { 'mfussenegger/nvim-dap-python', config = function() require('dap-python').setup( '~/.virtualenvs/debugpy/bin/python' ) end -}) +}, -- Sidebar - use ({ + { 'sidebar-nvim/sidebar.nvim', config = function() require("sidebar-nvim").setup({ sections = { - "datetime", + "symbols", "git", "diagnostics", "todos", - }, + }, + initial_width = 45, + hide_statusline = true, + todos = { + initially_closed = true, -- whether the groups should be initially closed on start. You can manually open/close groups later. + } }) end -}) +}, --------------------------------------------------------- -- Text, Icons, Symbols ---------------------------------------------------------- - use 'lukas-reineke/indent-blankline.nvim' + 'lukas-reineke/indent-blankline.nvim', - use 'simrat39/symbols-outline.nvim' + 'simrat39/symbols-outline.nvim', - use 'nvim-tree/nvim-web-devicons' +-- 'nvim-tree/nvim-web-devicons', - use 'folke/lsp-colors.nvim' + 'folke/lsp-colors.nvim', - use 'karb94/neoscroll.nvim' + 'karb94/neoscroll.nvim', -- Allow Popups for Telescope etc - use 'nvim-lua/popup.nvim' - use "nvim-lua/plenary.nvim" + 'nvim-lua/popup.nvim', + 'nvim-lua/plenary.nvim', -- Todo & Comments for Organization - use { + { 'folke/todo-comments.nvim', - requires = "nvim-lua/plenary.nvim", + dependencies = "nvim-lua/plenary.nvim", config = function() require("todo-comments").setup { keywords = { @@ -248,55 +245,44 @@ use({ "iamcco/markdown-preview.nvim", run = "cd app && npm install", setup = fun }, } end - } + }, -- The all famous telescope - use { - 'nvim-telescope/telescope.nvim', tag = '0.1.0', - requires = { - 'nvim-lua/plenary.nvim', - 'nvim-telescope/telescope-live-grep-args.nvim', - }, - config = function() - require("telescope").setup({ - }) - end -} - use { + { "nvim-telescope/telescope-file-browser.nvim" -} +}, -use { - 'nvim-telescope/telescope-fzf-native.nvim', - run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' -} +{ + 'nvim-telescope/telescope-fzf-native.nvim', + build = 'make' + }, ----------------------------------------------------------- -- Various Color Schemes, Dashboard, etc ----------------------------------------------------------- - use 'tanvirtin/monokai.nvim' - use 'gbprod/nord.nvim' - use 'Mofiqul/dracula.nvim' - use 'lunarvim/colorschemes' - use { 'rose-pine/neovim', as = 'rose-pine' } - use { "catppuccin/nvim", as = "catppuccin" } - use { + 'tanvirtin/monokai.nvim', + 'gbprod/nord.nvim', + 'Mofiqul/dracula.nvim', + 'lunarvim/colorschemes', + { 'rose-pine/neovim', as = 'rose-pine' }, + { "catppuccin/nvim", as = "catppuccin" }, + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + { 'feline-nvim/feline.nvim', - requires = { 'nvim-tree/nvim-web-devicons' }, - } - use {"ellisonleao/glow.nvim"} - -- Signs for Git Status Information - use { - 'lewis6991/gitsigns.nvim', - config = function() - require('gitsigns').setup() - end - } + dependencies = { 'kyazdani42/nvim-web-devicons' }, + }, + {"ellisonleao/glow.nvim"}, -- Plugin that causes your code to crumble >:) - use 'eandrju/cellular-automaton.nvim' + 'eandrju/cellular-automaton.nvim', + +-- Wakatime Tracking + 'wakatime/vim-wakatime' +} - -- The Dashboard - use { - 'goolord/alpha-nvim', - requires = { 'nvim-tree/nvim-web-devicons' }, - } -end) diff --git a/lua/plugins/mason-lspconfig.lua b/lua/plugins/mason-lspconfig.lua deleted file mode 100644 index 0118611..0000000 --- a/lua/plugins/mason-lspconfig.lua +++ /dev/null @@ -1,10 +0,0 @@ -local lsp_installer = require("mason-lspconfig").setup({ - automatic_instalsation = true, - ui = { - icons = { - server_installed = "✓", - server_pending = "➜", - server_uninstalled = "✗" - } - } -}) diff --git a/lua/plugins/neoscroll.lua b/lua/plugins/neoscroll.lua deleted file mode 100644 index 67a1f52..0000000 --- a/lua/plugins/neoscroll.lua +++ /dev/null @@ -1,17 +0,0 @@ -local t = {} --- Syntax: t[keys] = {function, {function arguments}} --- Use the "sine" easing function -t[""] = { "scroll", { "-vim.wo.scroll", "true", "20", [['cubic']] } } -t[""] = { "scroll", { "vim.wo.scroll", "true", "20", [['cubic']] } } --- Use the "circular" easing function -t[""] = { "scroll", { "-vim.api.nvim_win_get_height(0)", "true", "50", [['cubic']] } } -t[""] = { "scroll", { "vim.api.nvim_win_get_height(0)", "true", "50", [['cubic']] } } --- Pass "nil" to disable the easing animation (constant scrolling speed) -t[""] = { "scroll", { "-0.10", "false", "100", nil } } -t[""] = { "scroll", { "0.10", "false", "100", nil } } --- When no easing function is provided the default easing function (in this case "quadratic") will be used -t["zt"] = { "zt", { "10" } } -t["zz"] = { "zz", { "10" } } -t["zb"] = { "zb", { "10" } } - -require("neoscroll.config").set_mappings(t) diff --git a/lua/plugins/null-ls.lua b/lua/plugins/null-ls.lua deleted file mode 100644 index cb5e8a8..0000000 --- a/lua/plugins/null-ls.lua +++ /dev/null @@ -1,22 +0,0 @@ -local null_ls = require("null-ls") - -null_ls.setup({ - --[[ on_attach = function(client, bufnr) - if client.resolved_capabilities.document_formatting then - vim.cmd("nnoremap f :lua vim.lsp.buf.formatting()") - -- format on save - vim.cmd("autocmd BufWritePost lua vim.lsp.buf.formatting()") - end - if client.resolved_capabilities.document_range_formatting then - vim.cmd("xnoremap f :lua vim.lsp.buf.range_formatting({})") - end - end,--]] - sources = { - null_ls.builtins.completion.spell, - null_ls.builtins.diagnostics.codespell, - null_ls.builtins.diagnostics.markdownlint.with({ extra_args = { "--disable", "MD013", "MD024", "--" } - ,}), - null_ls.builtins.diagnostics.pycodestyle.with({ extra_args = { "--max-line-length=150" }}), - null_ls.builtins.formatting.black.with({ extra_args = { "--fast" }}), - }, -}) diff --git a/lua/plugins/nvim-cmp.lua b/lua/plugins/nvim-cmp.lua deleted file mode 100644 index 03dae4e..0000000 --- a/lua/plugins/nvim-cmp.lua +++ /dev/null @@ -1,101 +0,0 @@ ------------------------------------------------------------ --- Autocomplete configuration file ------------------------------------------------------------ - --- Plugin: nvim-cmp --- url: https://github.com/hrsh7th/nvim-cmp - - -local cmp_status_ok, cmp = pcall(require, 'cmp') -if not cmp_status_ok then - return -end - -local luasnip_status_ok, luasnip = pcall(require, 'luasnip') -if not luasnip_status_ok then - return -end - -cmp.setup { - -- Load snippet support - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - - -- Completion settings - completion = { - --completeopt = 'menu,menuone,noselect' - keyword_length = 2 - }, - - -- Key mapping - mapping = { - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.select_prev_item(), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [""] = cmp.mapping({ - i = cmp.mapping.abort(), - c = cmp.mapping.close(), - }), - [""] = cmp.config.disable, - [''] = cmp.mapping.confirm { - select = false, - }, - - -- Tab mapping - [''] = function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end, - [''] = function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end - }, - - -- Load sources, see: https://github.com/topics/nvim-cmp - sources = { - { name = 'nvim-lsp' }, - { name = 'luasnip' }, - { name = 'path' }, - { name = 'buffer' }, - { name = 'zsh' }, - }, -} - --- see https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-add-visual-studio-code-dark-theme-colors-to-the-menu -vim.cmd[[ - highlight! link CmpItemMenu Comment - " gray - highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080 - " blue - highlight! CmpItemAbbrMatch guibg=NONE guifg=#569CD6 - highlight! CmpItemAbbrMatchFuzzy guibg=NONE guifg=#569CD6 - " light blue - highlight! CmpItemKindVariable guibg=NONE guifg=#9CDCFE - highlight! CmpItemKindInterface guibg=NONE guifg=#9CDCFE - highlight! CmpItemKindText guibg=NONE guifg=#9CDCFE - " pink - highlight! CmpItemKindFunction guibg=NONE guifg=#C586C0 - highlight! CmpItemKindMethod guibg=NONE guifg=#C586C0 - " front - highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4 - highlight! CmpItemKindProperty guibg=NONE guifg=#D4D4D4 - highlight! CmpItemKindUnit guibg=NONE guifg=#D4D4D4 -]] - - diff --git a/lua/plugins/nvim-lspconfig.lua b/lua/plugins/nvim-lspconfig.lua deleted file mode 100644 index 3656cdc..0000000 --- a/lua/plugins/nvim-lspconfig.lua +++ /dev/null @@ -1,109 +0,0 @@ ------------------------------------------------------------ --- Neovim LSP configuration file ------------------------------------------------------------ - --- Plugin: nvim-lspconfig --- url: https://github.com/neovim/nvim-lspconfig -local lsp_status_ok, lspconfig = pcall(require, 'lspconfig') -if not lsp_status_ok then - return -end - -local cmp_status_ok, cmp_nvim_lsp = pcall(require, 'cmp_nvim_lsp') -if not cmp_status_ok then - return -end - --- Diagnostic options, see: `:help vim.diagnostic.config` -vim.diagnostic.config({ - update_in_insert = true, - float = { - focusable = false, - style = "minimal", - border = "rounded", - source = "always", - header = "", - prefix = "", - }, -}) - --- Show line diagnostics automatically in hover window -vim.cmd([[ - autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, { focus = false }) -]]) - - --- Use an on_attach function to only map the following keys --- after the language server attaches to the current buffer -local on_attach = function(client, bufnr) - local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end - local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end - - - -- Enable completion triggered by - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - - -- Mappings. - local opts = { noremap = true, silent = true } - - -- See `:help vim.lsp.*` for documentation on any of the below functions - buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) - buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) - buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) - buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) - buf_set_keymap('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) - buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) - buf_set_keymap('n', 'e', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) - buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) - buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) - buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) - buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) -end - ---[[ - -Language servers setup: - -For language servers list see: -https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md - -Language server installed: - -Bash -> bashls -Python -> pyright -C-C++ -> clangd -HTML/CSS/JSON -> vscode-html-languageserver -JavaScript/TypeScript -> tsserver - ---]] - --- Define `root_dir` when needed --- See: https://github.com/neovim/nvim-lspconfig/issues/320 --- This is a workaround, maybe not work with some servers. -local root_dir = function() - return vim.fn.getcwd() -end - --- Use a loop to conveniently call 'setup' on multiple servers and --- map buffer local keybindings when the language server attaches. --- Add your language server below: -local servers = { 'bashls', 'pyright', 'clangd', 'html', 'cssls', 'tsserver', 'theme_check'} - --- Call setup -for _, lsp in ipairs(servers) do - lspconfig[lsp].setup { - on_attach = on_attach, - root_dir = root_dir, - capabilities = capabilities, - flags = { - -- default in neovim 0.7+ - debounce_text_changes = 150, - } - } -end diff --git a/lua/plugins/nvim-mapper.lua b/lua/plugins/nvim-mapper.lua deleted file mode 100644 index 0b8775f..0000000 --- a/lua/plugins/nvim-mapper.lua +++ /dev/null @@ -1,12 +0,0 @@ -require("nvim-mapper").setup({ - -- do not assign the default keymap (MM) - no_map = false, - -- where should ripgrep look for your keybinds definitions. - -- Default config search path is ~/.config/nvim/lua - search_path = os.getenv("~/.config/nvim/lua/keymaps.lua"), - -- what should be done with the selected keybind when pressing enter. - -- Available actions: - -- * "definition" - Go to keybind definition (default) - -- * "execute" - Execute the keybind command - action_on_enter = "execute", -}) diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua deleted file mode 100644 index 6afb6bf..0000000 --- a/lua/plugins/nvim-tree.lua +++ /dev/null @@ -1,29 +0,0 @@ ------------------------------------------------------------ --- File manager configuration file ------------------------------------------------------------ - --- Plugin: nvim-tree --- url: https://github.com/kyazdani42/nvim-tree.lua - ---- Keybindings are defined in `keymapping.lua`: ---- https://github.com/kyazdani42/nvim-tree.lua#keybindings - ---- Note: options under the g: command should be set BEFORE running the ---- setup function: https://github.com/kyazdani42/nvim-tree.lua#setup ---- See: `help NvimTree` -local g = vim.g - -require('nvim-tree').setup { - update_cwd = true, - filters = { - dotfiles = true, - custom = { '.git', 'node_modules', '.cache', '.bin' }, - }, - git = { - enable = true, - ignore = true, - }, - view = { - width = 37, - }, -} diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua deleted file mode 100644 index d95c67d..0000000 --- a/lua/plugins/nvim-treesitter.lua +++ /dev/null @@ -1,26 +0,0 @@ ------------------------------------------------------------ --- Treesitter configuration file ----------------------------------------------------------- - --- Plugin: nvim-treesitter --- url: https://github.com/nvim-treesitter/nvim-treesitter - -local status_ok, nvim_treesitter = pcall(require, 'nvim-treesitter.configs') -if not status_ok then - return -end - --- See: https://github.com/nvim-treesitter/nvim-treesitter#quickstart -nvim_treesitter.setup { - -- A list of parser names, or "all" - ensure_installed = { - 'bash', 'css', 'html', 'javascript', 'json', 'lua', 'python', - 'vim', 'yaml', 'typescript', - }, - sync_install = true, - highlight = { - -- `false` will disable the whole extension - enable = true, - additional_vim_regex_highlighting = true, - }, -} diff --git a/lua/plugins/prettier.lua b/lua/plugins/prettier.lua deleted file mode 100644 index 817da0c..0000000 --- a/lua/plugins/prettier.lua +++ /dev/null @@ -1,38 +0,0 @@ -local prettier = require("prettier") - -prettier.setup({ - bin = 'prettier', -- or `prettierd` - filetypes = { - "css", - "graphql", - "html", - "javascript", - "javascriptreact", - "json", - "less", - "markdown", - "scss", - "typescript", - "typescriptreact", - "yaml", - "python", - }, - - -- prettier format options (you can use config files too. ex: `.prettierrc`) - arrow_parens = "always", - bracket_spacing = true, - embedded_language_formatting = "auto", - end_of_line = "lf", - html_whitespace_sensitivity = "css", - jsx_bracket_same_line = false, - jsx_single_quote = false, - print_width = 80, - prose_wrap = "preserve", - quote_props = "as-needed", - semi = true, - single_quote = false, - tab_width = 2, - trailing_comma = "es5", - use_tabs = false, - vue_indent_script_and_style = false, -}) diff --git a/lua/plugins/snippets.lua b/lua/plugins/snippets.lua deleted file mode 100644 index 937535a..0000000 --- a/lua/plugins/snippets.lua +++ /dev/null @@ -1,533 +0,0 @@ -local ls = require("luasnip") --- some shorthands... -local s = ls.snippet -local sn = ls.snippet_node -local t = ls.text_node -local i = ls.insert_node -local f = ls.function_node -local c = ls.choice_node -local d = ls.dynamic_node -local r = ls.restore_node -local l = require("luasnip.extras").lambda -local rep = require("luasnip.extras").rep -local p = require("luasnip.extras").partial -local m = require("luasnip.extras").match -local n = require("luasnip.extras").nonempty -local dl = require("luasnip.extras").dynamic_lambda -local fmt = require("luasnip.extras.fmt").fmt -local fmta = require("luasnip.extras.fmt").fmta -local types = require("luasnip.util.types") -local conds = require("luasnip.extras.expand_conditions") - --- If you're reading this file for the first time, best skip to around line 190 --- where the actual snippet-definitions start. - --- Every unspecified option will be set to the default. -ls.setup({ - history = true, - -- Update more often, :h events for more info. - update_events = "TextChanged,TextChangedI", - -- Snippets aren't automatically removed if their text is deleted. - -- `delete_check_events` determines on which events (:h events) a check for - -- deleted snippets is performed. - -- This can be especially useful when `history` is enabled. - delete_check_events = "TextChanged", - ext_opts = { - [types.choiceNode] = { - active = { - virt_text = { { "choiceNode", "Comment" } }, - }, - }, - }, - -- treesitter-hl has 100, use something higher (default is 200). - ext_base_prio = 300, - -- minimal increase in priority. - ext_prio_increase = 1, - enable_autosnippets = true, - -- mapping for cutting selected text so it's usable as SELECT_DEDENT, - -- SELECT_RAW or TM_SELECTED_TEXT (mapped via xmap). - store_selection_keys = "", - -- luasnip uses this function to get the currently active filetype. This - -- is the (rather uninteresting) default, but it's possible to use - -- eg. treesitter for getting the current filetype by setting ft_func to - -- require("luasnip.extras.filetype_functions").from_cursor (requires - -- `nvim-treesitter/nvim-treesitter`). This allows correctly resolving - -- the current filetype in eg. a markdown-code block or `vim.cmd()`. - ft_func = function() - return vim.split(vim.bo.filetype, ".", true) - end, -}) - --- args is a table, where 1 is the text in Placeholder 1, 2 the text in --- placeholder 2,... -local function copy(args) - return args[1] -end - --- 'recursive' dynamic snippet. Expands to some text followed by itself. -local rec_ls -rec_ls = function() - return sn( - nil, - c(1, { - -- Order is important, sn(...) first would cause infinite loop of expansion. - t(""), - sn(nil, { t({ "", "\t\\item " }), i(1), d(2, rec_ls, {}) }), - }) - ) -end - --- complicated function for dynamicNode. -local function jdocsnip(args, _, old_state) - -- !!! old_state is used to preserve user-input here. DON'T DO IT THAT WAY! - -- Using a restoreNode instead is much easier. - -- View this only as an example on how old_state functions. - local nodes = { - t({ "/**", " * " }), - i(1, "A short Description"), - t({ "", "" }), - } - - -- These will be merged with the snippet; that way, should the snippet be updated, - -- some user input eg. text can be referred to in the new snippet. - local param_nodes = {} - - if old_state then - nodes[2] = i(1, old_state.descr:get_text()) - end - param_nodes.descr = nodes[2] - - -- At least one param. - if string.find(args[2][1], ", ") then - vim.list_extend(nodes, { t({ " * ", "" }) }) - end - - local insert = 2 - for indx, arg in ipairs(vim.split(args[2][1], ", ", true)) do - -- Get actual name parameter. - arg = vim.split(arg, " ", true)[2] - if arg then - local inode - -- if there was some text in this parameter, use it as static_text for this new snippet. - if old_state and old_state[arg] then - inode = i(insert, old_state["arg" .. arg]:get_text()) - else - inode = i(insert) - end - vim.list_extend( - nodes, - { t({ " * @param " .. arg .. " " }), inode, t({ "", "" }) } - ) - param_nodes["arg" .. arg] = inode - - insert = insert + 1 - end - end - - if args[1][1] ~= "void" then - local inode - if old_state and old_state.ret then - inode = i(insert, old_state.ret:get_text()) - else - inode = i(insert) - end - - vim.list_extend( - nodes, - { t({ " * ", " * @return " }), inode, t({ "", "" }) } - ) - param_nodes.ret = inode - insert = insert + 1 - end - - if vim.tbl_count(args[3]) ~= 1 then - local exc = string.gsub(args[3][2], " throws ", "") - local ins - if old_state and old_state.ex then - ins = i(insert, old_state.ex:get_text()) - else - ins = i(insert) - end - vim.list_extend( - nodes, - { t({ " * ", " * @throws " .. exc .. " " }), ins, t({ "", "" }) } - ) - param_nodes.ex = ins - insert = insert + 1 - end - - vim.list_extend(nodes, { t({ " */" }) }) - - local snip = sn(nil, nodes) - -- Error on attempting overwrite. - snip.old_state = param_nodes - return snip -end - --- Make sure to not pass an invalid command, as io.popen() may write over nvim-text. -local function bash(_, _, command) - local file = io.popen(command, "r") - local res = {} - for line in file:lines() do - table.insert(res, line) - end - return res -end - --- Returns a snippet_node wrapped around an insert_node whose initial --- text value is set to the current date in the desired format. -local date_input = function(args, snip, old_state, fmt) - local fmt = fmt or "%Y-%m-%d" - return sn(nil, i(1, os.date(fmt))) -end - --- snippets are added via ls.add_snippets(filetype, snippets[, opts]), where --- opts may specify the `type` of the snippets ("snippets" or "autosnippets", --- for snippets that should expand directly after the trigger is typed). --- --- opts can also specify a key. By passing an unique key to each add_snippets, it's possible to reload snippets by --- re-`:luafile`ing the file in which they are defined (eg. this one). -ls.add_snippets("all", { - -- trigger is `fn`, second argument to snippet-constructor are the nodes to insert into the buffer on expansion. - s("fn", { - -- Simple static text. - t("//Parameters: "), - -- function, first parameter is the function, second the Placeholders - -- whose text it gets as input. - f(copy, 2), - t({ "", "function " }), - -- Placeholder/Insert. - i(1), - t("("), - -- Placeholder with initial text. - i(2, "int foo"), - -- Linebreak - t({ ") {", "\t" }), - -- Last Placeholder, exit Point of the snippet. - i(0), - t({ "", "}" }), - }), - s("class", { - -- Choice: Switch between two different Nodes, first parameter is its position, second a list of nodes. - c(1, { - t("public "), - t("private "), - }), - t("class "), - i(2), - t(" "), - c(3, { - t("{"), - -- sn: Nested Snippet. Instead of a trigger, it has a position, just like insert-nodes. !!! These don't expect a 0-node!!!! - -- Inside Choices, Nodes don't need a position as the choice node is the one being jumped to. - sn(nil, { - t("extends "), - -- restoreNode: stores and restores nodes. - -- pass position, store-key and nodes. - r(1, "other_class", i(1)), - t(" {"), - }), - sn(nil, { - t("implements "), - -- no need to define the nodes for a given key a second time. - r(1, "other_class"), - t(" {"), - }), - }), - t({ "", "\t" }), - i(0), - t({ "", "}" }), - }), - -- Alternative printf-like notation for defining snippets. It uses format - -- string with placeholders similar to the ones used with Python's .format(). - s( - "fmt1", - fmt("To {title} {} {}.", { - i(2, "Name"), - i(3, "Surname"), - title = c(1, { t("Mr."), t("Ms.") }), - }) - ), - -- To escape delimiters use double them, e.g. `{}` -> `{{}}`. - -- Multi-line format strings by default have empty first/last line removed. - -- Indent common to all lines is also removed. Use the third `opts` argument - -- to control this behaviour. - s( - "fmt2", - fmt( - [[ - foo({1}, {3}) {{ - return {2} * {4} - }} - ]], - { - i(1, "x"), - rep(1), - i(2, "y"), - rep(2), - } - ) - ), - -- Empty placeholders are numbered automatically starting from 1 or the last - -- value of a numbered placeholder. Named placeholders do not affect numbering. - s( - "fmt3", - fmt("{} {a} {} {1} {}", { - t("1"), - t("2"), - a = t("A"), - }) - ), - -- The delimiters can be changed from the default `{}` to something else. - s("fmt4", fmt("foo() { return []; }", i(1, "x"), { delimiters = "[]" })), - -- `fmta` is a convenient wrapper that uses `<>` instead of `{}`. - s("fmt5", fmta("foo() { return <>; }", i(1, "x"))), - -- By default all args must be used. Use strict=false to disable the check - s( - "fmt6", - fmt("use {} only", { t("this"), t("not this") }, { strict = false }) - ), - -- Use a dynamic_node to interpolate the output of a - -- function (see date_input above) into the initial - -- value of an insert_node. - s("novel", { - t("It was a dark and stormy night on "), - d(1, date_input, {}, { user_args = { "%A, %B %d of %Y" } }), - t(" and the clocks were striking thirteen."), - }), - -- Parsing snippets: First parameter: Snippet-Trigger, Second: Snippet body. - -- Placeholders are parsed into choices with 1. the placeholder text(as a snippet) and 2. an empty string. - -- This means they are not SELECTed like in other editors/Snippet engines. - ls.parser.parse_snippet( - "lspsyn", - "Wow! This ${1:Stuff} really ${2:works. ${3:Well, a bit.}}" - ), - - -- When wordTrig is set to false, snippets may also expand inside other words. - ls.parser.parse_snippet( - { trig = "te", wordTrig = false }, - "${1:cond} ? ${2:true} : ${3:false}" - ), - - -- When regTrig is set, trig is treated like a pattern, this snippet will expand after any number. - ls.parser.parse_snippet({ trig = "%d", regTrig = true }, "A Number!!"), - -- Using the condition, it's possible to allow expansion only in specific cases. - s("cond", { - t("will only expand in c-style comments"), - }, { - condition = function(line_to_cursor, matched_trigger, captures) - -- optional whitespace followed by // - return line_to_cursor:match("%s*//") - end, - }), - -- there's some built-in conditions in "luasnip.extras.expand_conditions". - s("cond2", { - t("will only expand at the beginning of the line"), - }, { - condition = conds.line_begin, - }), - -- The last entry of args passed to the user-function is the surrounding snippet. - s( - { trig = "a%d", regTrig = true }, - f(function(_, snip) - return "Triggered with " .. snip.trigger .. "." - end, {}) - ), - -- It's possible to use capture-groups inside regex-triggers. - s( - { trig = "b(%d)", regTrig = true }, - f(function(_, snip) - return "Captured Text: " .. snip.captures[1] .. "." - end, {}) - ), - s({ trig = "c(%d+)", regTrig = true }, { - t("will only expand for even numbers"), - }, { - condition = function(line_to_cursor, matched_trigger, captures) - return tonumber(captures[1]) % 2 == 0 - end, - }), - -- Use a function to execute any shell command and print its text. - s("bash", f(bash, {}, { user_args = { "ls" } })), - -- Short version for applying String transformations using function nodes. - s("transform", { - i(1, "initial text"), - t({ "", "" }), - -- lambda nodes accept an l._1,2,3,4,5, which in turn accept any string transformations. - -- This list will be applied in order to the first node given in the second argument. - l(l._1:match("[^i]*$"):gsub("i", "o"):gsub(" ", "_"):upper(), 1), - }), - - s("transform2", { - i(1, "initial text"), - t("::"), - i(2, "replacement for e"), - t({ "", "" }), - -- Lambdas can also apply transforms USING the text of other nodes: - l(l._1:gsub("e", l._2), { 1, 2 }), - }), - s({ trig = "trafo(%d+)", regTrig = true }, { - -- env-variables and captures can also be used: - l(l.CAPTURE1:gsub("1", l.TM_FILENAME), {}), - }), - -- Set store_selection_keys = "" (for example) in your - -- luasnip.config.setup() call to populate - -- TM_SELECTED_TEXT/SELECT_RAW/SELECT_DEDENT. - -- In this case: select a URL, hit Tab, then expand this snippet. - s("link_url", { - t(''), - i(1), - t(""), - i(0), - }), - -- Shorthand for repeating the text in a given node. - s("repeat", { i(1, "text"), t({ "", "" }), rep(1) }), - -- Directly insert the ouput from a function evaluated at runtime. - s("part", p(os.date, "%Y")), - -- use matchNodes (`m(argnode, condition, then, else)`) to insert text - -- based on a pattern/function/lambda-evaluation. - -- It's basically a shortcut for simple functionNodes: - s("mat", { - i(1, { "sample_text" }), - t(": "), - m(1, "%d", "contains a number", "no number :("), - }), - -- The `then`-text defaults to the first capture group/the entire - -- match if there are none. - s("mat2", { - i(1, { "sample_text" }), - t(": "), - m(1, "[abc][abc][abc]"), - }), - -- It is even possible to apply gsubs' or other transformations - -- before matching. - s("mat3", { - i(1, { "sample_text" }), - t(": "), - m( - 1, - l._1:gsub("[123]", ""):match("%d"), - "contains a number that isn't 1, 2 or 3!" - ), - }), - -- `match` also accepts a function in place of the condition, which in - -- turn accepts the usual functionNode-args. - -- The condition is considered true if the function returns any - -- non-nil/false-value. - -- If that value is a string, it is used as the `if`-text if no if is explicitly given. - s("mat4", { - i(1, { "sample_text" }), - t(": "), - m(1, function(args) - -- args is a table of multiline-strings (as usual). - return (#args[1][1] % 2 == 0 and args[1]) or nil - end), - }), - -- The nonempty-node inserts text depending on whether the arg-node is - -- empty. - s("nempty", { - i(1, "sample_text"), - n(1, "i(1) is not empty!"), - }), - -- dynamic lambdas work exactly like regular lambdas, except that they - -- don't return a textNode, but a dynamicNode containing one insertNode. - -- This makes it easier to dynamically set preset-text for insertNodes. - s("dl1", { - i(1, "sample_text"), - t({ ":", "" }), - dl(2, l._1, 1), - }), - -- Obviously, it's also possible to apply transformations, just like lambdas. - s("dl2", { - i(1, "sample_text"), - i(2, "sample_text_2"), - t({ "", "" }), - dl(3, l._1:gsub("\n", " linebreak ") .. l._2, { 1, 2 }), - }), -}, { - key = "all", -}) - -ls.add_snippets("java", { - -- Very long example for a java class. - s("fn", { - d(6, jdocsnip, { 2, 4, 5 }), - t({ "", "" }), - c(1, { - t("public "), - t("private "), - }), - c(2, { - t("void"), - t("String"), - t("char"), - t("int"), - t("double"), - t("boolean"), - i(nil, ""), - }), - t(" "), - i(3, "myFunc"), - t("("), - i(4), - t(")"), - c(5, { - t(""), - sn(nil, { - t({ "", " throws " }), - i(1), - }), - }), - t({ " {", "\t" }), - i(0), - t({ "", "}" }), - }), -}, { - key = "java", -}) - -ls.add_snippets("tex", { - -- rec_ls is self-referencing. That makes this snippet 'infinite' eg. have as many - -- \item as necessary by utilizing a choiceNode. - s("ls", { - t({ "\\begin{itemize}", "\t\\item " }), - i(1), - d(2, rec_ls, {}), - t({ "", "\\end{itemize}" }), - }), -}, { - key = "tex", -}) - --- set type to "autosnippets" for adding autotriggered snippets. -ls.add_snippets("all", { - s("autotrigger", { - t("autosnippet"), - }), -}, { - type = "autosnippets", - key = "all_auto", -}) - --- in a lua file: search lua-, then c-, then all-snippets. -ls.filetype_extend("lua", { "c" }) --- in a cpp file: search c-snippets, then all-snippets only (no cpp-snippets!!). -ls.filetype_set("cpp", { "c" }) - --- Beside defining your own snippets you can also load snippets from "vscode-like" packages --- that expose snippets in json files, for example . - -require("luasnip.loaders.from_vscode").load({ include = { "python" } }) -- Load only python snippets - --- The directories will have to be structured like eg. (include --- a similar `package.json`) ---require("luasnip.loaders.from_vscode").load({ paths = { "./my-snippets" } }) -- Load snippets from my-snippets folder - --- You can also use lazy loading so snippets are loaded on-demand, not all at once (may interfere with lazy-loading luasnip itself). -require("luasnip.loaders.from_vscode").lazy_load() -- You can pass { paths = "./my-snippets/"} as well diff --git a/lua/plugins/symbols-outline.lua b/lua/plugins/symbols-outline.lua deleted file mode 100644 index ca90a02..0000000 --- a/lua/plugins/symbols-outline.lua +++ /dev/null @@ -1,59 +0,0 @@ -local M = {} - - -M.setup = function () - vim.g.symbols_outline = { - highlight_hovered_item = true, - show_guides = true, - auto_preview = true, - position = "right", - relative_width = true, - width = 20, - auto_close = false, - show_numbers = true, - show_relative_numbers = false, - show_symbol_details = true, - preview_bg_highlight = "Pmenu", - keymaps = { - close = { "", "q" }, - goto_location = "", - focus_location = "o", - hover_symbol = "", - toggle_preview = "K", - rename_symbol = "r", - code_actions = "a", - }, - lsp_blacklist = {}, - symbol_blacklist = {}, - symbols = { - File = { icon = "", hl = "TSURI" }, - Module = { icon = "", hl = "TSNamespace" }, - Namespace = { icon = "", hl = "TSNamespace" }, - Package = { icon = "", hl = "TSNamespace" }, - Class = { icon = "𝓒", hl = "TSType" }, - Method = { icon = "ƒ", hl = "TSMethod" }, - Property = { icon = "", hl = "TSMethod" }, - Field = { icon = "", hl = "TSField" }, - Constructor = { icon = "", hl = "TSConstructor" }, - Enum = { icon = "ℰ", hl = "TSType" }, - Interface = { icon = "ﰮ", hl = "TSType" }, - Function = { icon = "", hl = "TSFunction" }, - Variable = { icon = "", hl = "TSConstant" }, - Constant = { icon = "", hl = "TSConstant" }, - String = { icon = "𝓐", hl = "TSString" }, - Number = { icon = "#", hl = "TSNumber" }, - Boolean = { icon = "⊨", hl = "TSBoolean" }, - Array = { icon = "", hl = "TSConstant" }, - Object = { icon = "", hl = "TSType" }, - Key = { icon = "🔐", hl = "TSType" }, - Null = { icon = "NULL", hl = "TSType" }, - EnumMember = { icon = "", hl = "TSField" }, - Struct = { icon = "𝓢", hl = "TSType" }, - Event = { icon = "ﳅ", hl = "TSType" }, - Operator = { icon = "+", hl = "TSOperator" }, - TypeParameter = { icon = "𝙏", hl = "TSParameter" }, - }, - } -end - -return M diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 877eebf..d70d185 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,27 +1,160 @@ -local g = vim.g - -local fb_actions = require "telescope".extensions.file_browser.actions - -local telescope_installer = require('telescope').setup({ - extensions = { - file_browser = { - mappings = { - ["i"] = { - [""] = fb_actions.create, - [""] = fb_actions.copy, - [""] = fb_actions.rename, - [""] = fb_actions.goto_cwd, - [""] = fb_actions.open - }, - ["n"] = { - - }, +return { + { + 'nvim-telescope/telescope.nvim', tag = '0.1.0', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-telescope/telescope-live-grep-args.nvim', }, - }, - }, -}) + require("telescope").load_extension "file_browser", + require("telescope").load_extension "mapper", + require("telescope").load_extension "live_grep_args", + require("telescope").load_extension "fzf", + + config = function () + local g = vim.g + local fb_actions = require "telescope".extensions.file_browser.actions + local themes = { + popup_list = { + theme = 'popup_list', + border = true, + preview = false, + prompt_title = false, + results_title = false, + sorting_strategy = 'ascending', + layout_strategy = 'center', + borderchars = { + prompt = { '─', '│', '─', '│', '┌', '┐', '┤', '└' }, + results = { '─', '│', '─', '│', '├', '┤', '┘', '└' }, + preview = { '─', '│', '─', '│', '┌', '┐', '┘', '└' }, + }, + }, + popup_extended = { + theme = 'popup_extended', + prompt_title = false, + results_title = false, + layout_strategy = 'center', + layout_config = { + width = 0.7, + height = 0.3, + mirror = true, + preview_cutoff = 1, + }, + borderchars = { + prompt = { '─', '│', ' ', '│', '┌', '┐', '│', '│' }, + results = { '─', '│', '─', '│', '├', '┤', '┘', '└' }, + preview = { '─', '│', '─', '│', '┌', '┐', '┘', '└' }, + }, + }, + command_pane = { + theme = 'command_pane', + preview = false, + prompt_title = false, + results_title = false, + sorting_strategy = 'descending', + layout_strategy = 'bottom_pane', + layout_config = { + height = 13, + preview_cutoff = 1, + prompt_position = 'bottom' + }, + }, + ivy_plus = { + theme = 'ivy_plus', + preview = false, + prompt_title = false, + results_title = false, + layout_strategy = 'bottom_pane', + layout_config = { + height = 13, + preview_cutoff = 120, + prompt_position = 'bottom' + }, + borderchars = { + prompt = { '─', '│', '─', '│', '┌', '┐', '┘', '└' }, + results = { '─', '│', '─', '│', '┌', '┬', '┴', '└' }, + preview = { '─', '│', ' ', ' ', '─', '┐', '│', ' ' }, + }, + }, + } + local telescope_installer = require('telescope').setup({ + defaults = { + border = true, + prompt_title = false, + results_title = false, + color_devicons = false, + layout_strategy = 'horizontal', + borderchars = { + prompt = { '─', '│', '─', '│', '┌', '┐', '┘', '└' }, + results = { '─', '│', '─', '│', '┌', '┐', '┘', '└' }, + preview = { '─', '│', '─', '│', '┌', '┐', '┘', '└' }, + }, + layout_config = { + bottom_pane = { + height = 20, + preview_cutoff = 120, + prompt_position = 'top' + }, + center = { + height = 0.4, + preview_cutoff = 40, + prompt_position = 'top', + width = 0.7 + }, + horizontal = { + prompt_position = 'top', + preview_cutoff = 40, + height = 0.9, + width = 0.8 + } + }, + sorting_strategy = 'ascending', + prompt_prefix = ' ', + selection_caret = ' → ', + entry_prefix = ' ', + file_ignore_patterns = {'node_modules'}, + path_display = { 'truncate' }, + results_title = false, + prompt_title =false, + preview = { + treesitter = { + enable = { + 'css', 'dockerfile', 'elixir', 'erlang', 'fish', + 'html', 'http', 'javascript', 'json', 'lua', 'php', + 'python', 'regex', 'ruby', 'rust', 'scss', 'svelte', + 'typescript', 'vue', 'yaml', 'markdown', 'bash', 'c', + 'cmake', 'comment', 'cpp', 'dart', 'go', 'jsdoc', + 'json5', 'jsonc', 'llvm', 'make', 'ninja', 'prisma', + 'proto', 'pug', 'swift', 'todotxt', 'toml', 'tsx', + } + } + }, + mappings = { + i = { + [''] = require('telescope.actions').close, + }, + } + }, + extensions = { + file_browser = { + mappings = { + ["i"] = { + [""] = fb_actions.create, + [""] = fb_actions.copy, + [""] = fb_actions.rename, + [""] = fb_actions.goto_cwd, + [""] = fb_actions.open + }, + }, + }, + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = true, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = 'smart_case', -- other options: 'ignore_case' or 'respect_case' + } + } + }) + end + + }} -require("telescope").load_extension "file_browser" -require("telescope").load_extension "mapper" -require("telescope").load_extension "live_grep_args" -require("telescope").load_extension "fzf" diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua deleted file mode 100644 index f57d158..0000000 --- a/lua/plugins/todo-comments.lua +++ /dev/null @@ -1,29 +0,0 @@ -local g = vim.g - -require('todo-comments').setup { - keywords = { - FIX = { - icon = " ", -- icon used for the sign, and in search results - color = "error", -- can be a hex color, or a named color (see below) - alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords - -- signs = false, -- configure signs for some keywords individually - }, - DONE = { icon = " ", color = "info" }, - FEAT = { icon = " ", color = "warning", alt = { "NEED", "REQUEST" } }, - WARN = { icon = " ", color = "error", alt = { "WARNING", "ERROR" } }, - TODO = { icon = " ", color = "test", alt = { "TASK", "TBD" } }, - NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, - SENG = { icon = " ", color = "test", alt = { "SOLUTIONS", "SE", "WORKAROUND" } }, - }, - highlight = { - comments_only = false, - }, - colors = { - error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, - warning = { "DiagnosticWarning", "WarningMsg", "#ffba08" }, - info = { "DiagnosticInfo", "#05eb42" }, - hint = { "DiagnosticHint", "#ff12d7" }, - default = { "Identifier", "#711fff" }, - test = { "Identifier", "#FF00FF" } - }, -} diff --git a/lua/settings/init.lua b/lua/settings/init.lua index 562e3db..516a229 100755 --- a/lua/settings/init.lua +++ b/lua/settings/init.lua @@ -56,7 +56,6 @@ opt.synmaxcol = 240 -- Max column for syntax highlight -- Colorscheme ----------------------------------------------------------- opt.termguicolors = true -- Enable 24-bit RGB colors -cmd [[colorscheme catppuccin-macchiato]] ----------------------------------------------------------- -- Tabs, indent ----------------------------------------------------------- diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua deleted file mode 100644 index 34fac47..0000000 --- a/plugin/packer_compiled.lua +++ /dev/null @@ -1,473 +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() - -_G._packer = _G._packer or {} -_G._packer.inside_compile = true - -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 - if threshold then - table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') - end - - _G._packer.profile_output = results -end - -time([[Luarocks path setup]], true) -local package_path_str = "/Users/normrasmussen/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/normrasmussen/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/normrasmussen/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/normrasmussen/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/Users/normrasmussen/.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 = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/LuaSnip", - url = "https://github.com/L3MON4D3/LuaSnip", - wants = { "friendly-snippets", "vim-snippets" } - }, - ["alpha-nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/alpha-nvim", - url = "https://github.com/goolord/alpha-nvim" - }, - catppuccin = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/catppuccin", - url = "https://github.com/catppuccin/nvim" - }, - ["cellular-automaton.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cellular-automaton.nvim", - url = "https://github.com/eandrju/cellular-automaton.nvim" - }, - ["cmp-buffer"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-buffer", - url = "https://github.com/hrsh7th/cmp-buffer" - }, - ["cmp-cmdline"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-cmdline", - url = "https://github.com/hrsh7th/cmp-cmdline" - }, - ["cmp-nvim-lsp"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", - url = "https://github.com/hrsh7th/cmp-nvim-lsp" - }, - ["cmp-nvim-lsp-signature-help"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help", - url = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help" - }, - ["cmp-path"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-path", - url = "https://github.com/hrsh7th/cmp-path" - }, - ["cmp-spell"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-spell", - url = "https://github.com/f3fora/cmp-spell" - }, - cmp_luasnip = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp_luasnip", - url = "https://github.com/saadparwaiz1/cmp_luasnip" - }, - colorschemes = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/colorschemes", - url = "https://github.com/lunarvim/colorschemes" - }, - ["dracula.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/dracula.nvim", - url = "https://github.com/Mofiqul/dracula.nvim" - }, - ["feline.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/feline.nvim", - url = "https://github.com/feline-nvim/feline.nvim" - }, - ["friendly-snippets"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/friendly-snippets", - url = "https://github.com/rafamadriz/friendly-snippets" - }, - ["gitsigns.nvim"] = { - config = { "\27LJ\2\n6\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\rgitsigns\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", - url = "https://github.com/lewis6991/gitsigns.nvim" - }, - ["glow.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/glow.nvim", - url = "https://github.com/ellisonleao/glow.nvim" - }, - ["indent-blankline.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.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 = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/lsp-colors.nvim", - url = "https://github.com/folke/lsp-colors.nvim" - }, - ["markdown-preview.nvim"] = { - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/opt/markdown-preview.nvim", - url = "https://github.com/iamcco/markdown-preview.nvim" - }, - ["mason-lspconfig.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", - url = "https://github.com/williamboman/mason-lspconfig.nvim" - }, - ["mason.nvim"] = { - config = { "\27LJ\2\n3\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\nmason\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mason.nvim", - url = "https://github.com/williamboman/mason.nvim" - }, - ["mini.fuzzy"] = { - 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\15mini.fuzzy\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mini.fuzzy", - url = "https://github.com/echasnovski/mini.fuzzy" - }, - ["mini.move"] = { - config = { "\27LJ\2\n\1\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\2B\0\2\1K\0\1\0\rmappings\1\0\0\1\0\b\15line_right\14\aup\v\14line_left\r\tdown\r\14line_down\r\nright\14\fline_up\v\tleft\r\nsetup\14mini.move\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mini.move", - url = "https://github.com/echasnovski/mini.move" - }, - ["mini.pairs"] = { - 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\15mini.pairs\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mini.pairs", - url = "https://github.com/echasnovski/mini.pairs" - }, - ["mini.trailspace"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mini.trailspace", - url = "https://github.com/echasnovski/mini.trailspace" - }, - ["mkdnflow.nvim"] = { - config = { "\27LJ\2\n\2\0\0\6\0\23\0\0316\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\21\0005\3\5\0005\4\4\0005\5\3\0>\5\1\4=\4\6\0035\4\b\0005\5\a\0>\5\1\4=\4\t\0035\4\v\0005\5\n\0>\5\1\4=\4\f\0035\4\14\0005\5\r\0>\5\1\4=\4\15\0035\4\17\0005\5\16\0>\5\1\4=\4\18\0035\4\19\0=\4\20\3=\3\22\2B\0\2\1K\0\1\0\rmappings\1\0\1\twrap\2\19MkdnFollowLink\1\3\0\0\6n\14p\rMkdnSTab\1\3\0\0\0\f\1\2\0\0\6i\fMkdnTab\1\3\0\0\0\n\1\2\0\0\6i\14MkdnEnter\1\3\0\0\0\t\1\2\0\0\6n\20MkdnNewListItem\1\3\0\0\0\t\1\2\0\0\6i\19MkdnToggleToDo\1\0\1\22MkdnTableNextCell\1\1\3\0\0\0\14\1\3\0\0\6i\6n\nsetup\rmkdnflow\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mkdnflow.nvim", - url = "https://github.com/jakewvincent/mkdnflow.nvim" - }, - ["monokai.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/monokai.nvim", - url = "https://github.com/tanvirtin/monokai.nvim" - }, - ["neoscroll.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/neoscroll.nvim", - url = "https://github.com/karb94/neoscroll.nvim" - }, - ["nord.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nord.nvim", - url = "https://github.com/gbprod/nord.nvim" - }, - ["null-ls.nvim"] = { - config = { "\27LJ\2\nC\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\1\ndebug\2\nsetup\fnull-ls\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/null-ls.nvim", - url = "https://github.com/jose-elias-alvarez/null-ls.nvim" - }, - ["nvim-cmp"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-cmp", - url = "https://github.com/hrsh7th/nvim-cmp" - }, - ["nvim-dap"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-dap", - url = "https://github.com/mfussenegger/nvim-dap" - }, - ["nvim-dap-python"] = { - config = { "\27LJ\2\n^\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0&~/.virtualenvs/debugpy/bin/python\nsetup\15dap-python\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-dap-python", - url = "https://github.com/mfussenegger/nvim-dap-python" - }, - ["nvim-lspconfig"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", - url = "https://github.com/neovim/nvim-lspconfig" - }, - ["nvim-mapper"] = { - config = { "\27LJ\2\n=\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\16nvim-mapper\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-mapper", - url = "https://github.com/lazytanuki/nvim-mapper" - }, - ["nvim-notify"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-notify", - url = "https://github.com/rcarriga/nvim-notify" - }, - ["nvim-tree.lua"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", - url = "https://github.com/nvim-tree/nvim-tree.lua" - }, - ["nvim-treesitter"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-treesitter", - url = "https://github.com/nvim-treesitter/nvim-treesitter" - }, - ["nvim-web-devicons"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", - url = "https://github.com/nvim-tree/nvim-web-devicons" - }, - ["packer.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/packer.nvim", - url = "https://github.com/wbthomason/packer.nvim" - }, - ["plenary.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/plenary.nvim", - url = "https://github.com/nvim-lua/plenary.nvim" - }, - ["popup.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/popup.nvim", - url = "https://github.com/nvim-lua/popup.nvim" - }, - ["prettier.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/prettier.nvim", - url = "https://github.com/MunifTanjim/prettier.nvim" - }, - ["rose-pine"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/rose-pine", - url = "https://github.com/rose-pine/neovim" - }, - ["sidebar.nvim"] = { - config = { "\27LJ\2\nu\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\2B\0\2\1K\0\1\0\rsections\1\0\0\1\5\0\0\rdatetime\bgit\16diagnostics\ntodos\nsetup\17sidebar-nvim\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/sidebar.nvim", - url = "https://github.com/sidebar-nvim/sidebar.nvim" - }, - ["symbols-outline.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim", - url = "https://github.com/simrat39/symbols-outline.nvim" - }, - ["telescope-file-browser.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/telescope-file-browser.nvim", - url = "https://github.com/nvim-telescope/telescope-file-browser.nvim" - }, - ["telescope-fzf-native.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim", - url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" - }, - ["telescope-live-grep-args.nvim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/telescope-live-grep-args.nvim", - url = "https://github.com/nvim-telescope/telescope-live-grep-args.nvim" - }, - ["telescope.nvim"] = { - config = { "\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14telescope\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/telescope.nvim", - url = "https://github.com/nvim-telescope/telescope.nvim" - }, - ["tmux.nvim"] = { - config = { "\27LJ\2\n2\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\ttmux\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/tmux.nvim", - url = "https://github.com/aserowy/tmux.nvim" - }, - ["todo-comments.nvim"] = { - config = { "\27LJ\2\n\6\0\0\6\0+\00036\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\25\0005\3\6\0005\4\3\0005\5\4\0=\5\5\4=\4\a\0035\4\b\0=\4\t\0035\4\n\0005\5\v\0=\5\5\4=\4\f\0035\4\r\0005\5\14\0=\5\5\4=\4\15\0035\4\16\0005\5\17\0=\5\5\4=\4\18\0035\4\19\0005\5\20\0=\5\5\4=\4\21\0035\4\22\0005\5\23\0=\5\5\4=\4\24\3=\3\26\0025\3\27\0=\3\28\0025\3\30\0005\4\29\0=\4\31\0035\4 \0=\4!\0035\4\"\0=\4#\0035\4$\0=\4%\0035\4&\0=\4'\0035\4(\0=\4)\3=\3*\2B\0\2\1K\0\1\0\vcolors\ttest\1\3\0\0\15Identifier\f#FF00FF\fdefault\1\3\0\0\15Identifier\f#7C3AED\thint\1\3\0\0\19DiagnosticHint\f#10B981\tinfo\1\3\0\0\19DiagnosticInfo\f#2563EB\fwarning\1\4\0\0\22DiagnosticWarning\15WarningMsg\f#FBBF24\nerror\1\0\0\1\4\0\0\20DiagnosticError\rErrorMsg\f#DC2626\14highlight\1\0\1\18comments_only\1\rkeywords\1\0\0\tSENG\1\4\0\0\14SOLUTIONS\aSE\15WORKAROUND\1\0\2\ticon\t \ncolor\ttest\tNOTE\1\2\0\0\tINFO\1\0\2\ticon\t \ncolor\thint\tTODO\1\3\0\0\tTASK\bTBD\1\0\2\ticon\t \ncolor\thint\tWARN\1\3\0\0\fWARNING\nERROR\1\0\2\ticon\t \ncolor\nerror\tFEAT\1\3\0\0\tNEED\fREQUEST\1\0\2\ticon\t \ncolor\fwarning\tDONE\1\0\2\ticon\t \ncolor\tinfo\bFIX\1\0\0\balt\1\5\0\0\nFIXME\bBUG\nFIXIT\nISSUE\1\0\2\ticon\t \ncolor\nerror\nsetup\18todo-comments\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/todo-comments.nvim", - url = "https://github.com/folke/todo-comments.nvim" - }, - ["trouble.nvim"] = { - config = { "\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\ftrouble\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/trouble.nvim", - url = "https://github.com/folke/trouble.nvim" - }, - ["vem-tabline"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/vem-tabline", - url = "https://github.com/pacha/vem-tabline" - }, - ["vim-wakatime"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/vim-wakatime", - url = "https://github.com/wakatime/vim-wakatime" - }, - ["vista.vim"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/vista.vim", - url = "https://github.com/liuchengxu/vista.vim" - }, - ["which-key.nvim"] = { - config = { "\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0" }, - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/which-key.nvim", - url = "https://github.com/folke/which-key.nvim" - } -} - -time([[Defining packer_plugins]], false) --- Setup for: markdown-preview.nvim -time([[Setup for markdown-preview.nvim]], true) -try_loadstring("\27LJ\2\n=\0\0\2\0\4\0\0056\0\0\0009\0\1\0005\1\3\0=\1\2\0K\0\1\0\1\2\0\0\rmarkdown\19mkdp_filetypes\6g\bvim\0", "setup", "markdown-preview.nvim") -time([[Setup for markdown-preview.nvim]], false) --- Config for: todo-comments.nvim -time([[Config for todo-comments.nvim]], true) -try_loadstring("\27LJ\2\n\6\0\0\6\0+\00036\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\25\0005\3\6\0005\4\3\0005\5\4\0=\5\5\4=\4\a\0035\4\b\0=\4\t\0035\4\n\0005\5\v\0=\5\5\4=\4\f\0035\4\r\0005\5\14\0=\5\5\4=\4\15\0035\4\16\0005\5\17\0=\5\5\4=\4\18\0035\4\19\0005\5\20\0=\5\5\4=\4\21\0035\4\22\0005\5\23\0=\5\5\4=\4\24\3=\3\26\0025\3\27\0=\3\28\0025\3\30\0005\4\29\0=\4\31\0035\4 \0=\4!\0035\4\"\0=\4#\0035\4$\0=\4%\0035\4&\0=\4'\0035\4(\0=\4)\3=\3*\2B\0\2\1K\0\1\0\vcolors\ttest\1\3\0\0\15Identifier\f#FF00FF\fdefault\1\3\0\0\15Identifier\f#7C3AED\thint\1\3\0\0\19DiagnosticHint\f#10B981\tinfo\1\3\0\0\19DiagnosticInfo\f#2563EB\fwarning\1\4\0\0\22DiagnosticWarning\15WarningMsg\f#FBBF24\nerror\1\0\0\1\4\0\0\20DiagnosticError\rErrorMsg\f#DC2626\14highlight\1\0\1\18comments_only\1\rkeywords\1\0\0\tSENG\1\4\0\0\14SOLUTIONS\aSE\15WORKAROUND\1\0\2\ticon\t \ncolor\ttest\tNOTE\1\2\0\0\tINFO\1\0\2\ticon\t \ncolor\thint\tTODO\1\3\0\0\tTASK\bTBD\1\0\2\ticon\t \ncolor\thint\tWARN\1\3\0\0\fWARNING\nERROR\1\0\2\ticon\t \ncolor\nerror\tFEAT\1\3\0\0\tNEED\fREQUEST\1\0\2\ticon\t \ncolor\fwarning\tDONE\1\0\2\ticon\t \ncolor\tinfo\bFIX\1\0\0\balt\1\5\0\0\nFIXME\bBUG\nFIXIT\nISSUE\1\0\2\ticon\t \ncolor\nerror\nsetup\18todo-comments\frequire\0", "config", "todo-comments.nvim") -time([[Config for todo-comments.nvim]], false) --- Config for: which-key.nvim -time([[Config for which-key.nvim]], true) -try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0", "config", "which-key.nvim") -time([[Config for which-key.nvim]], false) --- Config for: telescope.nvim -time([[Config for telescope.nvim]], true) -try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14telescope\frequire\0", "config", "telescope.nvim") -time([[Config for telescope.nvim]], false) --- Config for: sidebar.nvim -time([[Config for sidebar.nvim]], true) -try_loadstring("\27LJ\2\nu\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\2B\0\2\1K\0\1\0\rsections\1\0\0\1\5\0\0\rdatetime\bgit\16diagnostics\ntodos\nsetup\17sidebar-nvim\frequire\0", "config", "sidebar.nvim") -time([[Config for sidebar.nvim]], false) --- Config for: trouble.nvim -time([[Config for trouble.nvim]], true) -try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\ftrouble\frequire\0", "config", "trouble.nvim") -time([[Config for trouble.nvim]], false) --- Config for: mini.pairs -time([[Config for mini.pairs]], true) -try_loadstring("\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\15mini.pairs\frequire\0", "config", "mini.pairs") -time([[Config for mini.pairs]], false) --- Config for: null-ls.nvim -time([[Config for null-ls.nvim]], true) -try_loadstring("\27LJ\2\nC\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\1\ndebug\2\nsetup\fnull-ls\frequire\0", "config", "null-ls.nvim") -time([[Config for null-ls.nvim]], false) --- Config for: mini.fuzzy -time([[Config for mini.fuzzy]], true) -try_loadstring("\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\15mini.fuzzy\frequire\0", "config", "mini.fuzzy") -time([[Config for mini.fuzzy]], false) --- Config for: mason.nvim -time([[Config for mason.nvim]], true) -try_loadstring("\27LJ\2\n3\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\nmason\frequire\0", "config", "mason.nvim") -time([[Config for mason.nvim]], false) --- Config for: gitsigns.nvim -time([[Config for gitsigns.nvim]], true) -try_loadstring("\27LJ\2\n6\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\rgitsigns\frequire\0", "config", "gitsigns.nvim") -time([[Config for gitsigns.nvim]], false) --- Config for: nvim-mapper -time([[Config for nvim-mapper]], true) -try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\16nvim-mapper\frequire\0", "config", "nvim-mapper") -time([[Config for nvim-mapper]], false) --- Config for: nvim-dap-python -time([[Config for nvim-dap-python]], true) -try_loadstring("\27LJ\2\n^\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0'\2\3\0B\0\2\1K\0\1\0&~/.virtualenvs/debugpy/bin/python\nsetup\15dap-python\frequire\0", "config", "nvim-dap-python") -time([[Config for nvim-dap-python]], false) --- Config for: tmux.nvim -time([[Config for tmux.nvim]], true) -try_loadstring("\27LJ\2\n2\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\ttmux\frequire\0", "config", "tmux.nvim") -time([[Config for tmux.nvim]], false) --- Config for: mini.move -time([[Config for mini.move]], true) -try_loadstring("\27LJ\2\n\1\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\2B\0\2\1K\0\1\0\rmappings\1\0\0\1\0\b\15line_right\14\aup\v\14line_left\r\tdown\r\14line_down\r\nright\14\fline_up\v\tleft\r\nsetup\14mini.move\frequire\0", "config", "mini.move") -time([[Config for mini.move]], false) --- Config for: mkdnflow.nvim -time([[Config for mkdnflow.nvim]], true) -try_loadstring("\27LJ\2\n\2\0\0\6\0\23\0\0316\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\21\0005\3\5\0005\4\4\0005\5\3\0>\5\1\4=\4\6\0035\4\b\0005\5\a\0>\5\1\4=\4\t\0035\4\v\0005\5\n\0>\5\1\4=\4\f\0035\4\14\0005\5\r\0>\5\1\4=\4\15\0035\4\17\0005\5\16\0>\5\1\4=\4\18\0035\4\19\0=\4\20\3=\3\22\2B\0\2\1K\0\1\0\rmappings\1\0\1\twrap\2\19MkdnFollowLink\1\3\0\0\6n\14p\rMkdnSTab\1\3\0\0\0\f\1\2\0\0\6i\fMkdnTab\1\3\0\0\0\n\1\2\0\0\6i\14MkdnEnter\1\3\0\0\0\t\1\2\0\0\6n\20MkdnNewListItem\1\3\0\0\0\t\1\2\0\0\6i\19MkdnToggleToDo\1\0\1\22MkdnTableNextCell\1\1\3\0\0\0\14\1\3\0\0\6i\6n\nsetup\rmkdnflow\frequire\0", "config", "mkdnflow.nvim") -time([[Config for mkdnflow.nvim]], false) -vim.cmd [[augroup packer_load_aucmds]] -vim.cmd [[au!]] - -- Filetype lazy-loads -time([[Defining lazy-load filetype autocommands]], true) -vim.cmd [[au FileType markdown ++once lua require("packer.load")({'markdown-preview.nvim'}, { ft = "markdown" }, _G.packer_plugins)]] -time([[Defining lazy-load filetype autocommands]], false) -vim.cmd("augroup END") - -_G._packer.inside_compile = false -if _G._packer.needs_bufread == true then - vim.cmd("doautocmd BufRead") -end -_G._packer.needs_bufread = 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