delete old stuff
This commit is contained in:
		@@ -1,13 +0,0 @@
 | 
			
		||||
-- Autocmds are automatically loaded on the VeryLazy event
 | 
			
		||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
 | 
			
		||||
-- Add any additional autocmds here
 | 
			
		||||
local function open_nvim_tree(data)
 | 
			
		||||
  local directory = vim.fn.isdirectory(data.file) == 1
 | 
			
		||||
  if not directory then
 | 
			
		||||
    return
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  vim.cmd.cd(data.file)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
 | 
			
		||||
@@ -1,22 +0,0 @@
 | 
			
		||||
-- Keymaps are automatically loaded on the VeryLazy event
 | 
			
		||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
 | 
			
		||||
-- Add any additional keymaps here
 | 
			
		||||
 | 
			
		||||
local function map(mode, lhs, rhs, opts)
 | 
			
		||||
  local keys = require("lazy.core.handler").handlers.keys
 | 
			
		||||
  ---@cast keys LazyKeysHandler
 | 
			
		||||
  -- do not create the keymap if a lazy keys handler exists
 | 
			
		||||
  if not keys.active[keys.parse({ lhs, mode = mode }).id] then
 | 
			
		||||
    opts = opts or {}
 | 
			
		||||
    opts.silent = opts.silent ~= false
 | 
			
		||||
    if opts.remap and not vim.g.vscode then
 | 
			
		||||
      opts.remap = nil
 | 
			
		||||
    end
 | 
			
		||||
    vim.keymap.set(mode, lhs, rhs, opts)
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
map("t", "<Esc><Esc>", [[<C-\><C-n>]], {})
 | 
			
		||||
-- map("", "tl", require("lsp_lines").toggle, { desc = "Toggle lsp_lines" })
 | 
			
		||||
map("n", "mgg", ":diffget //2<CR>", {})
 | 
			
		||||
map("n", "mgh", ":diffget //3<CR>", {})
 | 
			
		||||
