This commit is contained in:
Salar Rahmanian 2023-02-09 21:22:26 -08:00
parent 0d693101c1
commit f1e4018776
10 changed files with 693 additions and 672 deletions

View file

@ -1,12 +1,12 @@
local installed, gitsigns = pcall(require, 'gitsigns') local installed, gitsigns = pcall(require, "gitsigns")
if installed then if installed then
gitsigns.setup { gitsigns.setup({
signs = { signs = {
add = { text = '+' }, add = { text = "+" },
change = { text = '~' }, change = { text = "~" },
delete = { text = '_' }, delete = { text = "_" },
topdelete = { text = '' }, topdelete = { text = "" },
changedelete = { text = '~' }, changedelete = { text = "~" },
}, },
} })
end end

View file

@ -1,13 +1,13 @@
local installed, lualine = pcall(require, 'lualine') local installed, lualine = pcall(require, "lualine")
if installed then if installed then
-- Set lualine as statusline -- Set lualine as statusline
-- See `:help lualine.txt` -- See `:help lualine.txt`
lualine.setup { lualine.setup({
options = { options = {
icons_enabled = false, icons_enabled = false,
theme = 'tokyonight', theme = "tokyonight",
component_separators = '|', component_separators = "|",
section_separators = '', section_separators = "",
}, },
} })
end end

View file

@ -1,10 +1,15 @@
local installed, neogit = pcall(require, 'neogit') local installed, neogit = pcall(require, "neogit")
if installed then if installed then
neogit.setup { neogit.setup({
integrations = { integrations = {
diffview = true, diffview = true,
}, },
} })
vim.api.nvim_set_keymap('n', '<leader>ng', [[<cmd>lua require('neogit').open({ kind = "split" })<cr>]], { noremap = true, silent = true }) vim.api.nvim_set_keymap(
"n",
"<leader>ng",
[[<cmd>lua require('neogit').open({ kind = "split" })<cr>]],
{ noremap = true, silent = true }
)
end end

View file

@ -1,26 +1,31 @@
local installed, nvim_tree = pcall(require, 'nvim-tree') local installed, nvim_tree = pcall(require, "nvim-tree")
if installed then if installed then
vim.g.loaded_netrw = 1 vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1 vim.g.loaded_netrwPlugin = 1
nvim_tree.setup({ nvim_tree.setup({
sort_by = "case_sensitive", sort_by = "case_sensitive",
disable_netrw = true, disable_netrw = true,
view = { view = {
adaptive_size = true, adaptive_size = true,
mappings = { mappings = {
list = { list = {
{ key = "u", action = "dir_up" }, { key = "u", action = "dir_up" },
}, },
}, },
}, },
renderer = { renderer = {
highlight_git = true, highlight_git = true,
group_empty = true, group_empty = true,
}, },
filters = { filters = {
dotfiles = false, dotfiles = false,
}, },
}) })
vim.api.nvim_set_keymap('n', '<leader>m', [[<cmd>lua require('nvim-tree').toggle()<cr>]], { noremap = true, silent = true }) vim.api.nvim_set_keymap(
"n",
"<leader>m",
[[<cmd>lua require('nvim-tree').toggle()<cr>]],
{ noremap = true, silent = true }
)
end end

View file

