commit 1f66ee24e0def1d2297a376a5b27ae75893b5eed Author: Norm Rasmussen Date: Thu Mar 3 13:52:43 2022 -0500 First Commit diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..0bcfe36 Binary files /dev/null and b/.DS_Store differ diff --git a/data/.DS_Store b/data/.DS_Store new file mode 100644 index 0000000..e56a20e Binary files /dev/null and b/data/.DS_Store differ diff --git a/data/lsp_servers/bash.lua b/data/lsp_servers/bash.lua new file mode 100644 index 0000000..4011d9a --- /dev/null +++ b/data/lsp_servers/bash.lua @@ -0,0 +1,6 @@ +local lsp_config = require('nvim-lspconfig') +local on_attach = require('lsp/on_attach') + +lsp_config.bashls.setup({ + on_attach = on_attach +}) diff --git a/data/lsp_servers/css.lua b/data/lsp_servers/css.lua new file mode 100644 index 0000000..78aad55 --- /dev/null +++ b/data/lsp_servers/css.lua @@ -0,0 +1,21 @@ +local lsp_config = require('nvim-lspconfig') +local on_attach = require('lsp/on_attach') + +lsp_config.cssls.setup({ + filetypes = { 'css', 'sass', 'scss' }, + settings = { + css = { + validate = true + }, + sass = { + validate = true + }, + scss = { + validate = true + } + }, + on_attach = function(client) + client.resolved_capabilities.document_formatting = false + on_attach(client) + end +}) diff --git a/data/lsp_servers/html.lua b/data/lsp_servers/html.lua new file mode 100644 index 0000000..92b35a4 --- /dev/null +++ b/data/lsp_servers/html.lua @@ -0,0 +1,9 @@ +local lsp_config = require('plugins/nvim-lspconfig') +local on_attach = require('lsp/on_attach') + +lsp_config.html.setup({ + on_attach = function(client) + client.resolved_capabilities.document_formatting = false + on_attach(client) + end +}) diff --git a/data/lsp_servers/init.lua b/data/lsp_servers/init.lua new file mode 100644 index 0000000..91b4a8c --- /dev/null +++ b/data/lsp_servers/init.lua @@ -0,0 +1,37 @@ +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( + vim.lsp.diagnostic.on_publish_diagnostics, + { + underline = true, + virtual_text = { + prefix = "●", + spacing = 2, + }, + update_in_insert = true, + severity_sort = true, + } +) + +vim.fn.sign_define("LspDiagnosticsSignError", { + text = "✖", + numhl = "LspDiagnosticsDefaultError", +}) +vim.fn.sign_define("LspDiagnosticsSignWarning", { + text = "▲", + numhl = "LspDiagnosticsDefaultWarning", +}) +vim.fn.sign_define("LspDiagnosticsSignInformation", { + text = "●", + numhl = "LspDiagnosticsDefaultInformation", +}) +vim.fn.sign_define("LspDiagnosticsSignHint", { + text = "✱", + numhl = "LspDiagnosticsDefaultHint", +}) + +require "lsp/bash" +require "lsp/css" +require "lsp/html" +require "lsp/json" +require "lsp/typescript" +require "lsp/vim" +require "lsp/vim" diff --git a/data/lsp_servers/json.lua b/data/lsp_servers/json.lua new file mode 100644 index 0000000..2e65e73 --- /dev/null +++ b/data/lsp_servers/json.lua @@ -0,0 +1,9 @@ +local lsp_config = require('plugins/nvim-lspconfig') +local on_attach = require('lsp/on_attach') + +lsp_config.jsonls.setup({ + on_attach = function(client) + client.resolved_capabilities.document_formatting = false + on_attach(client) + end +}) diff --git a/data/lsp_servers/lua.lua b/data/lsp_servers/lua.lua new file mode 100644 index 0000000..c5c9a0c --- /dev/null +++ b/data/lsp_servers/lua.lua @@ -0,0 +1,29 @@ +local lsp_config = require('nvim-lspconfig') +local on_attach = require('lsp/on_attach') + +lsp_config.sumneko_lua.setup({ + on_attach = on_attach, + settings = { + Lua = { + runtime = { + version = 'LuaJIT', + }, + diagnostics = { + enable = true, + globals = { + "vim", + "describe", + "it", + "before_each", + "after_each" + } + }, + workspace = { + library = { + [vim.fn.expand('$VIMRUNTIME/lua')] = true, + [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true + }, + }, + } + } +}) diff --git a/data/lsp_servers/theme_check.lua b/data/lsp_servers/theme_check.lua new file mode 100644 index 0000000..260c416 --- /dev/null +++ b/data/lsp_servers/theme_check.lua @@ -0,0 +1,9 @@ +local lsp_config = require('plugins/nvim-lspconfig') +local on_attach = require('lsp/on_attach') + +lsp_config.tsserver.setup({ + on_attach = function(client) + client.resolved_capabilities.document_formatting = false + on_attach(client) + end +}) diff --git a/data/lsp_servers/typescript.lua b/data/lsp_servers/typescript.lua new file mode 100644 index 0000000..a19f53e --- /dev/null +++ b/data/lsp_servers/typescript.lua @@ -0,0 +1,9 @@ +local lsp_config = require('nvim-lspconfig') +local on_attach = require('lsp/on_attach') + +lsp_config.tsserver.setup({ + on_attach = function(client) + client.resolved_capabilities.document_formatting = false + on_attach(client) + end +}) diff --git a/data/lsp_servers/vim.lua b/data/lsp_servers/vim.lua new file mode 100644 index 0000000..83ffc55 --- /dev/null +++ b/data/lsp_servers/vim.lua @@ -0,0 +1,6 @@ +local lsp_config = require('nvim-lspconfig') +local on_attach = require('lsp/on_attach') + +lsp_config.vimls.setup({ + on_attach = on_attach +}) diff --git a/init.lua b/init.lua new file mode 100755 index 0000000..24495e5 --- /dev/null +++ b/init.lua @@ -0,0 +1,14 @@ +require('settings') +require('keymaps') +require('plugins/plugins') +require('plugins/nvim-tree') +require('plugins/indent-blankline') +require('plugins/feline') +require('plugins/vista') +require('plugins/nvim-cmp') +require('plugins/nvim-lspconfig') +require('plugins/nvim-treesitter') +require('plugins/telescope') +require('plugins/alpha-nvim') +require('plugins/symbols-outline') +require('plugins/nvim-lsp-installer') diff --git a/lua/.DS_Store b/lua/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/lua/.DS_Store differ diff --git a/lua/colors.lua b/lua/colors.lua new file mode 100644 index 0000000..a55013d --- /dev/null +++ b/lua/colors.lua @@ -0,0 +1,39 @@ +----------------------------------------------------------- +-- Color schemes configuration file +----------------------------------------------------------- + +-- Import color scheme with: +--- require('colors').colorscheme_name + +local M = {} + + -- 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/interface/popup.lua b/lua/interface/popup.lua new file mode 100644 index 0000000..a34bd26 --- /dev/null +++ b/lua/interface/popup.lua @@ -0,0 +1,64 @@ +local Popup = {} + +--- Create a new floating window +-- @param config The configuration passed to vim.api.nvim_open_win +-- @param win_opts The options registered with vim.api.nvim_win_set_option +-- @param buf_opts The options registered with vim.api.nvim_buf_set_option +-- @return A new popup +function Popup:new(opts) + opts = opts or {} + opts.layout = opts.layout or {} + opts.win_opts = opts.win_opts or {} + opts.buf_opts = opts.buf_opts or {} + + Popup.__index = Popup + + local editor_layout = { + height = vim.o.lines - vim.o.cmdheight - 2, -- Add margin for status and buffer line + width = vim.o.columns, + } + local popup_layout = { + relative = "editor", + height = math.floor(editor_layout.height * 0.9), + width = math.floor(editor_layout.width * 0.8), + style = "minimal", + border = "rounded", + } + popup_layout.row = math.floor((editor_layout.height - popup_layout.height) / 2) + popup_layout.col = math.floor((editor_layout.width - popup_layout.width) / 2) + + local obj = { + buffer = im.api.nvim_create_buf(false, true), + layout = vim.tbl_deep_extend("force", popup_layout, opts.layout), + win_opts = opts.win_opts, + buf_opts = opts.buf_opts, + } + + setmetatable(obj, Popup) + + return obj +end + +--- Display the popup with the provided content +-- @param content_provider A function accepting the popup's layout and returning the content to display +function Popup:display(content_provider) + self.win_id = vim.api.nvim_open_win(self.buffer, true, self.layout) + vim.api.nvim_command( + string.format("autocmd BufHidden,BufLeave ++once lua pcall(vim.api.nvim_win_close, %d, true)", self.win_id) + ) + + local lines = content_provider(self.layout) + vim.api.nvim_buf_set_lines(self.bufnr or 0, 0, -1, false, lines) + + -- window options + for key, value in pairs(self.win_opts) do + vim.api.nvim_win_set_option(self.win_id or 0, key, value) + end + + -- buffer options + for key, value in pairs(self.buf_opts) do + vim.api.nvim_buf_set_option(self.buffer, key, value) + end +end + +return Popup diff --git a/lua/interface/text.lua b/lua/interface/text.lua new file mode 100644 index 0000000..03e706e --- /dev/null +++ b/lua/interface/text.lua @@ -0,0 +1,95 @@ +local M = {} + +local function max_len_line(lines) + local max_len = 0 + + for _, line in ipairs(lines) do + local line_len = line:len() + if line_len > max_len then + max_len = line_len + end + end + + return max_len +end + +--- Left align lines relatively to the parent container +-- @param container The container where lines will be displayed +-- @param lines The text to align +-- @param alignment The alignment value, range: [0-1] +function M.align_left(container, lines, alignment) + local max_len = max_len_line(lines) + local indent_amount = math.ceil(math.max(container.width - max_len, 0) * alignment) + return M.shift_right(lines, indent_amount) +end + +--- Center align lines relatively to the parent container +-- @param container The container where lines will be displayed +-- @param lines The text to align +-- @param alignment The alignment value, range: [0-1] +function M.align_center(container, lines, alignment) + local output = {} + local max_len = max_len_line(lines) + + for _, line in ipairs(lines) do + local padding = string.rep(" ", (math.max(container.width, max_len) - line:len()) * alignment) + table.insert(output, padding .. line) + end + + return output +end + +--- Shift lines by a given amount +-- @params lines The lines the shift +-- @param amount The amount of spaces to add +function M.shift_right(lines, amount) + local output = {} + local padding = string.rep(" ", amount) + + for _, line in ipairs(lines) do + table.insert(output, padding .. line) + end + + return output +end + +--- Pretty format tables +-- @param entries The table to format +-- @param col_count The number of column to span the table on +-- @param col_sep The separator between each column, default: " " +function M.format_table(entries, col_count, col_sep) + col_sep = col_sep or " " + + local col_rows = math.ceil(vim.tbl_count(entries) / col_count) + local cols = {} + local count = 0 + + for i, entry in ipairs(entries) do + if ((i - 1) % col_rows) == 0 then + table.insert(cols, {}) + count = count + 1 + end + table.insert(cols[count], entry) + end + + local col_max_len = {} + for _, col in ipairs(cols) do + table.insert(col_max_len, max_len_line(col)) + end + + local output = {} + for i, col in ipairs(cols) do + for j, entry in ipairs(col) do + if not output[j] then + output[j] = entry + else + local padding = string.rep(" ", col_max_len[i - 1] - cols[i - 1][j]:len()) + output[j] = output[j] .. padding .. col_sep .. entry + end + end + end + + return output +end + +return M diff --git a/lua/keymaps.lua b/lua/keymaps.lua new file mode 100644 index 0000000..f160819 --- /dev/null +++ b/lua/keymaps.lua @@ -0,0 +1,34 @@ +----------------------------------------------------------- +-- Keymaps of Neovim and installed plugins. +----------------------------------------------------------- + +local map = vim.api.nvim_set_keymap +local default_opts = { noremap = true, silent = true } + +-- Fast saving with and s +map('n', 's', ':w', default_opts) +map('i', 's', ':w', default_opts) + +-- Move around splits using Ctrl + {h,j,k,l} +map('n', '', 'h', default_opts) +map('n', '', 'j', default_opts) +map('n', '', 'k', default_opts) +map('n', '', 'l', default_opts) + +-- Close all windows and exit from Neovim with and q +map('n', 'q', ':qa!', default_opts) + +----------------------------------------------------------- +-- Applications and Plugins shortcuts +----------------------------------------------------------- + +-- Open terminal +map('n', '', ':Term', { noremap = true }) + +-- nvim-tree +map('n', '', ':NvimTreeToggle', default_opts) -- open/close +map('n', 'r', ':NvimTreeRefresh', default_opts) -- refresh +map('n', 'n', ':NvimTreeFindFile', default_opts) -- search file + +-- Vista tag-viewer +map('n', '', ':Vista!!', default_opts) -- open/close diff --git a/lua/plugins/alpha-nvim.lua b/lua/plugins/alpha-nvim.lua new file mode 100644 index 0000000..11c0386 --- /dev/null +++ b/lua/plugins/alpha-nvim.lua @@ -0,0 +1,48 @@ +----------------------------------------------------------- +-- 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', ':NvimTreeOpen'), + dashboard.button('s', ' Settings', ':e $MYVIMRC'), + 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/feline.lua b/lua/plugins/feline.lua new file mode 100644 index 0000000..dda105d --- /dev/null +++ b/lua/plugins/feline.lua @@ -0,0 +1,257 @@ +---------------------------------------------------------- +-- 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').monokai + +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 new file mode 100644 index 0000000..9d77d60 --- /dev/null +++ b/lua/plugins/gitsigns.lua @@ -0,0 +1,83 @@ +local M = {} + +local opts = { + set = { + 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", + }, + }, + numhl = false, + linehl = false, + keymaps = { + -- Default keymap options + noremap = true, + buffer = true, + }, + signcolumn = true, + word_diff = false, + 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_opts = { + relative_time = false, + }, + max_file_length = 40000, + preview_config = { + -- Options passed to nvim_open_win + border = "rounded", + style = "minimal", + relative = "cursor", + row = 0, + col = 1, + }, + watch_gitdir = { + interval = 1000, + follow_files = true, + }, + sign_priority = 6, + update_debounce = 200, + status_formatter = nil, -- Use default + }, + } + +M.setup = function() + local gitsigns = require "gitsigns" + + gitsigns.setup(opts.set) + +end + +return M diff --git a/lua/plugins/indent-blankline.lua b/lua/plugins/indent-blankline.lua new file mode 100644 index 0000000..8ed0c97 --- /dev/null +++ b/lua/plugins/indent-blankline.lua @@ -0,0 +1,25 @@ +----------------------------------------------------------- +-- Indent line configuration file +----------------------------------------------------------- + +-- Plugin: indent-blankline +-- url: https://github.com/lukas-reineke/indent-blankline.nvim + + +require('indent_blankline').setup { + char = "▏", + show_first_indent_level = false, + filetype_exclude = { + 'help', + 'git', + 'markdown', + 'text', + 'terminal', + 'lspinfo', + 'packer', + }, + buftype_exclude = { + 'terminal', + 'nofile', + }, +} diff --git a/lua/plugins/nvim-cmp.lua b/lua/plugins/nvim-cmp.lua new file mode 100644 index 0000000..25032fb --- /dev/null +++ b/lua/plugins/nvim-cmp.lua @@ -0,0 +1,68 @@ +----------------------------------------------------------- +-- Autocomplete configuration file +----------------------------------------------------------- + +-- Plugin: nvim-cmp +-- url: https://github.com/hrsh7th/nvim-cmpa + + +local cmp = require 'cmp' +local luasnip = require 'luasnip' + +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.close(), + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + + -- 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' }, + }, +} + diff --git a/lua/plugins/nvim-lsp-installer.lua b/lua/plugins/nvim-lsp-installer.lua new file mode 100644 index 0000000..a33f35b --- /dev/null +++ b/lua/plugins/nvim-lsp-installer.lua @@ -0,0 +1,11 @@ +local lsp_installer = require("nvim-lsp-installer") + +lsp_installer.settings({ + ui = { + icons = { + server_installed = "✓", + server_pending = "➜", + server_uninstalled = "✗" + } + } +}) diff --git a/lua/plugins/nvim-lspconfig.lua b/lua/plugins/nvim-lspconfig.lua new file mode 100644 index 0000000..aa3731b --- /dev/null +++ b/lua/plugins/nvim-lspconfig.lua @@ -0,0 +1,109 @@ +----------------------------------------------------------- +-- Neovim LSP configuration file +----------------------------------------------------------- + +-- Plugin: nvim-lspconfig +-- url: https://github.com/neovim/nvim-lspconfig + +local nvim_lsp = require 'lspconfig' + +-- Add additional capabilities supported by nvim-cmp +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities.textDocument.completion.completionItem.documentationFormat = { 'markdown', 'plaintext' } +capabilities.textDocument.completion.completionItem.snippetSupport = true +capabilities.textDocument.completion.completionItem.preselectSupport = true +capabilities.textDocument.completion.completionItem.insertReplaceSupport = true +capabilities.textDocument.completion.completionItem.labelDetailsSupport = true +capabilities.textDocument.completion.completionItem.deprecatedSupport = true +capabilities.textDocument.completion.completionItem.commitCharactersSupport = true +capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } } +capabilities.textDocument.completion.completionItem.resolveSupport = { + properties = { + 'documentation', + 'detail', + 'additionalTextEdits', + }, +} + +-- 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: + +Add your language server to `servers` + +For language servers list see: +https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md + +Bash --> bashls +https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#bashls + +Python --> pyright +https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pyright + +C-C++ --> clangd +https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#clangd + +HTML/CSS/JSON --> vscode-html-languageserver +https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html + +JavaScript/TypeScript --> tsserver +https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tsserver + +--]] + +-- Use a loop to conveniently call 'setup' on multiple servers and +-- map buffer local keybindings when the language server attaches +local servers = { 'bashls', 'pyright', 'pylsp', 'clangd', 'html', 'tsserver', 'grammarly', 'dockerls', 'css', 'cssmodules_ls', 'arduino_language_server', 'pyre', 'gopls', 'theme_check' } + +-- Set settings for language servers: + +-- tsserver settings +local ts_settings = function(client) + client.resolved_capabilities.document_formatting = false + ts_settings(client) +end + +-- Call setup +for _, lsp in ipairs(servers) do + nvim_lsp[lsp].setup { + on_attach = on_attach, + capabilities = capabilities, + ts_settings = ts_settings, + flags = { + debounce_text_changes = 150, + } + } +end diff --git a/lua/plugins/nvim-tree.lua b/lua/plugins/nvim-tree.lua new file mode 100644 index 0000000..46722f0 --- /dev/null +++ b/lua/plugins/nvim-tree.lua @@ -0,0 +1,48 @@ +----------------------------------------------------------- +-- 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 + +g.nvim_tree_quit_on_open = 0 +g.nvim_tree_indent_markers = 1 +g.nvim_tree_git_hl = 1 +g.nvim_tree_highlight_opened_files = 1 +g.nvim_tree_disable_window_picker = 1 +g.nvim_tree_respect_buf_cwd = 1 +g.nvim_tree_width_allow_resize = 1 +g.nvim_tree_show_icons = { + git = 1, + folders = 1, + files = 1 +} + +g.nvim_tree_icons = { + default = "‣ " +} + +require('nvim-tree').setup { + open_on_setup = true, + update_cwd = true, + filters = { + dotfiles = true, + custom = { '.git', 'node_modules', '.cache', '.bin' }, + }, + git = { + enable = true, + ignore = true, + }, + view = { + width = 32, + auto_resize = true + }, +} diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua new file mode 100644 index 0000000..ff81bb2 --- /dev/null +++ b/lua/plugins/nvim-treesitter.lua @@ -0,0 +1,15 @@ + + +----------------------------------------------------------- +-- Treesitter configuration file +---------------------------------------------------------- + +-- Plugin: nvim-treesitter +-- url: https://github.com/nvim-treesitter/nvim-treesitter + + +require('nvim-treesitter.configs').setup { + highlight = { + enable = true, + }, +} diff --git a/lua/plugins/plugins.lua b/lua/plugins/plugins.lua new file mode 100755 index 0000000..53a981e --- /dev/null +++ b/lua/plugins/plugins.lua @@ -0,0 +1,67 @@ +local cmd = vim.cmd +cmd [[packadd packer.nvim]] + +return require'packer'.startup(function() + use 'wbthomason/packer.nvim' + use 'wakatime/vim-wakatime' + use 'kyazdani42/nvim-tree.lua' + use 'nvim-treesitter/nvim-treesitter' + use 'sheerun/vim-polyglot' + use 'tjdevries/colorbuddy.nvim' + use 'bkegley/gloombuddy' + use {'prettier/vim-prettier', run = 'yarn install' } + use 'lukas-reineke/indent-blankline.nvim' + use 'simrat39/symbols-outline.nvim' + use 'kyazdani42/nvim-web-devicons' + use 'liuchengxu/vista.vim' + use 'nvim-lua/plenary.nvim' + use 'nvim-lua/popup.nvim' + use 'tanvirtin/monokai.nvim' + use 'lunarvim/colorschemes' + use 'christoomey/vim-tmux-navigator' + use { 'rose-pine/neovim', as = 'rose-pine' } + use 'folke/tokyonight.nvim' + use 'williamboman/nvim-lsp-installer' + use 'neovim/nvim-lspconfig' + use { + 'famiu/feline.nvim', + requires = { 'kyazdani42/nvim-web-devicons' }, + } + use { + 'lewis6991/gitsigns.nvim', + requires = { 'nvim-lua/plenary.nvim' }, + config = function() + require('gitsigns').setup() + end + } + use { + 'goolord/alpha-nvim', + requires = { 'kyazdani42/nvim-web-devicons' }, + } + use { + "nvim-telescope/telescope.nvim", + requires = { + "nvim-lua/popup.nvim", + "nvim-lua/plenary.nvim", + }, + config = function() + require "plugins/telescope" + end, + } + use { + 'windwp/nvim-autopairs', + config = function() + require('nvim-autopairs').setup() + end + } + use { + 'hrsh7th/nvim-cmp', + requires = { + 'L3MON4D3/LuaSnip', + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-buffer', + 'saadparwaiz1/cmp_luasnip', + }, + } +end) diff --git a/lua/plugins/symbols-outline.lua b/lua/plugins/symbols-outline.lua new file mode 100644 index 0000000..ca90a02 --- /dev/null +++ b/lua/plugins/symbols-outline.lua @@ -0,0 +1,59 @@ +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 new file mode 100644 index 0000000..92e0ed1 --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,104 @@ +local actions = require "telescope.actions" + +local M = {} + +M.project_files = function() + local opts = {} -- define here if you want to define something + local ok = pcall(require("telescope.builtin").git_files, opts) + if not ok then + require("telescope.builtin").find_files(opts) + end +end + +require("telescope").setup { + defaults = { + prompt_prefix = "/ ", + selection_caret = "⯈ ", + color_devicons = false, + mappings = { + i = { + [""] = actions.close, + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.close, + [""] = false, + [""] = false, + [""] = actions.select_default + actions.center, + [""] = actions.select_horizontal, + [""] = actions.select_vertical, + [""] = actions.preview_scrolling_up, + [""] = actions.preview_scrolling_down, + }, + n = { + [""] = actions.close, + [""] = actions.select_default + actions.center, + [""] = actions.select_horizontal, + [""] = actions.select_vertical, + ["j"] = actions.move_selection_next, + ["k"] = actions.move_selection_previous, + [""] = false, + [""] = false, + [""] = actions.preview_scrolling_up, + [""] = actions.preview_scrolling_down, + }, + }, + file_ignore_patterns = { + ".git/*", + "node_modules/*", + "bower_components/*", + ".svn/*", + ".hg/*", + "CVS/*", + ".next/*", + ".docz/*", + ".DS_Store", + }, + layout_strategy = "flex", + scroll_strategy = "cycle", + }, + pickers = { + find_files = { + theme = "ivy", + }, + git_files = { + theme = "ivy", + }, + live_grep = { + theme = "ivy", + previewer = false, + }, + file_browser = { + theme = "ivy", + previewer = false, + }, + }, +} + +vim.api.nvim_set_keymap( + "n", + "", + 'lua require("plugins/telescope").project_files()', + { noremap = true, silent = true } +) +vim.api.nvim_set_keymap( + "n", + "g", + 'lua require("telescope.builtin").live_grep()', + { noremap = true, silent = true } +) +vim.api.nvim_set_keymap( + "n", + "f", + 'lua require("telescope.builtin").file_browser()', + { noremap = true, silent = true } +) +vim.api.nvim_set_keymap( + "n", + "b", + 'lua require("telescope.builtin").buffers()', + { noremap = true, silent = true } +) + +return M diff --git a/lua/plugins/vista.lua b/lua/plugins/vista.lua new file mode 100644 index 0000000..82cd63a --- /dev/null +++ b/lua/plugins/vista.lua @@ -0,0 +1,37 @@ +---------------------------------------------------------- +-- Vista (tagbar) configuration file +----------------------------------------------------------- + +-- Plugin: vista.vim +-- url: https://github.com/liuchengxu/vista.vim + + +local g = vim.g +local cmd = vim.cmd + +-- How each level is indented and what to prepend. +--- This could make the display more compact or more spacious. +--- e.g., more compact: ["▸ ", ""] +--- Note: this option only works for the kind renderer, not the tree renderer +g.vista_icon_indent = '["╰─▸ ", "├─▸ "]' + +-- Executive used when opening vista sidebar without specifying it. +--- See all the avaliable executives via `:echo g:vista#executives`. +g.vista_default_executive = 'ctags' + +-- Ensure you have installed some decent font to show these pretty symbols, +--- then you can enable icon for the kind. +cmd [[let g:vista#renderer#enable_icon = 1]] + + +-- Change some default icons +--- see: https://github.com/slavfox/Cozette/blob/master/img/charmap.txt +cmd [[ + let g:vista#renderer#icons = { + \ "function": "\u0192", + \ "variable": "\uf00d", + \ "prototype": "\uf013", + \ "macro": "\uf00b", + \ } +]] + diff --git a/lua/settings/init.lua b/lua/settings/init.lua new file mode 100755 index 0000000..7f7d33b --- /dev/null +++ b/lua/settings/init.lua @@ -0,0 +1,87 @@ +-- 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) + +----------------------------------------------------------- +-- 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/bash" +opt.updatetime = 200 +opt.cursorline = true +----------------------------------------------------------- +-- Neovim UI +----------------------------------------------------------- +opt.number = true -- Show line number +opt.showmatch = true -- Highlight matching parenthesis +opt.foldmethod = 'marker' -- Enable folding (default 'foldmarker') +--opt.colorcolumn = '150' -- Line lenght marker at 80 columns +opt.splitright = true -- Vertical split to the right +opt.splitbelow = true -- Orizontal 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 + +----------------------------------------------------------- +-- Memory, CPU +----------------------------------------------------------- +opt.hidden = true -- Enable background buffers +opt.history = 100 -- Remember N lines in history +opt.lazyredraw = true -- Faster scrolling +opt.synmaxcol = 240 -- Max column for syntax highlight + +----------------------------------------------------------- +-- Colorscheme +----------------------------------------------------------- +opt.termguicolors = true -- Enable 24-bit RGB colors +cmd [[colorscheme tokyonight]] +----------------------------------------------------------- +-- Tabs, indent +----------------------------------------------------------- +opt.expandtab = true -- Use spaces instead of tabs +opt.shiftwidth = 4 -- Shift 4 spaces when tab +opt.tabstop = 4 -- 1 tab == 4 spaces +opt.smartindent = true -- Autoindent new lines + +-- 2 spaces for selected filetypes +cmd [[ + autocmd FileType liquid,xml,html,xhtml,css,scss,javascript,lua,yaml setlocal shiftwidth=2 tabstop=2 +]] + +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 diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua new file mode 100644 index 0000000..57907e5 --- /dev/null +++ b/plugin/packer_compiled.lua @@ -0,0 +1,257 @@ +-- Automatically generated packer.nvim plugin loader code + +if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then + vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') + return +end + +vim.api.nvim_command('packadd packer.nvim') + +local no_errors, error_msg = pcall(function() + + local time + local profile_info + local should_profile = false + if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 + end + end + else + time = function(chunk, start) end + end + +local function save_profiles(threshold) + local sorted_times = {} + for chunk_name, time_taken in pairs(profile_info) do + sorted_times[#sorted_times + 1] = {chunk_name, time_taken} + end + table.sort(sorted_times, function(a, b) return a[2] > b[2] end) + local results = {} + for i, elem in ipairs(sorted_times) do + if not threshold or threshold and elem[2] > threshold then + results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' + end + end + + _G._packer = _G._packer or {} + _G._packer.profile_output = results +end + +time([[Luarocks path setup]], true) +local package_path_str = "/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" + }, + ["alpha-nvim"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/alpha-nvim", + url = "https://github.com/goolord/alpha-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-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-path"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp-path", + url = "https://github.com/hrsh7th/cmp-path" + }, + cmp_luasnip = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + url = "https://github.com/saadparwaiz1/cmp_luasnip" + }, + ["colorbuddy.nvim"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/colorbuddy.nvim", + url = "https://github.com/tjdevries/colorbuddy.nvim" + }, + colorschemes = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/colorschemes", + url = "https://github.com/lunarvim/colorschemes" + }, + ["feline.nvim"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/feline.nvim", + url = "https://github.com/famiu/feline.nvim" + }, + ["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" + }, + gloombuddy = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/gloombuddy", + url = "https://github.com/bkegley/gloombuddy" + }, + ["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" + }, + ["monokai.nvim"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/monokai.nvim", + url = "https://github.com/tanvirtin/monokai.nvim" + }, + ["nvim-autopairs"] = { + config = { "\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0" }, + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-autopairs", + url = "https://github.com/windwp/nvim-autopairs" + }, + ["nvim-cmp"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-cmp", + url = "https://github.com/hrsh7th/nvim-cmp" + }, + ["nvim-lsp-installer"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer", + url = "https://github.com/williamboman/nvim-lsp-installer" + }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + url = "https://github.com/neovim/nvim-lspconfig" + }, + ["nvim-tree.lua"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", + url = "https://github.com/kyazdani42/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/kyazdani42/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" + }, + ["rose-pine"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/rose-pine", + url = "https://github.com/rose-pine/neovim" + }, + ["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.nvim"] = { + config = { "\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/telescope\frequire\0" }, + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/telescope.nvim", + url = "https://github.com/nvim-telescope/telescope.nvim" + }, + ["tokyonight.nvim"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", + url = "https://github.com/folke/tokyonight.nvim" + }, + ["vim-polyglot"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/vim-polyglot", + url = "https://github.com/sheerun/vim-polyglot" + }, + ["vim-prettier"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/vim-prettier", + url = "https://github.com/prettier/vim-prettier" + }, + ["vim-tmux-navigator"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/vim-tmux-navigator", + url = "https://github.com/christoomey/vim-tmux-navigator" + }, + ["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" + } +} + +time([[Defining packer_plugins]], 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: telescope.nvim +time([[Config for telescope.nvim]], true) +try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/telescope\frequire\0", "config", "telescope.nvim") +time([[Config for telescope.nvim]], false) +-- Config for: nvim-autopairs +time([[Config for nvim-autopairs]], true) +try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs") +time([[Config for nvim-autopairs]], false) +if should_profile then save_profiles() end + +end) + +if not no_errors then + error_msg = error_msg:gsub('"', '\\"') + vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') +end diff --git a/plugin/packer_complied.lua b/plugin/packer_complied.lua new file mode 100644 index 0000000..e69de29