updates to integrate with code better
This commit is contained in:
parent
a637f87be0
commit
136d75b543
@ -1,2 +1,13 @@
|
|||||||
|
if not vim.g.vscode then
|
||||||
require("lazyvim") -- my config based on folkes LazyVim starter
|
require("lazyvim") -- my config based on folkes LazyVim starter
|
||||||
-- require("chris") -- my config based on Christian Chiarullis work
|
-- require("chris") -- my config based on Christian Chiarullis work
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
|
-- Add some vscode specific keymaps
|
||||||
|
vim.keymap.set("n", "<leader><space>", "<cmd>Find<cr>")
|
||||||
|
vim.keymap.set("n", "<leader>/", [[<cmd>call VSCodeNotify('workbench.action.findInFiles')<cr>]])
|
||||||
|
vim.keymap.set("n", "<leader>ss", [[<cmd>call VSCodeNotify('workbench.action.gotoSymbol')<cr>]])
|
||||||
|
|||||||
@ -20,24 +20,10 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
|||||||
|
|
||||||
require("lazyvim.config").setup()
|
require("lazyvim.config").setup()
|
||||||
|
|
||||||
if not vim.g.vscode then
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = "lazyvim.plugins",
|
spec = "lazyvim.plugins",
|
||||||
defaults = { lazy = true, version = false },
|
defaults = { lazy = true, version = false },
|
||||||
checker = { enabled = true },
|
checker = { enabled = true },
|
||||||
})
|
})
|
||||||
end
|
|
||||||
|
|
||||||
-- This might not be best, but it allows for easy resetting
|
require("lazyvim.utils").setColorscheme()
|
||||||
ColorMe = function()
|
|
||||||
local colorscheme = "gruvbox-material"
|
|
||||||
|
|
||||||
local okay, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
|
|
||||||
|
|
||||||
if not okay then
|
|
||||||
vim.notify("Colorscheme " .. colorscheme .. " not found!")
|
|
||||||
vim.cmd("colorsheme habamax")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
ColorMe()
|
|
||||||
|
|||||||
@ -8,6 +8,22 @@ return {
|
|||||||
"hrsh7th/cmp-emoji",
|
"hrsh7th/cmp-emoji",
|
||||||
"hrsh7th/cmp-buffer",
|
"hrsh7th/cmp-buffer",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
dependencies = "copilot.lua",
|
||||||
|
opts = {},
|
||||||
|
config = function(_, opts)
|
||||||
|
local copilot_cmp = require("copilot_cmp")
|
||||||
|
copilot_cmp.setup(opts)
|
||||||
|
-- attach cmp source whenever copilot attaches
|
||||||
|
-- fixes lazy-loading issues with the copilot cmp source
|
||||||
|
require("lazyvim.utils").on_attach(function(client)
|
||||||
|
if client.name == "copilot" then
|
||||||
|
copilot_cmp._on_insert_enter({})
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
@ -35,6 +51,7 @@ return {
|
|||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
{ name = "emoji" },
|
{ name = "emoji" },
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
|
{ name = "copilot" },
|
||||||
}),
|
}),
|
||||||
formatting = {
|
formatting = {
|
||||||
format = function(_, item)
|
format = function(_, item)
|
||||||
@ -53,4 +70,20 @@ return {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"zbirenbaum/copilot-cmp",
|
||||||
|
dependencies = "copilot.lua",
|
||||||
|
opts = {},
|
||||||
|
config = function(_, opts)
|
||||||
|
local copilot_cmp = require("copilot_cmp")
|
||||||
|
copilot_cmp.setup(opts)
|
||||||
|
-- attach cmp source whenever copilot attaches
|
||||||
|
-- fixes lazy-loading issues with the copilot cmp source
|
||||||
|
require("lazyvim.utils").on_attach(function(client)
|
||||||
|
if client.name == "copilot" then
|
||||||
|
copilot_cmp._on_insert_enter({})
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,11 +70,15 @@ return {
|
|||||||
t = { name = "+todo" },
|
t = { name = "+todo" },
|
||||||
N = { name = "+noice" },
|
N = { name = "+noice" },
|
||||||
|
|
||||||
e = { "<cmd>NvimTreeToggle<cr>", "Explorer" },
|
|
||||||
Z = { "<cmd>ZenMode<cr>", "Zen" },
|
Z = { "<cmd>ZenMode<cr>", "Zen" },
|
||||||
u = { "<cmd>UndotreeToggle<cr>", "Undo Tree" },
|
u = { "<cmd>UndotreeToggle<cr>", "Undo Tree" },
|
||||||
["'"] = { "<cmd>close<CR>", "Close split" },
|
["'"] = { "<cmd>close<CR>", "Close split" },
|
||||||
|
|
||||||
|
c = {
|
||||||
|
name = "+copilot",
|
||||||
|
c = { "<cmd>Copilot<cr>", "Start Copilot" },
|
||||||
|
},
|
||||||
|
|
||||||
n = {
|
n = {
|
||||||
name = "+neorg",
|
name = "+neorg",
|
||||||
n = { "<cmd>Neorg<cr>", "Open Neorg" },
|
n = { "<cmd>Neorg<cr>", "Open Neorg" },
|
||||||
@ -106,8 +110,8 @@ return {
|
|||||||
q = { "<cmd>copen<cr>", "Open Quickfix List" },
|
q = { "<cmd>copen<cr>", "Open Quickfix List" },
|
||||||
},
|
},
|
||||||
|
|
||||||
c = {
|
C = {
|
||||||
name = "Compiler",
|
name = "+compiler",
|
||||||
c = { "<cmd>w! | !compiler %<cr>", "Compile File" },
|
c = { "<cmd>w! | !compiler %<cr>", "Compile File" },
|
||||||
b = { "<cmd>w! | !pandoc % -t beamer -o presentation.pdf<cr>", "Beamer Presentation" },
|
b = { "<cmd>w! | !pandoc % -t beamer -o presentation.pdf<cr>", "Beamer Presentation" },
|
||||||
p = { "<cmd>!opout %<cr><cr>", "Preview Document" },
|
p = { "<cmd>!opout %<cr><cr>", "Preview Document" },
|
||||||
|
|||||||
@ -129,4 +129,16 @@ function M.telescope(builtin, opts)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- This might not be best, but it allows for easy resetting
|
||||||
|
function M.setColorscheme(scheme)
|
||||||
|
local colorscheme = scheme or "gruvbox-material"
|
||||||
|
|
||||||
|
local okay, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
|
||||||
|
|
||||||
|
if not okay then
|
||||||
|
vim.notify("Colorscheme " .. colorscheme .. " not found!")
|
||||||
|
vim.cmd("colorsheme habamax")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user