@ -1,37 +1,36 @@
local installed, telescope = pcall(require, 'telescope') local installed, telescope = pcall(require, "telescope")
if installed then if installed then
-- [[ Configure Telescope ]] -- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()` -- See `:help telescope` and `:help telescope.setup()`
require('telescope').setup { require("telescope").setup({
defaults = { defaults = {
mappings = { mappings = {
i = { i = {
['<C-u>'] = false, ["<C-u>"] = false,
['<C-d>'] = false, ["<C-d>"] = false,
}, },
}, },
}, },
} })
-- Enable telescope fzf native, if installed -- Enable telescope fzf native, if installed
pcall(require('telescope').load_extension, 'fzf') pcall(require("telescope").load_extension, "fzf")
pcall(require('telescope').load_extension, 'scaladex') pcall(require("telescope").load_extension, "scaladex")
-- See `:help telescope.builtin` -- See `:help telescope.builtin`
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' }) vim.keymap.set("n", "<leader>?", require("telescope.builtin").oldfiles, { desc = "[?] Find recently opened files" })
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' }) vim.keymap.set("n", "<leader><space>", require("telescope.builtin").buffers, { desc = "[ ] Find existing buffers" })
vim.keymap.set('n', '<leader>/', function() vim.keymap.set("n", "<leader>/", function()
-- You can pass additional configuration to telescope to change theme, layout, etc. -- You can pass additional configuration to telescope to change theme, layout, etc.
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { require("telescope.builtin").current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
winblend = 10, winblend = 10,
previewer = false, previewer = false,
}) }))
end, { desc = '[/] Fuzzily search in current buffer]' }) end, { desc = "[/] Fuzzily search in current buffer]" })
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set("n", "<leader>sf", require("telescope.builtin").find_files, { desc = "[S]earch [F]iles" })
vim.keymap.set("n", "<leader>sh", require("telescope.builtin").help_tags, { desc = "[S]earch [H]elp" })
vim.keymap.set("n", "<leader>sw", require("telescope.builtin").grep_string, { desc = "[S]earch current [W]ord" })
vim.keymap.set("n", "<leader>sg", require("telescope.builtin").live_grep, { desc = "[S]earch by [G]rep" })
vim.keymap.set("n", "<leader>sd", require("telescope.builtin").diagnostics, { desc = "[S]earch [D]iagnostics" })
end end

View file

@ -1,36 +1,36 @@
local installed, texlabconfig = pcall(require, 'texlabconfig') local installed, texlabconfig = pcall(require, "texlabconfig")
if installed then if installed then
-- vimtex -- vimtex
vim.g.vimtex_view_method = 'skim' vim.g.vimtex_view_method = "skim"
vim.g.vimtex_compiler_method = 'tectonic' vim.g.vimtex_compiler_method = "tectonic"
-- nvim-texlabconfig -- nvim-texlabconfig
local tex_preview_executable = '/Applications/Skim.app/Contents/SharedSupport/displayline' local tex_preview_executable = "/Applications/Skim.app/Contents/SharedSupport/displayline"
local tex_preview_args = {"%l", "%p", "%f"} local tex_preview_args = { "%l", "%p", "%f" }
local texlab_build_executable = 'tectonic' local texlab_build_executable = "tectonic"
local texlab_build_args = { local texlab_build_args = {
'-X', "-X",
'compile', "compile",
'%f', "%f",
'--synctex', "--synctex",
'--keep-logs', "--keep-logs",
'--keep-intermediates' "--keep-intermediates",
} }
texlabconfig.setup { texlabconfig.setup({
cache_activate = true, cache_activate = true,
cache_filetypes = { 'tex', 'bib' }, cache_filetypes = { "tex", "bib" },
reverse_search_edit_cmd = vim.cmd.edit, reverse_search_edit_cmd = vim.cmd.edit,
settings = { settings = {
texlab = { texlab = {
build = { build = {
executable = texlab_build_executable, executable = texlab_build_executable,
args = texlab_build_args args = texlab_build_args,
}, },
forwardSearch = { forwardSearch = {
executable = tex_preview_executable, executable = tex_preview_executable,
args = tex_preview_args args = tex_preview_args,
} },
} },
} },
} })
end end

View file

@ -1,117 +1,116 @@
local installed, treesitter = pcall(require, 'nvim-treesitter.configs') local installed, treesitter = pcall(require, "nvim-treesitter.configs")
if installed then if installed then
-- [[ Configure Treesitter ]] -- [[ Configure Treesitter ]]
-- See `:help nvim-treesitter` -- See `:help nvim-treesitter`
treesitter.setup { treesitter.setup({
-- Add languages to be installed here that you want installed for treesitter -- Add languages to be installed here that you want installed for treesitter
ensure_installed = { ensure_installed = {
'c', "c",
'cpp', "cpp",
'go', "go",
'lua', "lua",
'python', "python",
'rust', "rust",
'typescript', "typescript",
'help', "help",
'vim', "vim",
'scala', "scala",
'bash', "bash",
'dockerfile', "dockerfile",
'fish', "fish",
'git_rebase', "git_rebase",
'gitattributes', "gitattributes",
'gitcommit', "gitcommit",
'gitignore', "gitignore",
'haskell', "haskell",
'hocon', "hocon",
'html', "html",
'http', "http",
'java', "java",
'javascript', "javascript",
'json', "json",
'json5', "json5",
'latex', "latex",
'make', "make",
'markdown_inline', "markdown_inline",
'nix', "nix",
'sql', "sql",
'terraform', "terraform",
'yaml' "yaml",
}, },
highlight = { enable = true }, highlight = { enable = true },
indent = { enable = true, disable = { 'python' } }, indent = { enable = true, disable = { "python" } },
incremental_selection = { incremental_selection = {
enable = true, enable = true,
keymaps = { keymaps = {
init_selection = '<c-space>', init_selection = "<c-space>",
node_incremental = '<c-space>', node_incremental = "<c-space>",
scope_incremental = '<c-s>', scope_incremental = "<c-s>",
node_decremental = '<c-backspace>', node_decremental = "<c-backspace>",
}, },
}, },
textobjects = { textobjects = {
select = { select = {
enable = true, enable = true,
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
keymaps = { keymaps = {
-- You can use the capture groups defined in textobjects.scm -- You can use the capture groups defined in textobjects.scm
['aa'] = '@parameter.outer', ["aa"] = "@parameter.outer",
['ia'] = '@parameter.inner', ["ia"] = "@parameter.inner",
['af'] = '@function.outer', ["af"] = "@function.outer",
['if'] = '@function.inner', ["if"] = "@function.inner",
['ac'] = '@class.outer', ["ac"] = "@class.outer",
['ic'] = '@class.inner', ["ic"] = "@class.inner",
}, },
}, },
move = { move = {
enable = true, enable = true,
set_jumps = true, -- whether to set jumps in the jumplist set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = { goto_next_start = {
[']m'] = '@function.outer', ["]m"] = "@function.outer",
[']]'] = '@class.outer', ["]]"] = "@class.outer",
}, },
goto_next_end = { goto_next_end = {
[']M'] = '@function.outer', ["]M"] = "@function.outer",
[']['] = '@class.outer', ["]["] = "@class.outer",
}, },
goto_previous_start = { goto_previous_start = {
['[m'] = '@function.outer', ["[m"] = "@function.outer",
['[['] = '@class.outer', ["[["] = "@class.outer",
}, },
goto_previous_end = { goto_previous_end = {
['[M'] = '@function.outer', ["[M"] = "@function.outer",
['[]'] = '@class.outer', ["[]"] = "@class.outer",
}, },
}, },
swap = { swap = {
enable = true, enable = true,
swap_next = { swap_next = {
['<leader>a'] = '@parameter.inner', ["<leader>a"] = "@parameter.inner",
}, },
swap_previous = { swap_previous = {
['<leader>A'] = '@parameter.inner', ["<leader>A"] = "@parameter.inner",
}, },
playground = { playground = {
enable = true, enable = true,
disable = {}, disable = {},
updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code
persist_queries = false, -- Whether the query persists across vim sessions persist_queries = false, -- Whether the query persists across vim sessions
keybindings = { keybindings = {
toggle_query_editor = 'o', toggle_query_editor = "o",
toggle_hl_groups = 'i', toggle_hl_groups = "i",
toggle_injected_languages = 't', toggle_injected_languages = "t",
toggle_anonymous_nodes = 'a', toggle_anonymous_nodes = "a",
toggle_language_display = 'I', toggle_language_display = "I",
focus_language = 'f', focus_language = "f",
unfocus_language = 'F', unfocus_language = "F",
update = 'R', update = "R",
goto_node = '<cr>', goto_node = "<cr>",
show_help = '?', show_help = "?",
}, },
}, },
}, },
}, },
} })
end end

257
init.lua
View file

@ -1,82 +1,82 @@
-- Install packer -- Install packer
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim' local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
local is_bootstrap = false local is_bootstrap = false
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
is_bootstrap = true is_bootstrap = true
vim.fn.system { 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path } vim.fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
vim.cmd [[packadd packer.nvim]] vim.cmd([[packadd packer.nvim]])
end end
require('packer').startup(function(use) require("packer").startup(function(use)
-- Package manager -- Package manager
use 'wbthomason/packer.nvim' use("wbthomason/packer.nvim")
use { -- LSP Configuration & Plugins use({ -- LSP Configuration & Plugins
'neovim/nvim-lspconfig', "neovim/nvim-lspconfig",
requires = { requires = {
-- Automatically install LSPs to stdpath for neovim -- Automatically install LSPs to stdpath for neovim
'williamboman/mason.nvim', "williamboman/mason.nvim",
'williamboman/mason-lspconfig.nvim', "williamboman/mason-lspconfig.nvim",
-- Useful status updates for LSP -- Useful status updates for LSP
'j-hui/fidget.nvim', "j-hui/fidget.nvim",
-- Additional lua configuration, makes nvim stuff amazing -- Additional lua configuration, makes nvim stuff amazing
'folke/neodev.nvim', "folke/neodev.nvim",
}, },
} })
use { -- Autocompletion use({ -- Autocompletion
'hrsh7th/nvim-cmp', "hrsh7th/nvim-cmp",
requires = { requires = {
'hrsh7th/cmp-nvim-lsp', "hrsh7th/cmp-nvim-lsp",
'L3MON4D3/LuaSnip', "L3MON4D3/LuaSnip",
'saadparwaiz1/cmp_luasnip', "saadparwaiz1/cmp_luasnip",
'hrsh7th/cmp-buffer', "hrsh7th/cmp-buffer",
'hrsh7th/cmp-path', "hrsh7th/cmp-path",
'hrsh7th/cmp-cmdline', "hrsh7th/cmp-cmdline",
'hrsh7th/cmp-nvim-lua', "hrsh7th/cmp-nvim-lua",
'hrsh7th/cmp-nvim-lsp-signature-help' "hrsh7th/cmp-nvim-lsp-signature-help",
}, },
} })
use { -- Highlight, edit, and navigate code use({ -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter', "nvim-treesitter/nvim-treesitter",
run = function() run = function()
pcall(require('nvim-treesitter.install').update { with_sync = true }) pcall(require("nvim-treesitter.install").update({ with_sync = true }))
end, end,
} })
use { -- Additional text objects via treesitter use({ -- Additional text objects via treesitter
'nvim-treesitter/nvim-treesitter-textobjects', "nvim-treesitter/nvim-treesitter-textobjects",
after = 'nvim-treesitter', after = "nvim-treesitter",
} })
-- Git related plugins -- Git related plugins
use 'tpope/vim-fugitive' use("tpope/vim-fugitive")
use 'tpope/vim-rhubarb' use("tpope/vim-rhubarb")
use 'lewis6991/gitsigns.nvim' use("lewis6991/gitsigns.nvim")
use 'folke/tokyonight.nvim' -- Theme use("folke/tokyonight.nvim") -- Theme
use 'nvim-lualine/lualine.nvim' -- Fancier statusline use("nvim-lualine/lualine.nvim") -- Fancier statusline
use 'lukas-reineke/indent-blankline.nvim' -- Add indentation guides even on blank lines use("lukas-reineke/indent-blankline.nvim") -- Add indentation guides even on blank lines
use 'numToStr/Comment.nvim' -- "gc" to comment visual regions/lines use("numToStr/Comment.nvim") -- "gc" to comment visual regions/lines
use 'tpope/vim-sleuth' -- Detect tabstop and shiftwidth automatically use("tpope/vim-sleuth") -- Detect tabstop and shiftwidth automatically
-- Fuzzy Finder (files, lsp, etc) -- Fuzzy Finder (files, lsp, etc)
use { 'nvim-telescope/telescope.nvim', branch = '0.1.x', requires = { 'nvim-lua/plenary.nvim' } } use({ "nvim-telescope/telescope.nvim", branch = "0.1.x", requires = { "nvim-lua/plenary.nvim" } })
-- Fuzzy Finder Algorithm which requires local dependencies to be built. Only load if `make` is available -- Fuzzy Finder Algorithm which requires local dependencies to be built. Only load if `make` is available
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', cond = vim.fn.executable 'make' == 1 } use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make", cond = vim.fn.executable("make") == 1 })
-- Add custom plugins to packer from ~/.config/nvim/lua/plugins.lua -- Add custom plugins to packer from ~/.config/nvim/lua/plugins.lua
local has_plugins, plugins = pcall(require, 'plugins') local has_plugins, plugins = pcall(require, "plugins")
if has_plugins then if has_plugins then
plugins(use) plugins(use)
end end
if is_bootstrap then if is_bootstrap then
require('packer').sync() require("packer").sync()
end end
end) end)
@ -85,20 +85,20 @@ end)
-- --
-- You'll need to restart nvim, and then it will work. -- You'll need to restart nvim, and then it will work.
if is_bootstrap then if is_bootstrap then
print '==================================' print("==================================")
print ' Plugins are being installed' print(" Plugins are being installed")
print ' Wait until Packer completes,' print(" Wait until Packer completes,")
print ' then restart nvim' print(" then restart nvim")
print '==================================' print("==================================")
return return
end end
-- Automatically source and re-compile packer whenever you save this init.lua -- Automatically source and re-compile packer whenever you save this init.lua
local packer_group = vim.api.nvim_create_augroup('Packer', { clear = true }) local packer_group = vim.api.nvim_create_augroup("Packer", { clear = true })
vim.api.nvim_create_autocmd('BufWritePost', { vim.api.nvim_create_autocmd("BufWritePost", {
command = 'source <afile> | silent! LspStop | silent! LspStart | PackerCompile', command = "source <afile> | silent! LspStop | silent! LspStart | PackerCompile",
group = packer_group, group = packer_group,
pattern = vim.fn.expand '$MYVIMRC', pattern = vim.fn.expand("$MYVIMRC"),
}) })
-- [[ Setting options ]] -- [[ Setting options ]]
@ -109,13 +109,13 @@ vim.o.hlsearch = false
vim.o.incsearch = true vim.o.incsearch = true
-- clipboard -- clipboard
vim.o.clipboard = 'unnamedplus' vim.o.clipboard = "unnamedplus"
-- Make line numbers default -- Make line numbers default
vim.wo.number = true vim.wo.number = true
-- Enable mouse mode -- Enable mouse mode
vim.o.mouse = 'a' vim.o.mouse = "a"
-- Enable break indent -- Enable break indent
vim.o.breakindent = true vim.o.breakindent = true
@ -129,63 +129,63 @@ vim.o.smartcase = true
-- Decrease update time -- Decrease update time
vim.o.updatetime = 250 vim.o.updatetime = 250
vim.wo.signcolumn = 'yes' vim.wo.signcolumn = "yes"
-- Set colorscheme -- Set colorscheme
vim.g.tokyonight_style = 'night' vim.g.tokyonight_style = "night"
vim.g.tokyonight_italic_functions = true vim.g.tokyonight_italic_functions = true
vim.o.termguicolors = true vim.o.termguicolors = true
vim.cmd [[colorscheme tokyonight]] vim.cmd([[colorscheme tokyonight]])
-- Set completeopt to have a better completion experience -- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect' vim.o.completeopt = "menuone,noselect"
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- Set <space> as the leader key -- Set <space> as the leader key
-- See `:help mapleader` -- See `:help mapleader`
-- NOTE: Must happen before plugins are required (otherwise wrong leader will be used) -- NOTE: Must happen before plugins are required (otherwise wrong leader will be used)
vim.g.mapleader = ' ' vim.g.mapleader = " "
vim.g.maplocalleader = ' ' vim.g.maplocalleader = " "
-- Keymaps for better default experience -- Keymaps for better default experience
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true }) vim.keymap.set({ "n", "v" }, "<Space>", "<Nop>", { silent = true })
-- Remap for dealing with word wrap -- Remap for dealing with word wrap
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
-- [[ Highlight on yank ]] -- [[ Highlight on yank ]]
-- See `:help vim.highlight.on_yank()` -- See `:help vim.highlight.on_yank()`
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
vim.api.nvim_create_autocmd('TextYankPost', { vim.api.nvim_create_autocmd("TextYankPost", {
callback = function() callback = function()
vim.highlight.on_yank() vim.highlight.on_yank()
end, end,
group = highlight_group, group = highlight_group,
pattern = '*', pattern = "*",
}) })
-- Enable Comment.nvim -- Enable Comment.nvim
require('Comment').setup() require("Comment").setup()
-- Enable `lukas-reineke/indent-blankline.nvim` -- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help indent_blankline.txt` -- See `:help indent_blankline.txt`
require('indent_blankline').setup { require("indent_blankline").setup({
char = '', char = "",
show_trailing_blankline_indent = false, show_trailing_blankline_indent = false,
} })
require('trouble').setup() require("trouble").setup()
-- nvim-autopairs -- nvim-autopairs
require('nvim-autopairs').setup() require("nvim-autopairs").setup()
-- Diagnostic keymaps -- Diagnostic keymaps
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) vim.keymap.set("n", "[d", vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next) vim.keymap.set("n", "]d", vim.diagnostic.goto_next)
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float) vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float)
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist) vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist)
-- LSP settings. -- LSP settings.
-- This function gets run when an LSP connects to a particular buffer. -- This function gets run when an LSP connects to a particular buffer.
@ -198,38 +198,38 @@ local on_attach = function(_, bufnr)
-- for LSP related items. It sets the mode, buffer and description for us each time. -- for LSP related items. It sets the mode, buffer and description for us each time.
local nmap = function(keys, func, desc) local nmap = function(keys, func, desc)
if desc then if desc then
desc = 'LSP: ' .. desc desc = "LSP: " .. desc
end end
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc }) vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc })
end end
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame') nmap("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction') nmap("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction")
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition') nmap("gd", vim.lsp.buf.definition, "[G]oto [D]efinition")
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') nmap("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation') nmap("gI", vim.lsp.buf.implementation, "[G]oto [I]mplementation")
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition') nmap("<leader>D", vim.lsp.buf.type_definition, "Type [D]efinition")
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') nmap("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') nmap("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
-- See `:help K` for why this keymap -- See `:help K` for why this keymap
nmap('K', vim.lsp.buf.hover, 'Hover Documentation') nmap("K", vim.lsp.buf.hover, "Hover Documentation")
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation') nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
-- Lesser used LSP functionality -- Lesser used LSP functionality
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') nmap("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder') nmap("<leader>wa", vim.lsp.buf.add_workspace_folder, "[W]orkspace [A]dd Folder")
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder') nmap("<leader>wr", vim.lsp.buf.remove_workspace_folder, "[W]orkspace [R]emove Folder")
nmap('<leader>wl', function() nmap("<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders())) print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, '[W]orkspace [L]ist Folders') end, "[W]orkspace [L]ist Folders")
-- Create a command `:Format` local to the LSP buffer -- Create a command `:Format` local to the LSP buffer
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_) vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
vim.lsp.buf.format() vim.lsp.buf.format()
end, { desc = 'Format current buffer with LSP' }) end, { desc = "Format current buffer with LSP" })
end end
-- Enable the following language servers -- Enable the following language servers
@ -253,54 +253,54 @@ local servers = {
} }
-- Setup neovim lua configuration -- Setup neovim lua configuration
require('neodev').setup() require("neodev").setup()
-- --
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers -- nvim-cmp supports additional completion capabilities, so broadcast that to servers
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
-- Setup mason so it can manage external tooling -- Setup mason so it can manage external tooling
require('mason').setup() require("mason").setup()
-- Ensure the servers above are installed -- Ensure the servers above are installed
local mason_lspconfig = require 'mason-lspconfig' local mason_lspconfig = require("mason-lspconfig")
mason_lspconfig.setup { mason_lspconfig.setup({
ensure_installed = vim.tbl_keys(servers), ensure_installed = vim.tbl_keys(servers),
} })
mason_lspconfig.setup_handlers { mason_lspconfig.setup_handlers({
function(server_name) function(server_name)
require('lspconfig')[server_name].setup { require("lspconfig")[server_name].setup({
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
settings = servers[server_name], settings = servers[server_name],
} })
end, end,
} })
-- Turn on lsp status information -- Turn on lsp status information
require('fidget').setup() require("fidget").setup()
-- nvim-cmp setup -- nvim-cmp setup
local cmp = require 'cmp' local cmp = require("cmp")
local luasnip = require 'luasnip' local luasnip = require("luasnip")
cmp.setup { cmp.setup({
snippet = { snippet = {
expand = function(args) expand = function(args)
luasnip.lsp_expand(args.body) luasnip.lsp_expand(args.body)
end, end,
}, },
mapping = cmp.mapping.preset.insert { mapping = cmp.mapping.preset.insert({
['<C-d>'] = cmp.mapping.scroll_docs(-4), ["<C-d>"] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4), ["<C-f>"] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(), ["<C-Space>"] = cmp.mapping.complete(),
['<CR>'] = cmp.mapping.confirm { ["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace, behavior = cmp.ConfirmBehavior.Replace,
select = true, select = true,
}, }),
['<Tab>'] = cmp.mapping(function(fallback) ["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_next_item() cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then elseif luasnip.expand_or_jumpable() then
@ -308,8 +308,8 @@ cmp.setup {
else else
fallback() fallback()
end end
end, { 'i', 's' }), end, { "i", "s" }),
['<S-Tab>'] = cmp.mapping(function(fallback) ["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_prev_item() cmp.select_prev_item()
elseif luasnip.jumpable(-1) then elseif luasnip.jumpable(-1) then
@ -317,23 +317,20 @@ cmp.setup {
else else
fallback() fallback()
end end
end, { 'i', 's' }), end, { "i", "s" }),
}, }),
sources = { sources = {
{ name = 'nvim_lsp' }, { name = "nvim_lsp" },
{ name = 'luasnip' }, { name = "luasnip" },
{ name = "buffer" }, { name = "buffer" },
{ name = "path" }, { name = "path" },
{ name = 'nvim_lua' }, { name = "nvim_lua" },
{ name = 'nvim_lsp_signature_help' } { name = "nvim_lsp_signature_help" },
}, },
} })
local cmp_autopairs = require('nvim-autopairs.completion.cmp') local cmp_autopairs = require("nvim-autopairs.completion.cmp")
cmp.event:on( cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
'confirm_done',
cmp_autopairs.on_confirm_done()
)
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et

