diff options
Diffstat (limited to 'stow/nvim/.config')
20 files changed, 1190 insertions, 0 deletions
diff --git a/stow/nvim/.config/nvim/init.lua b/stow/nvim/.config/nvim/init.lua new file mode 100644 index 0000000..11ab069 --- /dev/null +++ b/stow/nvim/.config/nvim/init.lua @@ -0,0 +1,19 @@ +require("justsaumit.options") +require("justsaumit.keymaps") +require("justsaumit.plugins") +require("justsaumit.colorscheme") +require("justsaumit.treesitter-config") +require("justsaumit.lualine-config") +require("justsaumit.bufferline-config") +require("justsaumit.nvim-tree-config") +require("justsaumit.lastplace-config") +require("justsaumit.which-key-config") +require("justsaumit.colorizer-config") +require("justsaumit.telescope-config") +require("justsaumit.nvim-comment-config") +require("justsaumit.mason") +require("justsaumit.lsp-config") +require("justsaumit.lspsaga-config") +require("justsaumit.cmp-config") +require("justsaumit.toggleterm-config") +print ("while(!(succeed = try() ) );") diff --git a/stow/nvim/.config/nvim/lua/justsaumit/bufferline-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/bufferline-config.lua new file mode 100644 index 0000000..879c669 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/bufferline-config.lua @@ -0,0 +1,71 @@ +--Enable true color support for the terminal +vim.opt.termguicolors = true +--Protected call +local status, bufferline = pcall(require, "bufferline") +if not status then + return +end + +bufferline.setup { + options = { + mode = "buffers", + numbers = "none", + close_command = "bdelete! %d", + right_mouse_command = "bdelete! %d", + left_mouse_command = "buffer %d", + middle_mouse_command = nil, + indicator = { + icon = '▎', + style = 'icon', + }, + --buffer_close_icon = '', + buffer_close_icon = "", + modified_icon = '●', + close_icon = '', + -- close_icon = '', + left_trunc_marker = '', + right_trunc_marker = '', + max_name_length = 30, + max_prefix_length = 30, -- prefix used when a buffer is de-duplicated + tab_size = 22, + diagnostics = false, + diagnostics_update_in_insert = false, + offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, + color_icons = true, + show_buffer_icons = true, + show_buffer_close_icons = true, + show_close_icon = true, + show_tab_indicators = true, + persist_buffer_sort = true, + separator_style = "thin", -- | "thick" | "thin" | slant, + enforce_regular_tabs = true, + always_show_bufferline = true, + -- name_formatter = function(buf) -- buf contains a "name", "path" and "bufnr" + -- -- remove extension from markdown files for example + -- if buf.name:match('%.md') then + -- return vim.fn.fnamemodify(buf.name, ':t:r') + -- end + -- end + } +} +local opts = { noremap = true, silent = true } +local keymap = vim.keymap.set +keymap("", "<Space>", "<Nop>", opts) +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +--Leader+number -> tab change +for i = 1, 9 do + keymap("n", "<leader>" .. i, function() + require("bufferline").go_to_buffer(i, true) + end, opts) +end + +--Ctrl+W to close a buffer +keymap("n", "W", ":bdelete!<CR>", opts) + + +--Tab or Ctrl+Tab for Forward Cycle //terminals don't see a difference between <Tab> and <C-Tab> +--Shift+Tab for Backward Cycle +keymap("n", "<Tab>", ":BufferLineCycleNext<CR>", opts) +keymap("n", "<S-Tab>", ":BufferLineCyclePrev<CR>", opts) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/cmp-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/cmp-config.lua new file mode 100644 index 0000000..7e29155 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/cmp-config.lua @@ -0,0 +1,88 @@ +vim.g.completeopt="menu,menuone,noselect,noinsert" + +local has_words_before = function() + unpack = unpack or table.unpack + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil +end + +local luasnip = require("luasnip") +local cmp = require'cmp' + +cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + luasnip.lsp_expand(args.body) + end, + }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + ['<C-b>'] = cmp.mapping.scroll_docs(-4), + ['<C-f>'] = cmp.mapping.scroll_docs(4), + ['<C-Space>'] = cmp.mapping.complete(), + ['<C-e>'] = cmp.mapping.abort(), + ['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + ["<Tab>"] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() + -- they way you will only jump inside the snippet region + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { "i", "s" }), + + ["<S-Tab>"] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, -- For luasnip users. + { name = 'buffer' }, + { name = 'path' }, + }), +}) + +-- Set configuration for specific filetype. +cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). + }, { + { name = 'buffer' }, + }) +}) + +-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). +cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } +}) + +-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). +cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }) +}) + diff --git a/stow/nvim/.config/nvim/lua/justsaumit/colorizer-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/colorizer-config.lua new file mode 100644 index 0000000..569021d --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/colorizer-config.lua @@ -0,0 +1,27 @@ +require("colorizer").setup { + filetypes = { "*" }, + user_default_options = { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = true, -- "Name" codes like Blue or blue + RRGGBBAA = false, -- #RRGGBBAA hex codes + AARRGGBB = false, -- 0xAARRGGBB hex codes + rgb_fn = false, -- CSS rgb() and rgba() functions + hsl_fn = false, -- CSS hsl() and hsla() functions + css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn + -- Available modes for `mode`: foreground, background, virtualtext + mode = "background", -- Set the display mode. + -- Available methods are false / true / "normal" / "lsp" / "both" + -- True is same as normal + tailwind = false, -- Enable tailwind colors + -- parsers can contain values used in |user_default_options| + sass = { enable = false, parsers = { "css" }, }, -- Enable sass colors + virtualtext = "■", + -- update color values even if buffer is not focused + -- example use: cmp_menu, cmp_docs + always_update = false + }, + -- all the sub-options of filetypes apply to buftypes + buftypes = {}, +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/colorscheme.lua b/stow/nvim/.config/nvim/lua/justsaumit/colorscheme.lua new file mode 100644 index 0000000..67c166f --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/colorscheme.lua @@ -0,0 +1,33 @@ +--configuration needs to be set BEFORE loading the color scheme with colorscheme tokyonight +vim.g.tokyonight_style = "night" +tokyonight_terminal_colors=true +tokyonight_italic_comments=true +tokyonight_italic_keywords=true +tokyonight_italic_functions=false +tokyonight_italic_variables=false +tokyonight_transparent=false +tokyonight_hide_inactive_statusline=false +tokyonight_sidebars={} +tokyonight_transparent_sidebar=false +tokyonight_dark_sidebar=true +tokyonight_dark_float=true +tokyonight_colors={} +tokyonight_lualine_bold=false + +--protected call +local colorscheme = "tokyonight" +local pywal = require('pywal') + +local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) +if not status_ok then + vim.notify("colorscheme " .. colorscheme .. " not found! :(") + pywal.setup() + return +end + +-- init.lua +vim.g.tokyodark_transparent_background = false +vim.g.tokyodark_enable_italic_comment = true +vim.g.tokyodark_enable_italic = true +vim.g.tokyodark_color_gamma = "1.0" +vim.cmd("colorscheme tokyodark") diff --git a/stow/nvim/.config/nvim/lua/justsaumit/keymaps.lua b/stow/nvim/.config/nvim/lua/justsaumit/keymaps.lua new file mode 100644 index 0000000..582113c --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/keymaps.lua @@ -0,0 +1,73 @@ +local opts = { noremap = true, silent = true } + +-- Shorten function name +local keymap = vim.keymap.set + +--Remap space as leader key +keymap("", "<Space>", "<Nop>", opts) +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +---Autocompile and Execute +--ANSI C +vim.cmd([[autocmd BufEnter *.c map <F4> :w <CR> :!gcc % -ansi -o %< && ./%< <CR>]]) +--C99 +vim.cmd([[autocmd BufEnter *.c map <F5> :w <CR> :!gcc -std=c99 % -o %< && ./%< <CR>]]) +--C +vim.cmd([[autocmd BufEnter *.c map <F6> :w <CR> :!gcc % -o %< && ./%< <CR>]]) + +--C++ +vim.cmd([[autocmd BufEnter *.cpp map <F4> :w <CR> :!g++ % -o %< && ./%< <CR>]]) + +-- Modes +-- normal_mode = "n", +-- insert_mode = "i", +-- visual_mode = "v", +-- visual_block_mode = "x", +-- command_mode = "c", + +-- Normal -- +-- +-- +--Save file with Ctrl+S +keymap("n", "<C-s>", ":w<CR>", opts) +--Toggle nvim-tree +keymap('n', '<C-e>', ':NvimTreeToggle<CR>', opts) +keymap('n', '<leader>e', ':NvimTreeToggle<CR>', opts) +--Disable C-e +-- keymap("n", "<C-e>", ":<CR>", opts) + +-- Better window navigation for split +keymap("n", "<C-h>", "<C-w>h", opts) +keymap("n", "<C-j>", "<C-w>j", opts) +keymap("n", "<C-k>", "<C-w>k", opts) +keymap("n", "<C-l>", "<C-w>l", opts) + +-- Resize with arrows +keymap("n", "<C-Up>", ":resize +2<CR>", opts) +keymap("n", "<C-Down>", ":resize -2<CR>", opts) +keymap("n", "<C-Left>", ":vertical resize +2<CR>", opts) +keymap("n", "<C-Right>", ":vertical resize -2<CR>", opts) + +-- Move text up and down(better implementation in visual mode) +--keymap("n", "<A-j>", "<Esc>:m .+1<CR>==gi", opts) +--keymap("n", "<A-k>", "<Esc>:m .-2<CR>==gi", opts) + +-- Insert -- + +-- Visual -- +-- Stay in indent mode +keymap("v", "<", "<gv", opts) +keymap("v", ">", ">gv", opts) + +-- Move text up and down +keymap("v", "<A-j>", ":m .+1<CR>==", opts) +keymap("v", "<A-k>", ":m .-2<CR>==", opts) +keymap("v", "p", '"_dP', opts) + +-- Visual Block -- +-- Move text up and down +keymap("x", "J", ":move '>+1<CR>gv-gv", opts) +keymap("x", "K", ":move '<-2<CR>gv-gv", opts) +keymap("x", "<A-j>", ":move '>+1<CR>gv-gv", opts) +keymap("x", "<A-k>", ":move '<-2<CR>gv-gv", opts) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/lastplace-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/lastplace-config.lua new file mode 100644 index 0000000..4fa6a83 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/lastplace-config.lua @@ -0,0 +1,5 @@ +require'nvim-lastplace'.setup { + lastplace_ignore_buftype = {"quickfix", "nofile", "help"}, + lastplace_ignore_filetype = {"gitcommit", "gitrebase", "svn", "hgcommit"}, + lastplace_open_folds = true +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/lsp-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/lsp-config.lua new file mode 100644 index 0000000..2c0d746 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/lsp-config.lua @@ -0,0 +1,95 @@ +local lspconfig = require("lspconfig") +local on_attach = function(_, bufnr) + local function buf_set_keymap(...) + vim.api.nvim_buf_set_keymap(bufnr, ...) + end + local function buf_set_option(...) + vim.api.nvim_buf_set_option(bufnr, ...) + end + + buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") + + local opts = { noremap = true, silent = true } + buf_set_keymap("n", "K", ":lua vim.lsp.buf.hover()<CR>", opts) --> information about the symbol under the cursors in a floating window + buf_set_keymap("n", "<leader>rn", ":lua vim.lsp.util.rename()<CR>", opts) --> rename old_fname to new_fname + buf_set_keymap("n", "<leader>ca", ":lua vim.lsp.buf.code_action()<CR>", opts) --> selects a code action available at the current cursor position + buf_set_keymap("n", "gd", ":lua vim.lsp.buf.definition()<CR>", opts) --> jumps to the definition of the symbol under the cursor + buf_set_keymap("n", "gi", ":lua vim.lsp.buf.implementation()<CR>", opts) --> lists all the implementations for the symbol under the cursor in the quickfix window + buf_set_keymap("n", "gr", ":lua vim.lsp.buf.references()<CR>", opts) --> lists all the references to the symbl under the cursor in the quickfix window + buf_set_keymap("n", "<leader>ld", ":lua vim.diagnostic.open_float()<CR>", opts) + buf_set_keymap("n", "[d", ":lua vim.diagnostic.goto_prev()<CR>", opts) + buf_set_keymap("n", "]d", ":lua vim.diagnostic.goto_next()<CR>", opts) + buf_set_keymap("n", "<leader>lq", ":lua vim.diagnostic.setloclist()<CR>", opts) + buf_set_keymap("n", "<leader>lf", ":lua vim.lsp.buf.formatting()<CR>", opts) --> formats the current buffer +end + +---@diagnostic disable-next-line: undefined-global +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) + +--lspconfig x cmp_nvim_lsp +-- Set up lspconfig. +-- require("lspconfig")["clangd"].setup({ +lspconfig.clangd.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.pyright.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.bashls.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.cssls.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.gopls.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.html.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.lua_ls.setup({ + on_attach = on_attach, + capabilities = capabilities, + settings = { + Lua = { + runtime = { version = 'LuaJIT',}, + diagnostics = { + globals = {'vim','require',},}, + workspace = { library = vim.api.nvim_get_runtime_file("", true),}, + telemetry = {enable = false,}, + }, + }, +}) + +lspconfig.marksman.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.rust_analyzer.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +-- lspconfig.tsserver.setup({ +-- on_attach = on_attach, +-- capabilities = capabilities, +-- }) + +lspconfig.yamlls.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/lspsaga-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/lspsaga-config.lua new file mode 100644 index 0000000..70d3d79 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/lspsaga-config.lua @@ -0,0 +1,49 @@ +local lspsaga = require 'lspsaga' +lspsaga.setup { -- defaults ... + debug = false, + use_saga_diagnostic_sign = true, + -- diagnostic sign + error_sign = " ", + warn_sign = " ", + hint_sign = " ", + infor_sign = " ", + diagnostic_header_icon = " ", + -- code action title icon + code_action_icon = " ", + code_action_prompt = { + enable = true, + sign = true, + sign_priority = 40, + virtual_text = true, + }, + finder_definition_icon = " ", + finder_reference_icon = " ", + max_preview_lines = 10, + finder_action_keys = { + open = "o", + vsplit = "s", + split = "i", + quit = "q", + scroll_down = "<C-f>", + scroll_up = "<C-b>", + }, + code_action_keys = { + quit = "q", + exec = "<CR>", + }, + rename_action_keys = { + quit = "<C-c>", + exec = "<CR>", + }, + definition_preview_icon = " ", + border_style = "single", + rename_prompt_prefix = "➤ ", + rename_output_qflist = { + enable = false, + auto_open_qflist = false, + }, + server_filetype_map = {}, + diagnostic_prefix_format = "%d. ", + diagnostic_message_format = "%m %c", + highlight_prefix = false, +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/lualine-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/lualine-config.lua new file mode 100644 index 0000000..56c426a --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/lualine-config.lua @@ -0,0 +1,40 @@ +require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/mason.lua b/stow/nvim/.config/nvim/lua/justsaumit/mason.lua new file mode 100644 index 0000000..d651810 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/mason.lua @@ -0,0 +1,39 @@ +require("mason").setup({ + options = { + ensure_installed = { "clangd", "clangd-format", "codelldb", "lua-language-server" }, -- not an option from mason.nvim + PATH = "skip" + }, + ui = { + icons = { + package_pending = " ", + package_installed = " ", + package_uninstalled = " ", + }, + keymaps = { + toggle_server_expand = "<CR>", + install_server = "i", + update_server = "u", + check_server_version = "c", + update_all_servers = "U", + check_outdated_servers = "C", + uninstall_server = "X", + cancel_installation = "<C-c>", + }, + }, + max_concurrent_installers = 10, +}) +require("mason-lspconfig").setup ({ + ensure_installed = { + "lua_ls", + "clangd", + "pyright", + "rust_analyzer", + "bashls", + "cssls", + "html", + "lua_ls", + "marksman", + --"tsserver", + "yamlls", + }, +}) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/nvim-comment-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/nvim-comment-config.lua new file mode 100644 index 0000000..d71ce14 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/nvim-comment-config.lua @@ -0,0 +1,5 @@ +require('nvim_comment').setup({ + line_mapping = "<leader>cl", + operator_mapping = "<leader>c", + comment_empty = false +}) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/nvim-tree-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/nvim-tree-config.lua new file mode 100644 index 0000000..b499f91 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/nvim-tree-config.lua @@ -0,0 +1,75 @@ +-- disable netrw at the very start of your init.lua +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +-- set termguicolors to enable highlight groups +vim.opt.termguicolors = true + +-- empty setup using defaults +-- require("nvim-tree").setup() + +-- OR setup with some options +require("nvim-tree").setup({ + sort_by = "case_sensitive", + view = { + adaptive_size = true, + }, + renderer = { + group_empty = true, + highlight_git = false, + full_name = false, + highlight_opened_files = "none", + root_folder_modifier = ":~", + indent_width = 2, + indent_markers = { + enable = true, + inline_arrows = true, + icons = { + corner = "└", + edge = "│", + item = "│", + bottom = "─", + none = " ", + }, + }, + icons = { + webdev_colors = true, + git_placement = "before", + padding = " ", + symlink_arrow = " ➛ ", + show = { + file = true, + folder = true, + folder_arrow = true, + git = true, + }, + glyphs = { + default = "", + symlink = "", + bookmark = "", + folder = { + arrow_closed = "", + arrow_open = "", + default = "", + open = "", + empty = "", + empty_open = "", + symlink = "", + symlink_open = "", + }, + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌", + }, + }, + }, + }, + filters = { + dotfiles = true, + }, +}) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/options.lua b/stow/nvim/.config/nvim/lua/justsaumit/options.lua new file mode 100644 index 0000000..4eae867 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/options.lua @@ -0,0 +1,46 @@ +local options = { + number=true, -- Shows absolute linenumber + relativenumber=true, -- Shows linenumber relative to cursor + --combination of both^ for hybrid linenumber +-- textwidth=100, + numberwidth=4, + scrolloff=8, -- keeps cursor in middle of screen/scrolls 8lines in advance + sidescroll=18, + mouse="a", -- enable mouse support + splitbelow=true, -- on horizontal split instead of opening window to left open it at right + splitright=true, -- on vertical split instead of opening window to left open it at right + termguicolors=true, + showmode=false, -- lualine does the job + cmdheight=1, + wrap=false, + whichwrap='b,s,<,>,[,],h,l', + clipboard="unnamedplus", -- allows neovim to access system clipboard using yank + fileencoding="UTF-8", + --spaces/tabs/indents + softtabstop=4, -- No. of spaces per tab + shiftwidth=4, -- No. of auto-indent space + expandtab=true, -- spaces inplace of tabs + autoindent=true, -- New line copies indentation from past line + smartindent=true, -- Indents in accordance to the syntax/style of the code extension + --searches + ignorecase=true, -- Ignore case-sensitivity during search + smartcase=true, -- If searching capital search only capital + hlsearch=false, -- no perma highlight post search + incsearch=true, -- searches for strings incrementally + showmatch=true, -- Highlight matching braces + --git integration/lsp/diagnostic + signcolumn="yes", + --undo/backup + backup=false, + swapfile=false, + undodir=os.getenv("HOME") .. "/.local/state/nvim/undodir", + undofile=true +-- showbreak="+++", -- wrap broken line prefix +} +--forloop for table 'options' +for key, value in pairs(options) do + vim.opt[key] = value +end + +--to 'cw/'dw' a word containing '-' in between +vim.cmd [[set iskeyword+=-]] diff --git a/stow/nvim/.config/nvim/lua/justsaumit/plugins.lua b/stow/nvim/.config/nvim/lua/justsaumit/plugins.lua new file mode 100644 index 0000000..460d6f3 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/plugins.lua @@ -0,0 +1,113 @@ +local fn = vim.fn + +-- Automatically install packer +local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" +if fn.empty(fn.glob(install_path)) > 0 then + PACKER_BOOTSTRAP = fn.system { + "git", + "clone", + "--depth", + "1", + "https://github.com/wbthomason/packer.nvim", + install_path, + } + print "Installing packer close and reopen Neovim..." + vim.cmd [[packadd packer.nvim]] +end + +-- Autocommand that reloads neovim whenever you save (:w) the plugins.lua file +vim.cmd [[ + augroup packer_user_config + autocmd! + autocmd BufWritePost plugins.lua source <afile> | PackerSync + augroup end +]] + +-- Use a protected call so we don't error out! +local status_ok, packer = pcall(require, "packer") +if not status_ok then + return +end + +-- Have packer use a popup window +packer.init { + display = { + open_fn = function() + return require("packer.util").float { border = "rounded" } + end, + }, +} + +--Actual good stuff +--Install all your plugins here +return packer.startup(function(use) +--Necessities + use "wbthomason/packer.nvim" -- Have packer manage itself + use "nvim-lua/popup.nvim" -- An implementation of the Popup API from vim in Neovim + use "nvim-lua/plenary.nvim" -- Useful lua functions used ny lots of plugins + use "ethanholz/nvim-lastplace" -- Preserve last editing position in nvim +--TreeSitter + use {'nvim-treesitter/nvim-treesitter',run = ':TSUpdate'} +--ColorSchemes + use "folke/tokyonight.nvim" + use "tiagovla/tokyodark.nvim" + use { "catppuccin/nvim", as = "catppuccin" } + use { 'AlphaTechnolog/pywal.nvim', as = 'pywal' } +--Web-devicons + use "kyazdani42/nvim-web-devicons" +--Lualine + use {'nvim-lualine/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true }} +--Bufferline + use {'akinsho/bufferline.nvim', tag = "*", requires = 'nvim-tree/nvim-web-devicons'} +--Nvim-tree File explorer for nvim + use {'nvim-tree/nvim-tree.lua', requires = { 'nvim-tree/nvim-web-devicons'}} +--Which-key - displays a popup with possible key bindings + use 'folke/which-key.nvim' +--mini.nvim - Lua module pack + use 'echasnovski/mini.nvim' +--Mason-nvim Portable Package manager for LSP and DAP servers, linters and formatters + use { "williamboman/mason.nvim", run = ":MasonUpdate"} -- :MasonUpdate updates registry contents +--lsp + use("williamboman/mason-lspconfig.nvim") + use("neovim/nvim-lspconfig") --> Collection of configurations for built-in LSP client + use("kkharji/lspsaga.nvim") --> icons for LSP diagnostics + use("onsails/lspkind-nvim") --> vscode-like pictograms for neovim lsp completion items +--cmp - Autocompletions + use("hrsh7th/nvim-cmp") --completion engine + use("L3MON4D3/LuaSnip") --snippets engine + use("saadparwaiz1/cmp_luasnip") --luasnip completion source for nvim-cmp +--cmp plugins + use("hrsh7th/cmp-nvim-lsp")--nvim-cmp source for neovim's built-in language server client. + use("hrsh7th/cmp-buffer") --nvim-cmp source for buffer words. + use("hrsh7th/cmp-path") --nvim-cmp source for filesystem path + use("hrsh7th/cmp-cmdline") --nvim-cmp source for vim's cmdline + +-- use("jose-elias-alvarez/null-ls.nvim") --> inject lsp diagnistocs, formattings, code actions, and more ... +--HTML + use("windwp/nvim-ts-autotag") -- Use treesitter autotag +--Markdown + Zenmode +--Telescope + use {'nvim-telescope/telescope.nvim', tag = '0.1.2', requires = { {'nvim-lua/plenary.nvim'} }} +-- ToggleTerm + use ('akinsho/toggleterm.nvim') + +-- use "rafamadriz/friendly-snippets" -- a bunch of snippets to use + +-- Dashboard + -- use {'glepnir/dashboard-nvim', event = 'Vimenter'} +-- Comments - Toggle comments in Neovim + use "terrortylor/nvim-comment" + +--Autopairs for HTML + --use {"windwp/nvim-autopairs", wants = "nvim-treesitter", module = { "nvim-autopairs.completion.cmp", "nvim-autopairs" }, config = function() + --require("config.autopairs").setup() end,} +--CSS + use 'NvChad/nvim-colorizer.lua' + + +-- Automatically set up your configuration after cloning packer.nvim +-- Put this at the end after all plugins + if PACKER_BOOTSTRAP then + require("packer").sync() + end +end) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/telescope-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/telescope-config.lua new file mode 100644 index 0000000..534e663 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/telescope-config.lua @@ -0,0 +1,52 @@ +local actions = require('telescope.actions') +require('telescope').setup { + defaults = { + layout_config = { + width = 0.75, + prompt_position = "top", + preview_cutoff = 120, + horizontal = {mirror = false}, + vertical = {mirror = false} + }, + find_command = { + 'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case' + }, + prompt_prefix = " ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "descending", + layout_strategy = "horizontal", + file_sorter = require'telescope.sorters'.get_fuzzy_file, + file_ignore_patterns = { + "node_modules", "build", "dist", "yarn.lock", ".local", ".cargo", ".rustup", ".mozilla",".git" + }, + generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, + path_display = {}, + winblend = 0, + border = {}, + borderchars = {'─', '│', '─', '│', '╭', '╮', '╯', '╰'}, + color_devicons = true, + use_less = true, + set_env = {['COLORTERM'] = 'truecolor'}, -- default = nil, + file_previewer = require'telescope.previewers'.vim_buffer_cat.new, + grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, + qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, + buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker, + mappings = { + i = { + ["<C-j>"] = actions.move_selection_next, + ["<C-k>"] = actions.move_selection_previous, + ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist, + ["<esc>"] = actions.close, + ["<CR>"] = actions.select_default + actions.center + }, + n = { + ["<C-j>"] = actions.move_selection_next, + ["<C-k>"] = actions.move_selection_previous, + ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist + } + } + } +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/toggleterm-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/toggleterm-config.lua new file mode 100644 index 0000000..b1579cd --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/toggleterm-config.lua @@ -0,0 +1,16 @@ +require'toggleterm'.setup{ + size = 20, + open_mapping = [[<c-\>]], + hide_numbers = true, -- hide the number column in toggleterm buffers + shade_filetypes = {}, + autochdir = false, + shade_terminals = true, + shading_factor = 1, + start_in_insert = true, + insert_mappings = true, -- whether or not the open mapping applies in insert mode + terminal_mappings = true, -- whether or not the open mapping applies in the opened terminals + persist_size = true, + direction = 'horizontal', + close_on_exit = true, + shell = '/usr/bin/zsh', +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/treesitter-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/treesitter-config.lua new file mode 100644 index 0000000..c64e659 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/treesitter-config.lua @@ -0,0 +1,26 @@ +require'nvim-treesitter.configs'.setup { + -- A list of parser names, or "all" + ensure_installed = { "bash", "c", "cpp", "lua", "rust", "python", "go","html", "javascript", "typescript", "markdown", "solidity", "sxhkdrc" }, + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + auto_install = true, + + -- List of parsers to ignore installing (for "all") + highlight = { + -- `false` will disable the whole extension + enable = true, + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, + autotag = { + enable = true, + enable_close = true, + enable_close_on_slash = true, + enable_rename = true, + filetypes = { "html" , "xml", + 'javascript', 'typescript', 'svelte', + 'markdown',}, + } +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/which-key-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/which-key-config.lua new file mode 100644 index 0000000..93a42fa --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/which-key-config.lua @@ -0,0 +1,69 @@ +local wk = require("which-key") +local Terminal = require('toggleterm.terminal').Terminal +local toggle_float = function() + local float = Terminal:new({ direction = "float" }) + return float:toggle() +end +local toggle_lazygit = function() + local lazygit = Terminal:new({ cmd = "lazygit", direction = "float" }) + return lazygit:toggle() +end +local mappings = { + q = {":q<CR>", "Quit"}, + Z = {":wq<CR>", "Save and Quit"}, + w = {":w<CR>", "Save"}, + x ={":bdelete<CR>", "Close"}, + E = { ":e ~/.config/nvim/init.lua<cr>", "Edit config" }, + f = { + name = "Telescope", + f = {":Telescope find_files<CR>", "Telescope Find Files" }, + h = { ":Telescope find_files hidden=true<CR>", "Telescope Find Files" }, + g = { ":Telescope live_grep<CR>", "Telescope Live Grep" }, + }, + r = { ":Telescope oldfiles<CR>", "Recent files" }, + l = { + name = "LSP", + i = {":LspInfo<CR>", "Connected Language Servers"}, + I = {'<cmd>LspInstallInfo<cr>', 'Install language server'}, + f = {'<cmd>lua vim.lsp.buf.formatting()<CR>', "Format File"}, + k = {"<cmd> lua vim.lsp.buf.signature_help()<CR>", "Signature Help"}, + -- K = {'<cmd>lua vim.lsp.buf.hover()<CR>', "Hover"}, + K = {"<cmd> Lspsaga hover_doc<CR>", "Hover Commands"}, + w = {"<cmd> lua vim.lsp.add_workspace_folder()<CR>", "Add Workspace Folder"}, + W = {"<cmd> lua vim.lsp.remove_workspace_folder()<CR>", "Remove Workspace Folder"}, + l = {"<cmd> lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", "List Workspace Folder"}, + t = {'<cmd>lua vim.lsp.buf.type_definition()<CR>', "Type definition"}, + d = {"<cmd> lua vim.lsp.buf.definition()<CR>", "Go to Definition"}, + D = {"<cmd> lua vim.lsp.buf.declaration()<CR>", "Go to Declaration"}, + r = {"<cmd> lua vim.lsp.buf.references()<CR>", "References"}, + R = {"<cmd> Lspsaga rename<CR>", "Rename"}, + -- R = {'<cmd>lua vim.lsp.buf.rename()<CR>', "Rename"}, + a = {"<cmd> Lspsaga code_action<CR>", "Code Action"}, + -- a = {'<cmd>lua vim.lsp.buf.code_action()<CR>', "Code actions"}, + -- T = {'<cmd> Telescope diagnostics bufnr=0<CR>', "Get Diagnostics"} + go = {"<cmd>Lspsaga show_line_diagnostics<CR>","Show Line Diagnostic"}, + -- e = {'<cmd>lua vim.diagnostic.show_line_diagnostics()<CR>', "Show line diagnostics"}, + gj = {"<cmd>Lspsaga diagnostic_jump_next<CR>","Go to Next Diagnostic"}, + -- n = {'<cmd>lua vim.diagnostic.goto_next()<CR>', "Go to next diagnostic"}, + gk = {"<cmd>Lspsaga diagnostic_jump_prev<CR>","Go to Prev Diagnostic"}, + -- N = {'<cmd>lua vim.diagnostic.goto_prev()<CR>', "Go to previous diagnostic"}, + }, + t = { + name = "ToggleTerm", + t = { ":ToggleTerm<cr>", "Split Below" }, + f = { toggle_float, "Floating Terminal" }, + l = { toggle_lazygit, "Lazygit" }, + }, + p = { + name = "Packer", + s = { ":PackerSync<cr>", "Sync Plugins" }, + r = { ":PackerClean<cr>", "Remove Unused Plugins" }, + c = { ":PackerCompile profile=true<cr>", "Recompile Plugins" }, + i = { ":PackerInstall<cr>", "Install Plugins" }, + p = { ":PackerProfile<cr>", "Packer Profile" }, + S = { ":PackerStatus<cr>", "Packer Status" }, + u = { ":PackerUpdate<cr>", "Update Plugins" } + }, +} +local opts = {prefix = '<leader>'} +wk.register(mappings, opts) diff --git a/stow/nvim/.config/nvim/plugin/packer_compiled.lua b/stow/nvim/.config/nvim/plugin/packer_compiled.lua new file mode 100644 index 0000000..f5e9107 --- /dev/null +++ b/stow/nvim/.config/nvim/plugin/packer_compiled.lua @@ -0,0 +1,249 @@ +-- 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 = "/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/share/lua/5.1/?.lua;/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/share/lua/5.1/?/init.lua;/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/lib/luarocks/rocks-5.1/?.lua;/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/lib/lua/5.1/?.so" +if not string.find(package.path, package_path_str, 1, true) then + package.path = package.path .. ';' .. package_path_str +end + +if not string.find(package.cpath, install_cpath_pattern, 1, true) then + package.cpath = package.cpath .. ';' .. install_cpath_pattern +end + +time([[Luarocks path setup]], false) +time([[try_loadstring definition]], true) +local function try_loadstring(s, component, name) + local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) + if not success then + vim.schedule(function() + vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) + end) + end + return result +end + +time([[try_loadstring definition]], false) +time([[Defining packer_plugins]], true) +_G.packer_plugins = { + LuaSnip = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/LuaSnip", + url = "https://github.com/L3MON4D3/LuaSnip" + }, + ["bufferline.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/bufferline.nvim", + url = "https://github.com/akinsho/bufferline.nvim" + }, + catppuccin = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/catppuccin", + url = "https://github.com/catppuccin/nvim" + }, + ["cmp-buffer"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-buffer", + url = "https://github.com/hrsh7th/cmp-buffer" + }, + ["cmp-cmdline"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-cmdline", + url = "https://github.com/hrsh7th/cmp-cmdline" + }, + ["cmp-nvim-lsp"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + url = "https://github.com/hrsh7th/cmp-nvim-lsp" + }, + ["cmp-path"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-path", + url = "https://github.com/hrsh7th/cmp-path" + }, + cmp_luasnip = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + url = "https://github.com/saadparwaiz1/cmp_luasnip" + }, + ["lspkind-nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/lspkind-nvim", + url = "https://github.com/onsails/lspkind-nvim" + }, + ["lspsaga.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/lspsaga.nvim", + url = "https://github.com/kkharji/lspsaga.nvim" + }, + ["lualine.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/lualine.nvim", + url = "https://github.com/nvim-lualine/lualine.nvim" + }, + ["mason-lspconfig.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", + url = "https://github.com/williamboman/mason-lspconfig.nvim" + }, + ["mason.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/mason.nvim", + url = "https://github.com/williamboman/mason.nvim" + }, + ["nvim-cmp"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-cmp", + url = "https://github.com/hrsh7th/nvim-cmp" + }, + ["nvim-colorizer.lua"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua", + url = "https://github.com/NvChad/nvim-colorizer.lua" + }, + ["nvim-comment"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-comment", + url = "https://github.com/terrortylor/nvim-comment" + }, + ["nvim-lastplace"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-lastplace", + url = "https://github.com/ethanholz/nvim-lastplace" + }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + url = "https://github.com/neovim/nvim-lspconfig" + }, + ["nvim-tree.lua"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", + url = "https://github.com/nvim-tree/nvim-tree.lua" + }, + ["nvim-treesitter"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + url = "https://github.com/nvim-treesitter/nvim-treesitter" + }, + ["nvim-ts-autotag"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-ts-autotag", + url = "https://github.com/windwp/nvim-ts-autotag" + }, + ["nvim-web-devicons"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", + url = "https://github.com/kyazdani42/nvim-web-devicons" + }, + ["packer.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/plenary.nvim", + url = "https://github.com/nvim-lua/plenary.nvim" + }, + ["popup.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/popup.nvim", + url = "https://github.com/nvim-lua/popup.nvim" + }, + pywal = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/pywal", + url = "https://github.com/AlphaTechnolog/pywal.nvim" + }, + ["telescope.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/telescope.nvim", + url = "https://github.com/nvim-telescope/telescope.nvim" + }, + ["toggleterm.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/toggleterm.nvim", + url = "https://github.com/akinsho/toggleterm.nvim" + }, + ["tokyodark.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/tokyodark.nvim", + url = "https://github.com/tiagovla/tokyodark.nvim" + }, + ["tokyonight.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", + url = "https://github.com/folke/tokyonight.nvim" + }, + ["which-key.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/which-key.nvim", + url = "https://github.com/folke/which-key.nvim" + } +} + +time([[Defining packer_plugins]], 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 |
