diff options
Diffstat (limited to '.config/nvim/lua')
18 files changed, 0 insertions, 922 deletions
diff --git a/.config/nvim/lua/justsaumit/bufferline-config.lua b/.config/nvim/lua/justsaumit/bufferline-config.lua deleted file mode 100644 index 879c669..0000000 --- a/.config/nvim/lua/justsaumit/bufferline-config.lua +++ /dev/null @@ -1,71 +0,0 @@ ---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/.config/nvim/lua/justsaumit/cmp-config.lua b/.config/nvim/lua/justsaumit/cmp-config.lua deleted file mode 100644 index 7e29155..0000000 --- a/.config/nvim/lua/justsaumit/cmp-config.lua +++ /dev/null @@ -1,88 +0,0 @@ -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/.config/nvim/lua/justsaumit/colorizer-config.lua b/.config/nvim/lua/justsaumit/colorizer-config.lua deleted file mode 100644 index 569021d..0000000 --- a/.config/nvim/lua/justsaumit/colorizer-config.lua +++ /dev/null @@ -1,27 +0,0 @@ -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/.config/nvim/lua/justsaumit/colorscheme.lua b/.config/nvim/lua/justsaumit/colorscheme.lua deleted file mode 100644 index 67c166f..0000000 --- a/.config/nvim/lua/justsaumit/colorscheme.lua +++ /dev/null @@ -1,33 +0,0 @@ ---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/.config/nvim/lua/justsaumit/keymaps.lua b/.config/nvim/lua/justsaumit/keymaps.lua deleted file mode 100644 index 582113c..0000000 --- a/.config/nvim/lua/justsaumit/keymaps.lua +++ /dev/null @@ -1,73 +0,0 @@ -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/.config/nvim/lua/justsaumit/lastplace-config.lua b/.config/nvim/lua/justsaumit/lastplace-config.lua deleted file mode 100644 index 4fa6a83..0000000 --- a/.config/nvim/lua/justsaumit/lastplace-config.lua +++ /dev/null @@ -1,5 +0,0 @@ -require'nvim-lastplace'.setup { - lastplace_ignore_buftype = {"quickfix", "nofile", "help"}, - lastplace_ignore_filetype = {"gitcommit", "gitrebase", "svn", "hgcommit"}, - lastplace_open_folds = true -} diff --git a/.config/nvim/lua/justsaumit/lsp-config.lua b/.config/nvim/lua/justsaumit/lsp-config.lua deleted file mode 100644 index 2c0d746..0000000 --- a/.config/nvim/lua/justsaumit/lsp-config.lua +++ /dev/null @@ -1,95 +0,0 @@ -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/.config/nvim/lua/justsaumit/lspsaga-config.lua b/.config/nvim/lua/justsaumit/lspsaga-config.lua deleted file mode 100644 index 70d3d79..0000000 --- a/.config/nvim/lua/justsaumit/lspsaga-config.lua +++ /dev/null @@ -1,49 +0,0 @@ -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/.config/nvim/lua/justsaumit/lualine-config.lua b/.config/nvim/lua/justsaumit/lualine-config.lua deleted file mode 100644 index 56c426a..0000000 --- a/.config/nvim/lua/justsaumit/lualine-config.lua +++ /dev/null @@ -1,40 +0,0 @@ -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/.config/nvim/lua/justsaumit/mason.lua b/.config/nvim/lua/justsaumit/mason.lua deleted file mode 100644 index d651810..0000000 --- a/.config/nvim/lua/justsaumit/mason.lua +++ /dev/null @@ -1,39 +0,0 @@ -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/.config/nvim/lua/justsaumit/nvim-comment-config.lua b/.config/nvim/lua/justsaumit/nvim-comment-config.lua deleted file mode 100644 index d71ce14..0000000 --- a/.config/nvim/lua/justsaumit/nvim-comment-config.lua +++ /dev/null @@ -1,5 +0,0 @@ -require('nvim_comment').setup({ - line_mapping = "<leader>cl", - operator_mapping = "<leader>c", - comment_empty = false -}) diff --git a/.config/nvim/lua/justsaumit/nvim-tree-config.lua b/.config/nvim/lua/justsaumit/nvim-tree-config.lua deleted file mode 100644 index b499f91..0000000 --- a/.config/nvim/lua/justsaumit/nvim-tree-config.lua +++ /dev/null @@ -1,75 +0,0 @@ --- 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/.config/nvim/lua/justsaumit/options.lua b/.config/nvim/lua/justsaumit/options.lua deleted file mode 100644 index 4eae867..0000000 --- a/.config/nvim/lua/justsaumit/options.lua +++ /dev/null @@ -1,46 +0,0 @@ -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/.config/nvim/lua/justsaumit/plugins.lua b/.config/nvim/lua/justsaumit/plugins.lua deleted file mode 100644 index 460d6f3..0000000 --- a/.config/nvim/lua/justsaumit/plugins.lua +++ /dev/null @@ -1,113 +0,0 @@ -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/.config/nvim/lua/justsaumit/telescope-config.lua b/.config/nvim/lua/justsaumit/telescope-config.lua deleted file mode 100644 index 534e663..0000000 --- a/.config/nvim/lua/justsaumit/telescope-config.lua +++ /dev/null @@ -1,52 +0,0 @@ -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/.config/nvim/lua/justsaumit/toggleterm-config.lua b/.config/nvim/lua/justsaumit/toggleterm-config.lua deleted file mode 100644 index b1579cd..0000000 --- a/.config/nvim/lua/justsaumit/toggleterm-config.lua +++ /dev/null @@ -1,16 +0,0 @@ -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/.config/nvim/lua/justsaumit/treesitter-config.lua b/.config/nvim/lua/justsaumit/treesitter-config.lua deleted file mode 100644 index c64e659..0000000 --- a/.config/nvim/lua/justsaumit/treesitter-config.lua +++ /dev/null @@ -1,26 +0,0 @@ -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/.config/nvim/lua/justsaumit/which-key-config.lua b/.config/nvim/lua/justsaumit/which-key-config.lua deleted file mode 100644 index 93a42fa..0000000 --- a/.config/nvim/lua/justsaumit/which-key-config.lua +++ /dev/null @@ -1,69 +0,0 @@ -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) |