View file

@ -1,27 +1,26 @@
return function(use) return function(use)
use({'folke/trouble.nvim'}) use({ "folke/trouble.nvim" })
use({ use({
'folke/which-key.nvim', "folke/which-key.nvim",
config = function() config = function()
require('which-key').setup({}) require("which-key").setup({})
end end,
}) })
use({'windwp/nvim-autopairs'}) use({ "windwp/nvim-autopairs" })
use({'nvim-tree/nvim-web-devicons'}) use({ "nvim-tree/nvim-web-devicons" })
use({ use({
'nvim-tree/nvim-tree.lua', "nvim-tree/nvim-tree.lua",
tag = 'nightly' tag = "nightly",
}) })
use({'ckipp01/stylua-nvim'}) use({ "ckipp01/stylua-nvim" })
use({'gennaro-tedesco/nvim-jqx'}) use({ "gennaro-tedesco/nvim-jqx" })
use({'lervag/vimtex'}) use({ "lervag/vimtex" })
use({ use({
'f3fora/nvim-texlabconfig', "f3fora/nvim-texlabconfig",
run = 'go build' run = "go build",
}) })
use({'sindrets/diffview.nvim'}) use({ "sindrets/diffview.nvim" })
use({'nvim-treesitter/playground'}) use({ "nvim-treesitter/playground" })
use({ 'softinio/scaladex.nvim' }) use({ "softinio/scaladex.nvim" })
use({'TimUntersberger/neogit'}) use({ "TimUntersberger/neogit" })
end end

