added changes for work

This commit is contained in:
Michael Christopher Malach 2025-04-28 10:07:02 -07:00
parent d350db2449
commit 5627b65878
1 changed files with 878 additions and 858 deletions

138
init.lua
View File

@ -1,3 +1,8 @@
if vim.g.vscode then
-- VSCode Neovim-specific config
else
-- Full Neovim (GUI or terminal) config
--[[ --[[
===================================================================== =====================================================================
@ -91,18 +96,19 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed and selected in the terminal -- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false vim.g.have_nerd_font = true
-- [[ Setting options ]] -- [[ Setting options ]]
-- See `:help vim.opt` -- See `:help vim.opt`
-- NOTE: You can change these options as you wish! -- NOTE: You can change these options as you wish!
-- For more options, you can see `:help option-list` -- For more options, you can see `:help option-list`
local leet_arg = 'leetcode.nvim'
-- Make line numbers default -- Make line numbers default
vim.opt.number = true vim.opt.number = true
-- You can also add relative line numbers, to help with jumping. -- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it! -- Experiment for yourself to see if you like it!
-- vim.opt.relativenumber = true vim.opt.relativenumber = true
-- Enable mouse mode, can be useful for resizing splits for example! -- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = 'a' vim.opt.mouse = 'a'
@ -275,7 +281,19 @@ require('lazy').setup({
}, },
}, },
}, },
{
'glacambre/firenvim',
cond = function()
return not vim.g.vscode
end, -- Only load when not loaded through vscode},
build = ':call firenvim#install(0)',
},
{
'sbdchd/neoformat',
cond = function()
return not vim.g.vscode
end, -- Only load when not loaded through vscode},
},
-- NOTE: Plugins can also be configured to run Lua code when they are loaded. -- NOTE: Plugins can also be configured to run Lua code when they are loaded.
-- --
-- This is often very useful to both group configuration, as well as handle -- This is often very useful to both group configuration, as well as handle
@ -350,74 +368,59 @@ require('lazy').setup({
-- --
-- Use the `dependencies` key to specify the dependencies of a particular plugin -- Use the `dependencies` key to specify the dependencies of a particular plugin
{ -- Fuzzy Finder (files, lsp, etc) {
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
event = 'VimEnter', event = 'VimEnter',
cond = function()
return not vim.g.vscode
end,
dependencies = { dependencies = {
'nvim-lua/plenary.nvim', 'nvim-lua/plenary.nvim',
{ -- If encountering errors, see telescope-fzf-native README for installation instructions {
'nvim-telescope/telescope-fzf-native.nvim', 'nvim-telescope/telescope-fzf-native.nvim',
-- `build` is used to run some command when the plugin is installed/updated.
-- This is only run then, not every time Neovim starts up.
build = 'make', build = 'make',
-- `cond` is a condition used to determine whether this plugin should be
-- installed and loaded.
cond = function() cond = function()
return vim.fn.executable 'make' == 1 return vim.fn.executable 'make' == 1
end, end,
}, },
{ 'nvim-telescope/telescope-ui-select.nvim' }, { 'nvim-telescope/telescope-ui-select.nvim' },
{
-- Useful for getting pretty icons, but requires a Nerd Font. 'nvim-tree/nvim-web-devicons',
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, enabled = vim.g.have_nerd_font,
},
{
'kawre/leetcode.nvim',
cond = function()
return not vim.g.vscode
end,
lazy = leet_arg ~= vim.fn.argv(0, -1),
opts = { arg = leet_arg },
},
}, },
config = function() config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that if vim.g.vscode then
-- it can fuzzy find! It's more than just a "file finder", it can search return
-- many different aspects of Neovim, your workspace, LSP, and more! end
--
-- The easiest way to use Telescope, is to start by doing something like:
-- :Telescope help_tags
--
-- After running this command, a window will open up and you're able to
-- type in the prompt window. You'll see a list of `help_tags` options and
-- a corresponding preview of the help.
--
-- Two important keymaps to use while in Telescope are:
-- - Insert mode: <c-/>
-- - Normal mode: ?
--
-- This opens a window that shows you all of the keymaps for the current
-- Telescope picker. This is really useful to discover what Telescope can
-- do as well as how to actually do it!
-- [[ Configure Telescope ]] local ok, telescope = pcall(require, 'telescope')
-- See `:help telescope` and `:help telescope.setup()` if not ok then
require('telescope').setup { return
-- You can put your default mappings / updates / etc. in here end
-- All the info you're looking for is in `:help telescope.setup()`
-- telescope.setup {
-- defaults = {
-- mappings = {
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
-- },
-- },
-- pickers = {}
extensions = { extensions = {
['ui-select'] = { ['ui-select'] = require('telescope.themes').get_dropdown(),
require('telescope.themes').get_dropdown(),
},
}, },
} }
-- Enable Telescope extensions if they are installed pcall(telescope.load_extension, 'fzf')
pcall(require('telescope').load_extension, 'fzf') pcall(telescope.load_extension, 'ui-select')
pcall(require('telescope').load_extension, 'ui-select')
local ok_builtin, builtin = pcall(require, 'telescope.builtin')
if not ok_builtin then
return
end
-- See `:help telescope.builtin`
local builtin = require 'telescope.builtin'
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' }) vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
@ -467,9 +470,21 @@ require('lazy').setup({
}, },
}, },
}, },
{
'github/copilot.vim',
cond = function()
return not vim.g.vscode
end,
enabled = true,
cmd = 'Copilot',
event = 'InsertEnter',
},
{ {
-- Main LSP Configuration -- Main LSP Configuration
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
cond = function()
return not vim.g.vscode
end,
dependencies = { dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim -- Automatically install LSPs and related tools to stdpath for Neovim
-- Mason must be loaded before its dependents so we need to set it up here. -- Mason must be loaded before its dependents so we need to set it up here.
@ -673,7 +688,7 @@ require('lazy').setup({
-- https://github.com/pmizio/typescript-tools.nvim -- https://github.com/pmizio/typescript-tools.nvim
-- --
-- But for many setups, the LSP (`ts_ls`) will work just fine -- But for many setups, the LSP (`ts_ls`) will work just fine
-- ts_ls = {}, ts_ls = {},
-- --
lua_ls = { lua_ls = {
@ -764,7 +779,7 @@ require('lazy').setup({
-- python = { "isort", "black" }, -- python = { "isort", "black" },
-- --
-- You can use 'stop_after_first' to run the first available formatter from the list -- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true }, javascript = { 'prettierd', 'prettier', stop_after_first = true },
}, },
}, },
}, },
@ -802,6 +817,10 @@ require('lazy').setup({
}, },
'folke/lazydev.nvim', 'folke/lazydev.nvim',
}, },
{
'sphamba/smear-cursor.nvim',
opts = {},
},
--- @module 'blink.cmp' --- @module 'blink.cmp'
--- @type blink.cmp.Config --- @type blink.cmp.Config
opts = { opts = {
@ -966,11 +985,11 @@ require('lazy').setup({
-- Uncomment any of the lines below to enable them (you will need to restart nvim). -- Uncomment any of the lines below to enable them (you will need to restart nvim).
-- --
-- require 'kickstart.plugins.debug', -- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line', require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint', require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs', require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree', require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config. -- This is the easiest way to modularize your config.
@ -1006,3 +1025,4 @@ require('lazy').setup({
-- The line beneath this is called `modeline`. See `:help modeline` -- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et
end