@@ -1,12 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
  {
 | 
			
		||||
    "catppuccin/nvim",
 | 
			
		||||
    name = "catppuccin",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "LazyVim/LazyVim",
 | 
			
		||||
    opts = {
 | 
			
		||||
      colorscheme = "catppuccin-latte",
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
  "nvim-lspconfig",
 | 
			
		||||
  opts = {
 | 
			
		||||
    inlay_hints = { enabled = false },
 | 
			
		||||
    diagnostics = {
 | 
			
		||||
      virtual_text = true,
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
@@ -1,266 +0,0 @@
 | 
			
		||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
 | 
			
		||||
-- stylua: ignore
 | 
			
		||||
if true then return {} end
 | 
			
		||||
 | 
			
		||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
 | 
			
		||||
--
 | 
			
		||||
-- In your plugin files, you can:
 | 
			
		||||
-- * add extra plugins
 | 
			
		||||
-- * disable/enabled LazyVim plugins
 | 
			
		||||
-- * override the configuration of LazyVim plugins
 | 
			
		||||
return {
 | 
			
		||||
  -- add gruvbox
 | 
			
		||||
  { "ellisonleao/gruvbox.nvim" },
 | 
			
		||||
 | 
			
		||||
  -- Configure LazyVim to load gruvbox
 | 
			
		||||
  {
 | 
			
		||||
    "LazyVim/LazyVim",
 | 
			
		||||
    opts = {
 | 
			
		||||
      colorscheme = "gruvbox",
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- change trouble config
 | 
			
		||||
  {
 | 
			
		||||
    "folke/trouble.nvim",
 | 
			
		||||
    -- opts will be merged with the parent spec
 | 
			
		||||
    opts = { use_diagnostic_signs = true },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- disable trouble
 | 
			
		||||
  { "folke/trouble.nvim", enabled = false },
 | 
			
		||||
 | 
			
		||||
  -- add symbols-outline
 | 
			
		||||
  {
 | 
			
		||||
    "simrat39/symbols-outline.nvim",
 | 
			
		||||
    cmd = "SymbolsOutline",
 | 
			
		||||
    keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
 | 
			
		||||
    config = true,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- override nvim-cmp and add cmp-emoji
 | 
			
		||||
  {
 | 
			
		||||
    "hrsh7th/nvim-cmp",
 | 
			
		||||
    dependencies = { "hrsh7th/cmp-emoji" },
 | 
			
		||||
    ---@param opts cmp.ConfigSchema
 | 
			
		||||
    opts = function(_, opts)
 | 
			
		||||
      local cmp = require("cmp")
 | 
			
		||||
      opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- change some telescope options and a keymap to browse plugin files
 | 
			
		||||
  {
 | 
			
		||||
    "nvim-telescope/telescope.nvim",
 | 
			
		||||
    keys = {
 | 
			
		||||
      -- add a keymap to browse plugin files
 | 
			
		||||
      -- stylua: ignore
 | 
			
		||||
      {
 | 
			
		||||
        "<leader>fp",
 | 
			
		||||
        function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
 | 
			
		||||
        desc = "Find Plugin File",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
    -- change some options
 | 
			
		||||
    opts = {
 | 
			
		||||
      defaults = {
 | 
			
		||||
        layout_strategy = "horizontal",
 | 
			
		||||
        layout_config = { prompt_position = "top" },
 | 
			
		||||
        sorting_strategy = "ascending",
 | 
			
		||||
        winblend = 0,
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- add telescope-fzf-native
 | 
			
		||||
  {
 | 
			
		||||
    "telescope.nvim",
 | 
			
		||||
    dependencies = {
 | 
			
		||||
      "nvim-telescope/telescope-fzf-native.nvim",
 | 
			
		||||
      build = "make",
 | 
			
		||||
      config = function()
 | 
			
		||||
        require("telescope").load_extension("fzf")
 | 
			
		||||
      end,
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- add pyright to lspconfig
 | 
			
		||||
  {
 | 
			
		||||
    "neovim/nvim-lspconfig",
 | 
			
		||||
    ---@class PluginLspOpts
 | 
			
		||||
    opts = {
 | 
			
		||||
      ---@type lspconfig.options
 | 
			
		||||
      servers = {
 | 
			
		||||
        -- pyright will be automatically installed with mason and loaded with lspconfig
 | 
			
		||||
        pyright = {},
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- add tsserver and setup with typescript.nvim instead of lspconfig
 | 
			
		||||
  {
 | 
			
		||||
    "neovim/nvim-lspconfig",
 | 
			
		||||
    dependencies = {
 | 
			
		||||
      "jose-elias-alvarez/typescript.nvim",
 | 
			
		||||
      init = function()
 | 
			
		||||
        require("lazyvim.util").on_attach(function(_, buffer)
 | 
			
		||||
          -- stylua: ignore
 | 
			
		||||
          vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
 | 
			
		||||
          vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
 | 
			
		||||
        end)
 | 
			
		||||
      end,
 | 
			
		||||
    },
 | 
			
		||||
    ---@class PluginLspOpts
 | 
			
		||||
    opts = {
 | 
			
		||||
      ---@type lspconfig.options
 | 
			
		||||
      servers = {
 | 
			
		||||
        -- tsserver will be automatically installed with mason and loaded with lspconfig
 | 
			
		||||
        tsserver = {},
 | 
			
		||||
      },
 | 
			
		||||
      -- you can do any additional lsp server setup here
 | 
			
		||||
      -- return true if you don't want this server to be setup with lspconfig
 | 
			
		||||
      ---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
 | 
			
		||||
      setup = {
 | 
			
		||||
        -- example to setup with typescript.nvim
 | 
			
		||||
        tsserver = function(_, opts)
 | 
			
		||||
          require("typescript").setup({ server = opts })
 | 
			
		||||
          return true
 | 
			
		||||
        end,
 | 
			
		||||
        -- Specify * to use this function as a fallback for any server
 | 
			
		||||
        -- ["*"] = function(server, opts) end,
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
 | 
			
		||||
  -- treesitter, mason and typescript.nvim. So instead of the above, you can use:
 | 
			
		||||
  { import = "lazyvim.plugins.extras.lang.typescript" },
 | 
			
		||||
 | 
			
		||||
  -- add more treesitter parsers
 | 
			
		||||
  {
 | 
			
		||||
    "nvim-treesitter/nvim-treesitter",
 | 
			
		||||
    opts = {
 | 
			
		||||
      ensure_installed = {
 | 
			
		||||
        "bash",
 | 
			
		||||
        "html",
 | 
			
		||||
        "javascript",
 | 
			
		||||
        "json",
 | 
			
		||||
        "lua",
 | 
			
		||||
        "markdown",
 | 
			
		||||
        "markdown_inline",
 | 
			
		||||
        "python",
 | 
			
		||||
        "query",
 | 
			
		||||
        "regex",
 | 
			
		||||
        "tsx",
 | 
			
		||||
        "typescript",
 | 
			
		||||
        "vim",
 | 
			
		||||
        "yaml",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
 | 
			
		||||
  -- would overwrite `ensure_installed` with the new value.
 | 
			
		||||
  -- If you'd rather extend the default config, use the code below instead:
 | 
			
		||||
  {
 | 
			
		||||
    "nvim-treesitter/nvim-treesitter",
 | 
			
		||||
    opts = function(_, opts)
 | 
			
		||||
      -- add tsx and treesitter
 | 
			
		||||
      vim.list_extend(opts.ensure_installed, {
 | 
			
		||||
        "tsx",
 | 
			
		||||
        "typescript",
 | 
			
		||||
      })
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- the opts function can also be used to change the default opts:
 | 
			
		||||
  {
 | 
			
		||||
    "nvim-lualine/lualine.nvim",
 | 
			
		||||
    event = "VeryLazy",
 | 
			
		||||
    opts = function(_, opts)
 | 
			
		||||
      table.insert(opts.sections.lualine_x, "😄")
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- or you can return new options to override all the defaults
 | 
			
		||||
  {
 | 
			
		||||
    "nvim-lualine/lualine.nvim",
 | 
			
		||||
    event = "VeryLazy",
 | 
			
		||||
    opts = function()
 | 
			
		||||
      return {
 | 
			
		||||
        --[[add your custom lualine config here]]
 | 
			
		||||
      }
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- use mini.starter instead of alpha
 | 
			
		||||
  { import = "lazyvim.plugins.extras.ui.mini-starter" },
 | 
			
		||||
 | 
			
		||||
  -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
 | 
			
		||||
  { import = "lazyvim.plugins.extras.lang.json" },
 | 
			
		||||
 | 
			
		||||
  -- add any tools you want to have installed below
 | 
			
		||||
  {
 | 
			
		||||
    "williamboman/mason.nvim",
 | 
			
		||||
    opts = {
 | 
			
		||||
      ensure_installed = {
 | 
			
		||||
        "stylua",
 | 
			
		||||
        "shellcheck",
 | 
			
		||||
        "shfmt",
 | 
			
		||||
        "flake8",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- Use <tab> for completion and snippets (supertab)
 | 
			
		||||
  -- first: disable default <tab> and <s-tab> behavior in LuaSnip
 | 
			
		||||
  {
 | 
			
		||||
    "L3MON4D3/LuaSnip",
 | 
			
		||||
    keys = function()
 | 
			
		||||
      return {}
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
  -- then: setup supertab in cmp
 | 
			
		||||
  {
 | 
			
		||||
    "hrsh7th/nvim-cmp",
 | 
			
		||||
    dependencies = {
 | 
			
		||||
      "hrsh7th/cmp-emoji",
 | 
			
		||||
    },
 | 
			
		||||
    ---@param opts cmp.ConfigSchema
 | 
			
		||||
    opts = function(_, opts)
 | 
			
		||||
      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")
 | 
			
		||||
 | 
			
		||||
      opts.mapping = vim.tbl_extend("force", opts.mapping, {
 | 
			
		||||
        ["<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()
 | 
			
		||||
            -- this 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" }),
 | 
			
		||||
      })
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
  "tpope/vim-fugitive",
 | 
			
		||||
}
 | 
			
		||||
@@ -1,26 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
  { "nvim-neotest/neotest-jest" },
 | 
			
		||||
  {
 | 
			
		||||
    "nvim-neotest/neotest",
 | 
			
		||||
    opts = function(_, opts)
 | 
			
		||||
      table.insert(
 | 
			
		||||
        opts.adapters,
 | 
			
		||||
        require("neotest-jest")({
 | 
			
		||||
          jestCommand = "npm test --",
 | 
			
		||||
          jestConfig = "jest.config.js",
 | 
			
		||||
          env = { CI = true },
 | 
			
		||||
          cwd = function()
 | 
			
		||||
            return vim.fn.getcwd()
 | 
			
		||||
          end,
 | 
			
		||||
        })
 | 
			
		||||
      )
 | 
			
		||||
    end,
 | 
			
		||||
    keys = {
 | 
			
		||||
      {
 | 
			
		||||
        "<leader>tw",
 | 
			
		||||
        "<cmd>lua require('neotest').run.run({ jestCommand = 'jest --watch ' })<cr>",
 | 
			
		||||
        desc = "Jest Watch",
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
@@ -1,14 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
  { "rouge8/neotest-rust" },
 | 
			
		||||
  {
 | 
			
		||||
    "nvim-neotest/neotest",
 | 
			
		||||
    opts = function(_, opts)
 | 
			
		||||
      table.insert(
 | 
			
		||||
        opts.adapters,
 | 
			
		||||
        require("neotest-rust")({
 | 
			
		||||
          args = { "--no-capture" },
 | 
			
		||||
        })
 | 
			
		||||
      )
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
@@ -1,15 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
  "nvim-neo-tree/neo-tree.nvim",
 | 
			
		||||
  opts = {
 | 
			
		||||
    require("neo-tree").setup({
 | 
			
		||||
      window = {
 | 
			
		||||
        mappings = {
 | 
			
		||||
          ["P"] = function(state)
 | 
			
		||||
            local node = state.tree:get_node()
 | 
			
		||||
            require("neo-tree.ui.renderer").focus_node(state, node:get_parent_id())
 | 
			
		||||
          end,
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    }),
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
  "mxsdev/nvim-dap-vscode-js",
 | 
			
		||||
  opts = function()
 | 
			
		||||
    adapters = { "pwa-node", "pwa-chrome", "pwa-msedge", "node-terminal", "pwa-extensionHost" }
 | 
			
		||||
  end,
 | 
			
		||||
}
 | 
			
		||||
@@ -1,14 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
  "echasnovski/mini.surround",
 | 
			
		||||
  opts = {
 | 
			
		||||
    mappings = {
 | 
			
		||||
      add = "gsa", -- Add surrounding in Normal and Visual modes
 | 
			
		||||
      delete = "gsd", -- Delete surrounding
 | 
			
		||||
      find = "gsf", -- Find surrounding (to the right)
 | 
			
		||||
      find_left = "gsF", -- Find surrounding (to the left)
 | 
			
		||||
      highlight = "gsh", -- Highlight surrounding
 | 
			
		||||
      replace = "gsr", -- Replace surrounding
 | 
			
		||||
      update_n_lines = "gsn", -- Update `n_lines`
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
@@ -1,17 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
  {
 | 
			
		||||
    "akinsho/toggleterm.nvim",
 | 
			
		||||
    version = "*",
 | 
			
		||||
    opts = {
 | 
			
		||||
      open_mapping = [[<c-y>]],
 | 
			
		||||
      hide_numbers = true,
 | 
			
		||||
      direction = "float",
 | 
			
		||||
      float_opts = {
 | 
			
		||||
        border = "curved",
 | 
			
		||||
      },
 | 
			
		||||
      winbar = {
 | 
			
		||||
        enabled = false,
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user