View file

@ -1,318 +1,335 @@
-- Automatically generated packer.nvim plugin loader code -- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then 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"') vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return return
end end
vim.api.nvim_command('packadd packer.nvim') vim.api.nvim_command("packadd packer.nvim")
local no_errors, error_msg = pcall(function() local no_errors, error_msg = pcall(function()
_G._packer = _G._packer or {}
_G._packer.inside_compile = true
_G._packer = _G._packer or {} local time
_G._packer.inside_compile = true local profile_info
local should_profile = false
local time if should_profile then
local profile_info local hrtime = vim.loop.hrtime
local should_profile = false profile_info = {}
if should_profile then time = function(chunk, start)
local hrtime = vim.loop.hrtime if start then
profile_info = {} profile_info[chunk] = hrtime()
time = function(chunk, start) else
if start then profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
profile_info[chunk] = hrtime() end
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end end
else
time = function(chunk, start) end
end end
else
time = function(chunk, start) end
end
local function save_profiles(threshold) local function save_profiles(threshold)
local sorted_times = {} local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken} 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
end table.sort(sorted_times, function(a, b)
if threshold then return a[2] > b[2]
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/salar/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/salar/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/salar/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/salar/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/Users/salar/.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)
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 end
return result
end
time([[try_loadstring definition]], false) time([[Luarocks path setup]], true)
time([[Defining packer_plugins]], true) local package_path_str =
_G.packer_plugins = { "/Users/salar/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/salar/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/salar/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/salar/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
["Comment.nvim"] = { local install_cpath_pattern = "/Users/salar/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
loaded = true, if not string.find(package.path, package_path_str, 1, true) then
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/Comment.nvim", package.path = package.path .. ";" .. package_path_str
url = "https://github.com/numToStr/Comment.nvim" end
},
LuaSnip = { if not string.find(package.cpath, install_cpath_pattern, 1, true) then
loaded = true, package.cpath = package.cpath .. ";" .. install_cpath_pattern
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/LuaSnip", end
url = "https://github.com/L3MON4D3/LuaSnip"
}, time([[Luarocks path setup]], false)
["cmp-buffer"] = { time([[try_loadstring definition]], true)
loaded = true, local function try_loadstring(s, component, name)
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-buffer", local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
url = "https://github.com/hrsh7th/cmp-buffer" if not success then
}, vim.schedule(function()
["cmp-cmdline"] = { vim.api.nvim_notify(
loaded = true, "packer.nvim: Error running " .. component .. " for " .. name .. ": " .. result,
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-cmdline", vim.log.levels.ERROR,
url = "https://github.com/hrsh7th/cmp-cmdline" {}
}, )
["cmp-nvim-lsp"] = { end)
loaded = true, end
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", return result
url = "https://github.com/hrsh7th/cmp-nvim-lsp" end
},
["cmp-nvim-lsp-signature-help"] = { time([[try_loadstring definition]], false)
loaded = true, time([[Defining packer_plugins]], true)
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help", _G.packer_plugins = {
url = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help" ["Comment.nvim"] = {
}, loaded = true,
["cmp-nvim-lua"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/Comment.nvim",
loaded = true, url = "https://github.com/numToStr/Comment.nvim",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", },
url = "https://github.com/hrsh7th/cmp-nvim-lua" LuaSnip = {
}, loaded = true,
["cmp-path"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/LuaSnip",
loaded = true, url = "https://github.com/L3MON4D3/LuaSnip",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-path", },
url = "https://github.com/hrsh7th/cmp-path" ["cmp-buffer"] = {
}, loaded = true,
cmp_luasnip = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-buffer",
loaded = true, url = "https://github.com/hrsh7th/cmp-buffer",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp_luasnip", },
url = "https://github.com/saadparwaiz1/cmp_luasnip" ["cmp-cmdline"] = {
}, loaded = true,
["diffview.nvim"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
loaded = true, url = "https://github.com/hrsh7th/cmp-cmdline",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/diffview.nvim", },
url = "https://github.com/sindrets/diffview.nvim" ["cmp-nvim-lsp"] = {
}, loaded = true,
["fidget.nvim"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
loaded = true, url = "https://github.com/hrsh7th/cmp-nvim-lsp",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/fidget.nvim", },
url = "https://github.com/j-hui/fidget.nvim" ["cmp-nvim-lsp-signature-help"] = {
}, loaded = true,
["gitsigns.nvim"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help",
loaded = true, url = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", },
url = "https://github.com/lewis6991/gitsigns.nvim" ["cmp-nvim-lua"] = {
}, loaded = true,
["indent-blankline.nvim"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
loaded = true, url = "https://github.com/hrsh7th/cmp-nvim-lua",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim", },
url = "https://github.com/lukas-reineke/indent-blankline.nvim" ["cmp-path"] = {
}, loaded = true,
["lualine.nvim"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp-path",
loaded = true, url = "https://github.com/hrsh7th/cmp-path",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/lualine.nvim", },
url = "https://github.com/nvim-lualine/lualine.nvim" cmp_luasnip = {
}, loaded = true,
["mason-lspconfig.nvim"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
loaded = true, url = "https://github.com/saadparwaiz1/cmp_luasnip",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", },
url = "https://github.com/williamboman/mason-lspconfig.nvim" ["diffview.nvim"] = {
}, loaded = true,
["mason.nvim"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/diffview.nvim",
loaded = true, url = "https://github.com/sindrets/diffview.nvim",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/mason.nvim", },
url = "https://github.com/williamboman/mason.nvim" ["fidget.nvim"] = {
}, loaded = true,
["neodev.nvim"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/fidget.nvim",
loaded = true, url = "https://github.com/j-hui/fidget.nvim",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/neodev.nvim", },
url = "https://github.com/folke/neodev.nvim" ["gitsigns.nvim"] = {
}, loaded = true,
neogit = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
loaded = true, url = "https://github.com/lewis6991/gitsigns.nvim",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/neogit", },
url = "https://github.com/TimUntersberger/neogit" ["indent-blankline.nvim"] = {
}, loaded = true,
["nvim-autopairs"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim",
loaded = true, url = "https://github.com/lukas-reineke/indent-blankline.nvim",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-autopairs", },
url = "https://github.com/windwp/nvim-autopairs" ["lualine.nvim"] = {
}, loaded = true,
["nvim-cmp"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/lualine.nvim",
loaded = true, url = "https://github.com/nvim-lualine/lualine.nvim",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-cmp", },
url = "https://github.com/hrsh7th/nvim-cmp" ["mason-lspconfig.nvim"] = {
}, loaded = true,
["nvim-jqx"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
loaded = true, url = "https://github.com/williamboman/mason-lspconfig.nvim",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-jqx", },
url = "https://github.com/gennaro-tedesco/nvim-jqx" ["mason.nvim"] = {
}, loaded = true,
["nvim-lspconfig"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/mason.nvim",
loaded = true, url = "https://github.com/williamboman/mason.nvim",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", },
url = "https://github.com/neovim/nvim-lspconfig" ["neodev.nvim"] = {
}, loaded = true,
["nvim-texlabconfig"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/neodev.nvim",
loaded = true, url = "https://github.com/folke/neodev.nvim",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-texlabconfig", },
url = "https://github.com/f3fora/nvim-texlabconfig" neogit = {
}, loaded = true,
["nvim-tree.lua"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/neogit",
loaded = true, url = "https://github.com/TimUntersberger/neogit",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", },
url = "https://github.com/nvim-tree/nvim-tree.lua" ["nvim-autopairs"] = {
}, loaded = true,
["nvim-treesitter"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-autopairs",
loaded = true, url = "https://github.com/windwp/nvim-autopairs",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-treesitter", },
url = "https://github.com/nvim-treesitter/nvim-treesitter" ["nvim-cmp"] = {
}, loaded = true,
["nvim-treesitter-textobjects"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-cmp",
load_after = {}, url = "https://github.com/hrsh7th/nvim-cmp",
loaded = true, },
needs_bufread = false, ["nvim-jqx"] = {
path = "/Users/salar/.local/share/nvim/site/pack/packer/opt/nvim-treesitter-textobjects", loaded = true,
url = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects" path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-jqx",
}, url = "https://github.com/gennaro-tedesco/nvim-jqx",
["nvim-web-devicons"] = { },
loaded = true, ["nvim-lspconfig"] = {
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", loaded = true,
url = "https://github.com/nvim-tree/nvim-web-devicons" path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
}, url = "https://github.com/neovim/nvim-lspconfig",
["packer.nvim"] = { },
loaded = true, ["nvim-texlabconfig"] = {
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/packer.nvim", loaded = true,
url = "https://github.com/wbthomason/packer.nvim" path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-texlabconfig",
}, url = "https://github.com/f3fora/nvim-texlabconfig",
playground = { },
loaded = true, ["nvim-tree.lua"] = {
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/playground", loaded = true,
url = "https://github.com/nvim-treesitter/playground" path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
}, url = "https://github.com/nvim-tree/nvim-tree.lua",
["plenary.nvim"] = { },
loaded = true, ["nvim-treesitter"] = {
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/plenary.nvim", loaded = true,
url = "https://github.com/nvim-lua/plenary.nvim" path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
}, url = "https://github.com/nvim-treesitter/nvim-treesitter",
["scaladex.nvim"] = { },
loaded = true, ["nvim-treesitter-textobjects"] = {
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/scaladex.nvim", load_after = {},
url = "https://github.com/softinio/scaladex.nvim" loaded = true,
}, needs_bufread = false,
["stylua-nvim"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/opt/nvim-treesitter-textobjects",
loaded = true, url = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/stylua-nvim", },
url = "https://github.com/ckipp01/stylua-nvim" ["nvim-web-devicons"] = {
}, loaded = true,
["telescope-fzf-native.nvim"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
cond = { true }, url = "https://github.com/nvim-tree/nvim-web-devicons",
loaded = false, },
needs_bufread = false, ["packer.nvim"] = {
only_cond = true, loaded = true,
path = "/Users/salar/.local/share/nvim/site/pack/packer/opt/telescope-fzf-native.nvim", path = "/Users/salar/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim" url = "https://github.com/wbthomason/packer.nvim",
}, },
["telescope.nvim"] = { playground = {
loaded = true, loaded = true,
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/telescope.nvim", path = "/Users/salar/.local/share/nvim/site/pack/packer/start/playground",
url = "https://github.com/nvim-telescope/telescope.nvim" url = "https://github.com/nvim-treesitter/playground",
}, },
["tokyonight.nvim"] = { ["plenary.nvim"] = {
loaded = true, loaded = true,
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", path = "/Users/salar/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/folke/tokyonight.nvim" url = "https://github.com/nvim-lua/plenary.nvim",
}, },
["trouble.nvim"] = { ["scaladex.nvim"] = {
loaded = true, loaded = true,
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/trouble.nvim", path = "/Users/salar/.local/share/nvim/site/pack/packer/start/scaladex.nvim",
url = "https://github.com/folke/trouble.nvim" url = "https://github.com/softinio/scaladex.nvim",
}, },
["vim-fugitive"] = { ["stylua-nvim"] = {
loaded = true, loaded = true,
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/vim-fugitive", path = "/Users/salar/.local/share/nvim/site/pack/packer/start/stylua-nvim",
url = "https://github.com/tpope/vim-fugitive" url = "https://github.com/ckipp01/stylua-nvim",
}, },
["vim-rhubarb"] = { ["telescope-fzf-native.nvim"] = {
loaded = true, cond = { true },
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/vim-rhubarb", loaded = false,
url = "https://github.com/tpope/vim-rhubarb" needs_bufread = false,
}, only_cond = true,
["vim-sleuth"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/opt/telescope-fzf-native.nvim",
loaded = true, url = "https://github.com/nvim-telescope/telescope-fzf-native.nvim",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/vim-sleuth", },
url = "https://github.com/tpope/vim-sleuth" ["telescope.nvim"] = {
}, loaded = true,
vimtex = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/telescope.nvim",
loaded = true, url = "https://github.com/nvim-telescope/telescope.nvim",
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/vimtex", },
url = "https://github.com/lervag/vimtex" ["tokyonight.nvim"] = {
}, loaded = true,
["which-key.nvim"] = { path = "/Users/salar/.local/share/nvim/site/pack/packer/start/tokyonight.nvim",
config = { "\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0" }, url = "https://github.com/folke/tokyonight.nvim",
loaded = true, },
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/which-key.nvim", ["trouble.nvim"] = {
url = "https://github.com/folke/which-key.nvim" loaded = true,
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/trouble.nvim",
url = "https://github.com/folke/trouble.nvim",
},
["vim-fugitive"] = {
loaded = true,
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/vim-fugitive",
url = "https://github.com/tpope/vim-fugitive",
},
["vim-rhubarb"] = {
loaded = true,
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/vim-rhubarb",
url = "https://github.com/tpope/vim-rhubarb",
},
["vim-sleuth"] = {
loaded = true,
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/vim-sleuth",
url = "https://github.com/tpope/vim-sleuth",
},
vimtex = {
loaded = true,
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/vimtex",
url = "https://github.com/lervag/vimtex",
},
["which-key.nvim"] = {
config = {
"\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0",
},
loaded = true,
path = "/Users/salar/.local/share/nvim/site/pack/packer/start/which-key.nvim",
url = "https://github.com/folke/which-key.nvim",
},
} }
}
time([[Defining packer_plugins]], false) time([[Defining packer_plugins]], false)
-- Config for: which-key.nvim -- Config for: which-key.nvim
time([[Config for which-key.nvim]], true) time([[Config for which-key.nvim]], true)
try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0", "config", "which-key.nvim") try_loadstring(
time([[Config for which-key.nvim]], false) "\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0",
-- Conditional loads "config",
time([[Conditional loading of telescope-fzf-native.nvim]], true) "which-key.nvim"
require("packer.load")({"telescope-fzf-native.nvim"}, {}, _G.packer_plugins) )
time([[Conditional loading of telescope-fzf-native.nvim]], false) time([[Config for which-key.nvim]], false)
-- Load plugins in order defined by `after` -- Conditional loads
time([[Sequenced loading]], true) time([[Conditional loading of telescope-fzf-native.nvim]], true)
vim.cmd [[ packadd nvim-treesitter ]] require("packer.load")({ "telescope-fzf-native.nvim" }, {}, _G.packer_plugins)
vim.cmd [[ packadd nvim-treesitter-textobjects ]] time([[Conditional loading of telescope-fzf-native.nvim]], false)
time([[Sequenced loading]], false) -- Load plugins in order defined by `after`
time([[Sequenced loading]], true)
vim.cmd([[ packadd nvim-treesitter ]])
vim.cmd([[ packadd nvim-treesitter-textobjects ]])
time([[Sequenced loading]], false)
_G._packer.inside_compile = false _G._packer.inside_compile = false
if _G._packer.needs_bufread == true then if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead") vim.cmd("doautocmd BufRead")
end end
_G._packer.needs_bufread = false _G._packer.needs_bufread = false
if should_profile then save_profiles() end
if should_profile then
save_profiles()
end
end) end)
if not no_errors then if not no_errors then
error_msg = error_msg:gsub('"', '\\"') 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') vim.api.nvim_command(
'echohl ErrorMsg | echom "Error in packer_compiled: '
.. error_msg
.. '" | echom "Please check your config for correctness" | echohl None'
)
end end