fix config, use symlink

This commit is contained in:
unintendedfraud
2024-09-01 18:28:59 +02:00
parent 92037e846b
commit 9f4a6acb47
41 changed files with 244 additions and 1578 deletions
-1
View File
@@ -1 +0,0 @@
require("Comment").setup();
-1
View File
@@ -1 +0,0 @@
vim.keymap.set("n", "<leader>gs", vim.cmd.Git);
-10
View File
@@ -1,10 +0,0 @@
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)
-90
View File
@@ -1,90 +0,0 @@
-- Learn the keybindings, see :help lsp-zero-keybindings
-- Learn to configure LSP servers, see :help lsp-zero-api-showcase
local lsp = require("lsp-zero")
lsp.preset({
manage_nvim_cmp = {
set_sources = "lsp",
},
})
lsp.ensure_installed({
"tsserver",
"eslint",
"lua_ls",
"rust_analyzer",
"gopls",
})
local cmp = require("cmp")
local cmp_select = { behaviour = cmp.SelectBehavior.Select }
local cmp_mappings = lsp.defaults.cmp_mappings({
["<C-p"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n"] = cmp.mapping.select_next_item(cmp_select),
["<C-y"] = cmp.mapping.confirm({ select = true }),
["<C-Space"] = cmp.mapping.complete(),
})
lsp.set_preferences({
sign_icons = {},
})
lsp.setup_nvim_cmp({
mapping = cmp_mappings,
})
lsp.on_attach(function(client, bufnr)
local opts = { buffer = bufnr, remap = false }
lsp.default_keymaps({ buffer = bufnr })
lsp.buffer_autoformat()
vim.keymap.set("n", "gd", function()
vim.lsp.buf.definition()
end, opts)
vim.keymap.set("n", "gr", function()
vim.lsp.buf.references()
end, opts)
vim.keymap.set("n", "K", function()
vim.lsp.buf.hover()
end, opts)
vim.keymap.set("n", "<leader>vws", function()
vim.lsp.buf.workspace_symbol()
end, opts)
vim.keymap.set("n", "<leader>vd", function()
vim.lsp.diagnostic.open_float()
end, opts)
vim.keymap.set("n", "[d", function()
vim.lsp.diagnostic.goto_next()
end, opts)
vim.keymap.set("n", "]d", function()
vim.lsp.diagnostic.goto_prev()
end, opts)
vim.keymap.set("n", "<leader>vca", function()
vim.lsp.buf.code_action()
end, opts)
vim.keymap.set("n", "<leader>vrn", function()
vim.lsp.buf.rename()
end, opts)
vim.keymap.set("i", "<C-h>", function()
vim.lsp.buf.signature_help()
end, opts)
end)
lsp.setup()
vim.diagnostic.config({
virtual_text = true,
signs = false,
update_in_insert = false,
underline = true,
severity_sort = true,
float = {
focusable = false,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
})
-8
View File
@@ -1,8 +0,0 @@
require("lualine").setup({
options = {
icons_enabled = false,
theme = "onedark",
component_separators = "|",
section_separators = "",
}
});
-55
View File
@@ -1,55 +0,0 @@
-- null-ls setup
local null_ls = require("null-ls")
-- for conciseness
local formatting = null_ls.builtins.formatting -- to setup formatters
local diagnostics = null_ls.builtins.diagnostics -- to setup linters
-- to setup format on save
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
-- configure null_ls
null_ls.setup({
debug = true,
-- setup formatters & linters
sources = {
-- to disable file types use
-- "formatting.prettier.with({disabled_filetypes: {}})" (see null-ls docs)
formatting.prettier, -- js/ts formatter
formatting.rustfmt, -- rust formatter
formatting.stylua, -- lua formatter
formatting.gofumpt, -- go formatter
formatting.goimports, -- go auto-imports
diagnostics.eslint_d.with({
-- js/ts linter
-- only enable eslint if root has .eslintrc.js (not in youtube nvim video)
condition = function(utils)
return utils.root_has_file(".eslintrc.js") -- change file extension if you use something else
end,
}),
},
-- you can reuse a shared lspconfig on_attach callback here
on_attach = function(current_client, bufnr)
if current_client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
-- on 0.8, you should use vim.lsp.buf.format({ bufnr = bufnr }) instead
-- on later neovim version, you should use vim.lsp.buf.format({ async = false }) instead
vim.lsp.buf.format({
bufnr = bufnr,
async = false,
filter = function(client)
return client.name == "null-ls"
end,
})
-- vim.lsp.buf.formatting_sync()
end,
})
end
end,
})
-246
View File
@@ -1,246 +0,0 @@
local nvimtree = require('nvim-tree')
-- disable netrw at the very start of your init.lua (strongly advised)
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require("nvim-tree").setup { -- BEGIN_DEFAULT_OPTS
auto_reload_on_write = true,
disable_netrw = false,
hijack_cursor = false,
hijack_netrw = true,
hijack_unnamed_buffer_when_opening = false,
sort_by = "name",
root_dirs = {},
prefer_startup_root = false,
sync_root_with_cwd = false,
reload_on_bufenter = false,
respect_buf_cwd = true,
on_attach = "default",
remove_keymaps = false,
select_prompts = false,
view = {
centralize_selection = false,
cursorline = true,
debounce_delay = 15,
width = 30,
hide_root_folder = false,
side = "left",
preserve_window_proportions = false,
number = false,
relativenumber = false,
signcolumn = "yes",
mappings = {
custom_only = false,
list = {
-- user mappings go here
},
},
float = {
enable = false,
quit_on_focus_loss = true,
open_win_config = {
relative = "editor",
border = "rounded",
width = 30,
height = 30,
row = 1,
col = 1,
},
},
},
renderer = {
add_trailing = false,
group_empty = true,
highlight_git = false,
full_name = false,
highlight_opened_files = "none",
highlight_modified = "none",
root_folder_label = ":~:s?$?/..?",
indent_width = 2,
indent_markers = {
enable = false,
inline_arrows = true,
icons = {
corner = "└",
edge = "│",
item = "│",
bottom = "─",
none = " ",
},
},
icons = {
webdev_colors = false,
git_placement = "before",
modified_placement = "after",
padding = " ",
symlink_arrow = " ➛ ",
show = {
file = false,
folder = false,
folder_arrow = false,
git = false,
modified = false,
},
glyphs = {
default = " ",
symlink = " ",
bookmark = " ",
modified = "●",
folder = {
arrow_closed = " ",
arrow_open = " ",
default = " ",
open = " ",
empty = " ",
empty_open = " ",
symlink = " ",
symlink_open = " ",
},
git = {
unstaged = "✗",
staged = "✓",
unmerged = "",
renamed = "➜",
untracked = "★",
deleted = "",
ignored = "◌",
},
},
},
special_files = {},
symlink_destination = true,
},
hijack_directories = {
enable = true,
auto_open = true,
},
update_focused_file = {
enable = false,
update_root = false,
ignore_list = {},
},
system_open = {
cmd = "",
args = {},
},
diagnostics = {
enable = false,
show_on_dirs = false,
show_on_open_dirs = true,
debounce_delay = 50,
severity = {
min = vim.diagnostic.severity.HINT,
max = vim.diagnostic.severity.ERROR,
},
icons = {
hint = "",
info = "",
warning = "",
error = "",
},
},
filters = {
dotfiles = false,
git_clean = false,
no_buffer = false,
custom = {},
exclude = {},
},
filesystem_watchers = {
enable = true,
debounce_delay = 50,
ignore_dirs = {},
},
git = {
enable = false,
ignore = true,
show_on_dirs = true,
show_on_open_dirs = true,
timeout = 400,
},
modified = {
enable = false,
show_on_dirs = true,
show_on_open_dirs = true,
},
actions = {
use_system_clipboard = true,
change_dir = {
enable = true,
global = false,
restrict_above_cwd = false,
},
expand_all = {
max_folder_discovery = 300,
exclude = {},
},
file_popup = {
open_win_config = {
col = 1,
row = 1,
relative = "cursor",
border = "shadow",
style = "minimal",
},
},
open_file = {
quit_on_open = false,
resize_window = true,
window_picker = {
enable = true,
picker = "default",
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
exclude = {
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile", "terminal", "help" },
},
},
},
remove_file = {
close_window = true,
},
},
trash = {
cmd = "gio trash",
},
live_filter = {
prefix = "[FILTER]: ",
always_show_folders = true,
},
tab = {
sync = {
open = false,
close = false,
ignore = {},
},
},
notify = {
threshold = vim.log.levels.INFO,
},
ui = {
confirm = {
remove = true,
trash = true,
},
},
experimental = {
git = {
async = true,
},
},
log = {
enable = false,
truncate = false,
types = {
all = false,
config = false,
copy_paste = false,
dev = false,
diagnostics = false,
git = false,
profile = false,
watcher = false,
},
},
} -- END_DEFAULT_OPTS
-8
View File
@@ -1,8 +0,0 @@
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
vim.keymap.set("n", "<C-p>", builtin.git_files, {})
vim.keymap.set("n", "<leader>pb", builtin.buffers, {})
vim.keymap.set("n", "<leader>pd", builtin.diagnostics, {})
vim.keymap.set("n", "<leader>ps", function()
builtin.grep_string({ search = vim.fn.input("Grep > ") })
end)
-22
View File
@@ -1,22 +0,0 @@
require 'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the four listed parsers should always be installed)
ensure_installed = { "javascript", "typescript", "c", "lua", "vim", "rust", "go" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
highlight = {
-- `false` will disable the whole extension
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}
-1
View File
@@ -1 +0,0 @@
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
+26
View File
@@ -0,0 +1,26 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "7b1dda0dfdefc10b2501295eba5e463dbd7c338f" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" },
"gitsigns": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
"lazy.nvim": { "branch": "main", "commit": "e44636a43376e8a1e851958f7e9cbe996751d59f" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"lush": { "branch": "main", "commit": "7c0e27f50901481fe83b974493c4ea67a4296aeb" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" },
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
"mellifluous.nvim": { "branch": "main", "commit": "454cb9f1c2bade9d8ad99f6a3ce9c5d5509196d8" },
"nvim-cmp": { "branch": "main", "commit": "24122371810089d390847d8ba66325c1f1aa64c0" },
"nvim-lspconfig": { "branch": "master", "commit": "a27179f56c6f98a4cdcc79ee2971b514815a4940" },
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
"nvim-treesitter": { "branch": "master", "commit": "c26cfc75bc77b3538f4f288b013bc927a371bf2e" },
"plenary": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
"telescope.nvim": { "branch": "master", "commit": "6f6bb8065567b56c42e283b06e8a1c670c0092a1" },
"trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" },
"vim-fugitive": { "branch": "master", "commit": "ce882460cf3db12e99f8bf579cbf99e331f6dd4f" }
}
+48 -2
View File
@@ -1,4 +1,50 @@
require("mimu.packer")
require("mimu.remap")
require("mimu.set") require("mimu.set")
require("mimu.remap")
require("mimu.lazy")
local augroup = vim.api.nvim_create_augroup
local MimuGroup = augroup("mimu", {})
local autocmd = vim.api.nvim_create_autocmd
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
autocmd("LspAttach", {
group = MimuGroup,
callback = function(e)
local opts = { buffer = e.buf }
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
vim.keymap.set("n", "gr", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set("n", "<leader>vd", function() vim.lsp.diagnostic.open_float() end, opts)
-- vim.keymap.set("n", "[d", function() vim.lsp.diagnostic.goto_next() end, opts)
-- vim.keymap.set("n", "]d", function() vim.lsp.diagnostic.goto_prev() end, opts)
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
end
})
autocmd("BufWritePre", {
pattern = "*.go",
callback = function()
local params = vim.lsp.util.make_range_params()
params.context = { only = { "source.organizeImports" } }
-- buf_request_sync defaults to a 1000ms timeout. Depending on your
-- machine and codebase, you may want longer. Add an additional
-- argument after params if you find that you have to write the file
-- twice for changes to be saved.
-- E.g., vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, 3000)
local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params)
for cid, res in pairs(result or {}) do
for _, r in pairs(res.result or {}) do
if r.edit then
local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16"
vim.lsp.util.apply_workspace_edit(r.edit, enc)
end
end
end
vim.lsp.buf.format({ async = false })
end
})
-90
View File
@@ -1,90 +0,0 @@
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
-- telescope
use {
'nvim-telescope/telescope.nvim', tag = '0.1.1',
-- or , branch = '0.1.x',
requires = { { 'nvim-lua/plenary.nvim' } }
}
-- theme
use({
'ramojus/mellifluous.nvim',
requires = { 'rktjmp/lush.nvim' },
config = function()
require 'mellifluous'.setup({
styles = {
comments = '',
},
}) -- optional, see configuration section.
vim.cmd('colorscheme mellifluous')
end
})
-- treesitter
use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
-- nvim-tree
use {
'nvim-tree/nvim-tree.lua',
config = function()
require("nvim-tree").setup {}
end
}
-- harpoon
use("theprimeagen/harpoon")
-- null-ls, depends on plenary
use("nvim-lua/plenary.nvim")
use("jose-elias-alvarez/null-ls.nvim")
-- git / vim-fugitive
use("tpope/vim-fugitive")
use {
'lewis6991/gitsigns.nvim',
config = function()
require('gitsigns').setup({
current_line_blame = true,
})
end
}
-- lualine
use { 'nvim-lualine/lualine.nvim' }
-- Comment
use { 'numToStr/Comment.nvim' }
-- LSP
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v1.x',
requires = {
-- LSP Support
{ 'neovim/nvim-lspconfig' }, -- Required
{ 'williamboman/mason.nvim' }, -- Optional
{ 'williamboman/mason-lspconfig.nvim' }, -- Optional
-- Autocompletion
{ 'hrsh7th/nvim-cmp' }, -- Required
{ 'hrsh7th/cmp-nvim-lsp' }, -- Required
{ 'hrsh7th/cmp-buffer' }, -- Optional
{ 'hrsh7th/cmp-path' }, -- Optional
{ 'saadparwaiz1/cmp_luasnip' }, -- Optional
{ 'hrsh7th/cmp-nvim-lua' }, -- Optional
-- Snippets
{ 'L3MON4D3/LuaSnip' }, -- Required
{ 'rafamadriz/friendly-snippets' }, -- Optional
}
}
end)
-141
View File
@@ -1,141 +0,0 @@
local fzf_make_cmd = "make"
if vim.loop.os_uname().machine == "arm64" then
fzf_make_cmd = " arch -arm64 make"
end
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)
return require("lazy").setup({
defaults = {
lazy = true,
},
-- telescope
{
"nvim-telescope/telescope.nvim",
tag = "0.1.1",
opts = {
defaults = {
file_ignore_patterns = {
".git/worktrees",
".git/COMMIT_EDITMSG",
},
},
extensions = {
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", -- or "ignore_case" or "respect_case"
},
},
},
dependencies = {
"nvim-lua/plenary.nvim",
{ "nvim-telescope/telescope-fzf-native.nvim", build = fzf_make_cmd }, -- Fzf native
},
},
-- theme
{
"ramojus/mellifluous.nvim",
lazy = false,
priority = 1000,
dependencies = { "rktjmp/lush.nvim" },
config = function()
require("mellifluous").setup({
styles = {
comments = "",
},
}) -- optional, see configuration section.
vim.cmd("colorscheme mellifluous")
end,
},
-- treesitter
{
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPost", "BufNewFile" },
build = function()
require("nvim-treesitter.install").update({ with_sync = true })
end,
},
-- nvim-tree
{
"nvim-tree/nvim-tree.lua",
dependencies = {
"nvim-tree/nvim-web-devicons", -- optional
},
config = function()
require("nvim-tree").setup({})
end,
},
-- harpoon
{
"theprimeagen/harpoon",
event = "BufRead",
dependencies = {
"nvim-lua/plenary.nvim",
},
},
-- undotree
"mbbill/undotree",
-- git / vim-fugitive
{
"tpope/vim-fugitive",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"lewis6991/gitsigns.nvim",
},
config = function()
require("gitsigns").setup({
current_line_blame = true,
})
end,
},
-- lualine
"nvim-lualine/lualine.nvim",
-- Comment
{ "numToStr/Comment.nvim", event = "BufRead" },
-- LSP
{
"VonHeikemen/lsp-zero.nvim",
branch = "v1.x",
dependencies = {
-- LSP Support
{ "neovim/nvim-lspconfig" }, -- Required
{ "williamboman/mason.nvim" }, -- Optional
{ "williamboman/mason-lspconfig.nvim" }, -- Optional
-- Autocompletion
{ "hrsh7th/nvim-cmp" }, -- Required
{ "hrsh7th/cmp-nvim-lsp" }, -- Required
{ "hrsh7th/cmp-buffer" }, -- Optional
{ "hrsh7th/cmp-path" }, -- Optional
{ "saadparwaiz1/cmp_luasnip" }, -- Optional
{ "hrsh7th/cmp-nvim-lua" }, -- Optional
-- Snippets
{ "L3MON4D3/LuaSnip" }, -- Required
{ "rafamadriz/friendly-snippets" }, -- Optional
},
},
})
@@ -1,19 +1,19 @@
return { return {
-- Color scheme -- Color scheme
{ {
"rktjmp/lush.nvim", "rktjmp/lush.nvim",
name = "lush", name = "lush",
priority = 1000, priority = 1000,
}, },
{ {
"ramojus/mellifluous.nvim", "ramojus/mellifluous.nvim",
dependencies = { dependencies = {
"lush" "lush"
}, },
config = function() config = function()
vim.cmd("colorscheme mellifluous") vim.cmd("colorscheme mellifluous")
end, end,
}, },
{ {
@@ -22,20 +22,17 @@ return {
}, },
{ {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
name = "gitsigns", name = "gitsigns",
}, },
-- Comment -- Comment
{ {
"numToStr/Comment.nvim", "numToStr/Comment.nvim",
event = "BufRead", event = "BufRead",
config = function() config = function()
require("Comment").setup() require("Comment").setup()
end end
}, },
"github/copilot.vim",
} }
@@ -1,9 +1,9 @@
return { return {
"theprimeagen/harpoon", "theprimeagen/harpoon",
event = "BufRead", event = "BufRead",
dependencies = { dependencies = {
"plenary", "plenary",
}, },
config = function() config = function()
local mark = require("harpoon.mark") local mark = require("harpoon.mark")
@@ -12,9 +12,9 @@ return {
vim.keymap.set("n", "<leader>a", mark.add_file) vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu) vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end) vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end) vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end) vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end) vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)
end end
} }
+147
View File
@@ -0,0 +1,147 @@
return {
"neovim/nvim-lspconfig",
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"hrsh7th/nvim-cmp",
"j-hui/fidget.nvim",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
},
config = function()
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local lspconfig = require("lspconfig")
local configs = require("lspconfig.configs")
-- elixir config
local lexical_config = {
filetypes = { "elixir", "eelixir", "heex" },
cmd = { "/home/mimu/.local/share/nvim/mason/packages/lexical/libexec/lexical/bin/start_lexical.sh" },
settings = {},
}
if not configs.lexical then
configs.lexical = {
default_config = {
filetypes = lexical_config.filetypes,
cmd = lexical_config.cmd,
root_dir = function(fname)
return lspconfig.util.root_pattern("mix.exs", ".git")(fname) or vim.loop.os_homedir()
end,
-- optional settings
settings = lexical_config.settings,
},
}
end
lspconfig.lexical.setup({})
require("fidget").setup()
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = {
"lua_ls",
"rust_analyzer",
"clangd",
"gopls",
"lexical",
"tsserver",
"intelephense",
},
handlers = {
function(server_name) -- default handler (optional)
require("lspconfig")[server_name].setup {
capabilities = capabilities
}
end,
["intelephense"] = function()
lspconfig.intelephense.setup {
root_dir = function(fname)
return lspconfig.util.find_git_ancestor(fname) or
lspconfig.util.root_pattern("composer.json", ".git")(fname) or
lspconfig.util.path.dirname(fname)
end
}
end,
["gopls"] = function()
lspconfig.gopls.setup {
settings = {
gopls = {
analyses = {
unusedparams = true,
},
staticcheck = true,
gofumpt = true,
}
}
}
end,
["lua_ls"] = function()
lspconfig.lua_ls.setup {
settings = {
Lua = {
diagnostics = {
globals = { "vim" }
}
}
}
}
end,
}
})
local cmp = require("cmp")
local cmp_select = { behaviour = cmp.SelectBehavior.Select }
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = cmp.mapping.preset.insert({
["<C-p"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n"] = cmp.mapping.select_next_item(cmp_select),
["<C-y"] = cmp.mapping.confirm({ select = true }),
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<C-Space"] = cmp.mapping.complete(),
-- Tab
["<Tab>"] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end,
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" },
}, {
{ name = "buffer" },
})
})
vim.diagnostic.config({
virtual_text = true,
update_on_insert = true,
float = {
focusable = false,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
})
end
}
+3 -5
View File
@@ -1,11 +1,9 @@
vim.cmd [[autocmd BufWritePre <buffer> lua vim.lsp.buf.format()]]
vim.opt.nu = true vim.opt.nu = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
vim.opt.tabstop = 2 vim.opt.tabstop = 4
vim.opt.softtabstop = 2 vim.opt.softtabstop = 4
vim.opt.shiftwidth = 2 vim.opt.shiftwidth = 4
vim.opt.expandtab = true vim.opt.expandtab = true
-- highlight search -- highlight search
-1
View File
@@ -1 +0,0 @@
require("Comment").setup();
-1
View File
@@ -1 +0,0 @@
vim.keymap.set("n", "<leader>gs", vim.cmd.Git);
-10
View File
@@ -1,10 +0,0 @@
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)
-90
View File
@@ -1,90 +0,0 @@
-- Learn the keybindings, see :help lsp-zero-keybindings
-- Learn to configure LSP servers, see :help lsp-zero-api-showcase
local lsp = require("lsp-zero")
lsp.preset({
manage_nvim_cmp = {
set_sources = "lsp",
},
})
lsp.ensure_installed({
"tsserver",
"eslint",
"lua_ls",
"rust_analyzer",
"gopls",
})
local cmp = require("cmp")
local cmp_select = { behaviour = cmp.SelectBehavior.Select }
local cmp_mappings = lsp.defaults.cmp_mappings({
["<C-p"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n"] = cmp.mapping.select_next_item(cmp_select),
["<C-y"] = cmp.mapping.confirm({ select = true }),
["<C-Space"] = cmp.mapping.complete(),
})
lsp.set_preferences({
sign_icons = {},
})
lsp.setup_nvim_cmp({
mapping = cmp_mappings,
})
lsp.on_attach(function(client, bufnr)
local opts = { buffer = bufnr, remap = false }
lsp.default_keymaps({ buffer = bufnr })
lsp.buffer_autoformat()
vim.keymap.set("n", "gd", function()
vim.lsp.buf.definition()
end, opts)
vim.keymap.set("n", "gr", function()
vim.lsp.buf.references()
end, opts)
vim.keymap.set("n", "K", function()
vim.lsp.buf.hover()
end, opts)
vim.keymap.set("n", "<leader>vws", function()
vim.lsp.buf.workspace_symbol()
end, opts)
vim.keymap.set("n", "<leader>vd", function()
vim.lsp.diagnostic.open_float()
end, opts)
vim.keymap.set("n", "[d", function()
vim.lsp.diagnostic.goto_next()
end, opts)
vim.keymap.set("n", "]d", function()
vim.lsp.diagnostic.goto_prev()
end, opts)
vim.keymap.set("n", "<leader>vca", function()
vim.lsp.buf.code_action()
end, opts)
vim.keymap.set("n", "<leader>vrn", function()
vim.lsp.buf.rename()
end, opts)
vim.keymap.set("i", "<C-h>", function()
vim.lsp.buf.signature_help()
end, opts)
end)
lsp.setup()
vim.diagnostic.config({
virtual_text = true,
signs = false,
update_in_insert = false,
underline = true,
severity_sort = true,
float = {
focusable = false,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
})
-8
View File
@@ -1,8 +0,0 @@
require("lualine").setup({
options = {
icons_enabled = false,
theme = "onedark",
component_separators = "|",
section_separators = "",
}
});
-246
View File
@@ -1,246 +0,0 @@
local nvimtree = require('nvim-tree')
-- disable netrw at the very start of your init.lua (strongly advised)
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require("nvim-tree").setup { -- BEGIN_DEFAULT_OPTS
auto_reload_on_write = true,
disable_netrw = false,
hijack_cursor = false,
hijack_netrw = true,
hijack_unnamed_buffer_when_opening = false,
sort_by = "name",
root_dirs = {},
prefer_startup_root = false,
sync_root_with_cwd = false,
reload_on_bufenter = false,
respect_buf_cwd = true,
on_attach = "default",
remove_keymaps = false,
select_prompts = false,
view = {
centralize_selection = false,
cursorline = true,
debounce_delay = 15,
width = 30,
hide_root_folder = false,
side = "left",
preserve_window_proportions = false,
number = false,
relativenumber = false,
signcolumn = "yes",
mappings = {
custom_only = false,
list = {
-- user mappings go here
},
},
float = {
enable = false,
quit_on_focus_loss = true,
open_win_config = {
relative = "editor",
border = "rounded",
width = 30,
height = 30,
row = 1,
col = 1,
},
},
},
renderer = {
add_trailing = false,
group_empty = true,
highlight_git = false,
full_name = false,
highlight_opened_files = "none",
highlight_modified = "none",
root_folder_label = ":~:s?$?/..?",
indent_width = 2,
indent_markers = {
enable = false,
inline_arrows = true,
icons = {
corner = "└",
edge = "│",
item = "│",
bottom = "─",
none = " ",
},
},
icons = {
webdev_colors = false,
git_placement = "before",
modified_placement = "after",
padding = " ",
symlink_arrow = " ➛ ",
show = {
file = false,
folder = false,
folder_arrow = false,
git = false,
modified = false,
},
glyphs = {
default = " ",
symlink = " ",
bookmark = " ",
modified = "●",
folder = {
arrow_closed = " ",
arrow_open = " ",
default = " ",
open = " ",
empty = " ",
empty_open = " ",
symlink = " ",
symlink_open = " ",
},
git = {
unstaged = "✗",
staged = "✓",
unmerged = "",
renamed = "➜",
untracked = "★",
deleted = "",
ignored = "◌",
},
},
},
special_files = {},
symlink_destination = true,
},
hijack_directories = {
enable = true,
auto_open = true,
},
update_focused_file = {
enable = false,
update_root = false,
ignore_list = {},
},
system_open = {
cmd = "",
args = {},
},
diagnostics = {
enable = false,
show_on_dirs = false,
show_on_open_dirs = true,
debounce_delay = 50,
severity = {
min = vim.diagnostic.severity.HINT,
max = vim.diagnostic.severity.ERROR,
},
icons = {
hint = "",
info = "",
warning = "",
error = "",
},
},
filters = {
dotfiles = false,
git_clean = false,
no_buffer = false,
custom = {},
exclude = {},
},
filesystem_watchers = {
enable = true,
debounce_delay = 50,
ignore_dirs = {},
},
git = {
enable = false,
ignore = true,
show_on_dirs = true,
show_on_open_dirs = true,
timeout = 400,
},
modified = {
enable = false,
show_on_dirs = true,
show_on_open_dirs = true,
},
actions = {
use_system_clipboard = true,
change_dir = {
enable = true,
global = false,
restrict_above_cwd = false,
},
expand_all = {
max_folder_discovery = 300,
exclude = {},
},
file_popup = {
open_win_config = {
col = 1,
row = 1,
relative = "cursor",
border = "shadow",
style = "minimal",
},
},
open_file = {
quit_on_open = false,
resize_window = true,
window_picker = {
enable = true,
picker = "default",
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",
exclude = {
filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" },
buftype = { "nofile", "terminal", "help" },
},
},
},
remove_file = {
close_window = true,
},
},
trash = {
cmd = "gio trash",
},
live_filter = {
prefix = "[FILTER]: ",
always_show_folders = true,
},
tab = {
sync = {
open = false,
close = false,
ignore = {},
},
},
notify = {
threshold = vim.log.levels.INFO,
},
ui = {
confirm = {
remove = true,
trash = true,
},
},
experimental = {
git = {
async = true,
},
},
log = {
enable = false,
truncate = false,
types = {
all = false,
config = false,
copy_paste = false,
dev = false,
diagnostics = false,
git = false,
profile = false,
watcher = false,
},
},
} -- END_DEFAULT_OPTS
@@ -1,8 +0,0 @@
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
vim.keymap.set("n", "<C-p>", builtin.git_files, {})
vim.keymap.set("n", "<leader>pb", builtin.buffers, {})
vim.keymap.set("n", "<leader>pd", builtin.diagnostics, {})
vim.keymap.set("n", "<leader>ps", function()
builtin.grep_string({ search = vim.fn.input("Grep > ") })
end)
@@ -1,22 +0,0 @@
require 'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the four listed parsers should always be installed)
ensure_installed = { "javascript", "typescript", "c", "lua", "vim", "rust", "go" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
highlight = {
-- `false` will disable the whole extension
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}
-1
View File
@@ -1 +0,0 @@
require("mimu")
-27
View File
@@ -1,27 +0,0 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "82108e7e31cc6fc223cc5df5cae6d89f70bb199f" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"copilot.vim": { "branch": "release", "commit": "1a55183ef9347d6f420406a3746474b6b9fb9ef5" },
"fidget.nvim": { "branch": "main", "commit": "3a93300c076109d86c7ce35ec67a8034ae6ba9db" },
"gitsigns": { "branch": "main", "commit": "3e6e91b09f0468c32d3b96dcacf4b947f037ce25" },
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
"lush": { "branch": "main", "commit": "e8a58f36c256af65cda36878f6f2024a612154c3" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" },
"mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" },
"mellifluous.nvim": { "branch": "main", "commit": "d4a52152997907598715d341cad10a4000cf7152" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
"nvim-lspconfig": { "branch": "master", "commit": "796394fd19fb878e8dbc4fd1e9c9c186ed07a5f4" },
"nvim-tree.lua": { "branch": "master", "commit": "b8c3a23e76f861d5f0ff3f6714b9b56388984d0b" },
"nvim-treesitter": { "branch": "master", "commit": "8cd2b230174efbf7b5d9f49fe2f90bda6b5eb16e" },
"plenary": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
"telescope.nvim": { "branch": "master", "commit": "b3ff5f33201f474d58f5be96244869f189bbc091" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"vim-fugitive": { "branch": "master", "commit": "59659093581aad2afacedc81f009ed6a4bfad275" }
}
-27
View File
@@ -1,27 +0,0 @@
require("mimu.set")
require("mimu.remap")
require("mimu.lazy")
local augroup = vim.api.nvim_create_augroup
local MimuGroup = augroup("mimu", {})
local autocmd = vim.api.nvim_create_autocmd
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
autocmd("LspAttach", {
group = MimuGroup,
callback = function(e)
local opts = { buffer = e.buf }
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
vim.keymap.set("n", "gr", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set("n", "<leader>vd", function() vim.lsp.diagnostic.open_float() end, opts)
-- vim.keymap.set("n", "[d", function() vim.lsp.diagnostic.goto_next() end, opts)
-- vim.keymap.set("n", "]d", function() vim.lsp.diagnostic.goto_prev() end, opts)
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
end
})
-43
View File
@@ -1,43 +0,0 @@
local fzf_make_cmd = "make"
if vim.loop.os_uname().machine == "arm64" then
plenaryzf_make_cmd = " arch -arm64 make"
end
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)
return require("lazy").setup({
-- LSP
-- {
-- "VonHeikemen/lsp-zero.nvim",
-- branch = "v1.x",
-- dependencies = {
-- -- LSP Support
-- { "neovim/nvim-lspconfig" }, -- Required
-- { "williamboman/mason.nvim" }, -- Optional
-- { "williamboman/mason-lspconfig.nvim" }, -- Optional
--
-- -- Autocompletion
-- { "hrsh7th/nvim-cmp" }, -- Required
-- { "hrsh7th/cmp-nvim-lsp" }, -- Required
-- { "hrsh7th/cmp-buffer" }, -- Optional
-- { "hrsh7th/cmp-path" }, -- Optional
-- { "saadparwaiz1/cmp_luasnip" }, -- Optional
-- { "hrsh7th/cmp-nvim-lua" }, -- Optional
--
-- -- Snippets
-- { "L3MON4D3/LuaSnip" }, -- Required
-- { "rafamadriz/friendly-snippets" }, -- Optional
-- },
-- },
})
-98
View File
@@ -1,98 +0,0 @@
return {
"neovim/nvim-lspconfig",
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"hrsh7th/nvim-cmp",
"j-hui/fidget.nvim",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
},
config = function()
local capabilities = require('cmp_nvim_lsp').default_capabilities()
require("fidget").setup()
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = {
"lua_ls",
"rust_analyzer",
"clangd",
"gopls",
"tsserver",
},
handlers = {
function (server_name) -- default handler (optional)
require("lspconfig")[server_name].setup {
capabilities = capabilities
}
end,
["lua_ls"] = function ()
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup {
settings = {
Lua = {
diagnostics = {
globals = { "vim" }
}
}
}
}
end,
}
})
local cmp = require("cmp")
local cmp_select = { behaviour = cmp.SelectBehavior.Select }
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = cmp.mapping.preset.insert({
["<C-p"] = cmp.mapping.select_prev_item(cmp_select),
["<C-n"] = cmp.mapping.select_next_item(cmp_select),
["<C-y"] = cmp.mapping.confirm({ select = true }),
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<C-Space"] = cmp.mapping.complete(),
-- Tab
["<Tab>"] = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end,
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" },
}, {
{ name = "buffer" },
})
})
vim.diagnostic.config({
virtual_text = true,
update_on_insert = true,
float = {
focusable = false,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
})
end
}
-34
View File
@@ -1,34 +0,0 @@
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
-- allow to move selected lines up and down
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
vim.keymap.set("n", "J", "mzJ`z")
vim.keymap.set("n", "<C-d>", "<C-d>zz")
vim.keymap.set("n", "<C-u>", "<C-u>zz")
-- keep search term in the middle
vim.keymap.set("n", "n", "nzzzv")
vim.keymap.set("n", "N", "Nzzzv")
-- paste without losing the copied stuff
vim.keymap.set("x", "<leader>p", "\"_dp")
-- copy to system clipboard instead of vim
vim.keymap.set("n", "<leader>y", "\"+y")
vim.keymap.set("v", "<leader>y", "\"+y")
vim.keymap.set("n", "<leader>Y", "\"+Y")
-- quick fix navigation
vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
-- replace in file
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
-- toggle nvim-tree
vim.keymap.set("n", "<C-f>", "<cmd>NvimTreeFindFileToggle<CR>")
-25
View File
@@ -1,25 +0,0 @@
vim.opt.nu = true
vim.opt.relativenumber = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
-- highlight search
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 10
-- vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50
vim.opt.colorcolumn = "120"
vim.g.mapleader = " "
vim.o.cmdheight = 0
-234
View File
@@ -1,234 +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/brice/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/brice/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/brice/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/brice/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/Users/brice/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["Comment.nvim"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/Comment.nvim",
url = "https://github.com/numToStr/Comment.nvim"
},
LuaSnip = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip"
},
["cmp-buffer"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
["cmp-nvim-lua"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
url = "https://github.com/hrsh7th/cmp-nvim-lua"
},
["cmp-path"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/cmp-path",
url = "https://github.com/hrsh7th/cmp-path"
},
cmp_luasnip = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
url = "https://github.com/saadparwaiz1/cmp_luasnip"
},
["friendly-snippets"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/friendly-snippets",
url = "https://github.com/rafamadriz/friendly-snippets"
},
["gitsigns.nvim"] = {
config = { "\27LJ\2\nQ\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\23current_line_blame\2\nsetup\rgitsigns\frequire\0" },
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
url = "https://github.com/lewis6991/gitsigns.nvim"
},
harpoon = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/harpoon",
url = "https://github.com/theprimeagen/harpoon"
},
["lsp-zero.nvim"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
url = "https://github.com/VonHeikemen/lsp-zero.nvim"
},
["lualine.nvim"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/lualine.nvim",
url = "https://github.com/nvim-lualine/lualine.nvim"
},
["lush.nvim"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/lush.nvim",
url = "https://github.com/rktjmp/lush.nvim"
},
["mason-lspconfig.nvim"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
url = "https://github.com/williamboman/mason-lspconfig.nvim"
},
["mason.nvim"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
["mellifluous.nvim"] = {
config = { "\27LJ\2\nŒ\1\0\0\4\0\t\0\r6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\2B\0\2\0016\0\6\0009\0\a\0'\2\b\0B\0\2\1K\0\1\0\28colorscheme mellifluous\bcmd\bvim\vstyles\1\0\0\1\0\1\rcomments\5\nsetup\16mellifluous\frequire\0" },
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/mellifluous.nvim",
url = "https://github.com/ramojus/mellifluous.nvim"
},
["null-ls.nvim"] = {
loaded = true,
path = "/Users/brice/.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/brice/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-tree.lua"] = {
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\14nvim-tree\frequire\0" },
loaded = true,
path = "/Users/brice/.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/brice/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["packer.nvim"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["plenary.nvim"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["telescope.nvim"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
["vim-fugitive"] = {
loaded = true,
path = "/Users/brice/.local/share/nvim/site/pack/packer/start/vim-fugitive",
url = "https://github.com/tpope/vim-fugitive"
}
}
time([[Defining packer_plugins]], false)
-- Config for: gitsigns.nvim
time([[Config for gitsigns.nvim]], true)
try_loadstring("\27LJ\2\nQ\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\23current_line_blame\2\nsetup\rgitsigns\frequire\0", "config", "gitsigns.nvim")
time([[Config for gitsigns.nvim]], false)
-- Config for: mellifluous.nvim
time([[Config for mellifluous.nvim]], true)
try_loadstring("\27LJ\2\nŒ\1\0\0\4\0\t\0\r6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\2B\0\2\0016\0\6\0009\0\a\0'\2\b\0B\0\2\1K\0\1\0\28colorscheme mellifluous\bcmd\bvim\vstyles\1\0\0\1\0\1\rcomments\5\nsetup\16mellifluous\frequire\0", "config", "mellifluous.nvim")
time([[Config for mellifluous.nvim]], false)
-- Config for: nvim-tree.lua
time([[Config for nvim-tree.lua]], 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\14nvim-tree\frequire\0", "config", "nvim-tree.lua")
time([[Config for nvim-tree.lua]], false)
_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