Merged updated kickstart.nvim
This commit is contained in:
parent
fab09e4dc4
commit
fdb565ce87
|
@ -1,6 +1,6 @@
|
|||
column_width = 160
|
||||
column_width = 120
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
quote_style = "AutoPreferDouble"
|
||||
call_parentheses = "None"
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
```
|
||||
-- Old stuff removed from config, but saving in case it should be added back.
|
||||
return { -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
"lewis6991/gitsigns.nvim",
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "+" },
|
||||
change = { text = "~" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
},
|
||||
},
|
||||
-- Keybinds below have been removed in main init.lua
|
||||
on_attach = function(bufnr)
|
||||
vim.keymap.set("n", "<leader>hp", require("gitsigns").preview_hunk, { buffer = bufnr, desc = "Preview git hunk" })
|
||||
|
||||
-- don't override the built-in and fugitive keymaps
|
||||
local gs = package.loaded.gitsigns
|
||||
vim.keymap.set({ "n", "v" }, "]c", function()
|
||||
if vim.wo.diff then
|
||||
return "]c"
|
||||
end
|
||||
vim.schedule(function()
|
||||
gs.next_hunk()
|
||||
end)
|
||||
return "<Ignore>"
|
||||
end, { expr = true, buffer = bufnr, desc = "Jump to next hunk" })
|
||||
vim.keymap.set({ "n", "v" }, "[c", function()
|
||||
if vim.wo.diff then
|
||||
return "[c"
|
||||
end
|
||||
vim.schedule(function()
|
||||
gs.prev_hunk()
|
||||
end)
|
||||
return "<Ignore>"
|
||||
end, { expr = true, buffer = bufnr, desc = "Jump to previous hunk" })
|
||||
end,
|
||||
|
||||
config = function()
|
||||
local cmp = require "cmp"
|
||||
cmp.setup {
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}
|
||||
-- cmp.select_next_item()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
-- if cmp.visible() then
|
||||
-- cmp.select_prev_item()
|
||||
if luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
```
|
|
@ -6,6 +6,7 @@ snippet $$ "$Math$"
|
|||
|
||||
snippet em "\emph{...}"
|
||||
\emph{${1:VISUAL}}
|
||||
|
||||
snippet \ "\[ ... \]"
|
||||
\[
|
||||
${1}
|
||||
|
|
Loading…
Reference in New Issue