Add vscode fixes and general improvements

This commit is contained in:
Ryan 2023-10-13 20:04:56 +08:00
parent 8c02d4ea84
commit 573ea78839
Signed by: juan
GPG Key ID: 807ECD28A698D245
3 changed files with 31 additions and 24 deletions

View File

@ -1,5 +1,12 @@
local map = vim.api.nvim_set_keymap
-- vscode
if vim.g.vscode then
-- undo/REDO via vscode
map("n","u","<Cmd>call VSCodeNotify('undo')<CR>")
map("n","<C-r>","<Cmd>call VSCodeNotify('redo')<CR>")
end
-- generic mappings
map('v', '<', '<gv', { noremap = true })
map('v', '>', '>gv', { noremap = true })

View File

@ -68,7 +68,7 @@ return require("packer").startup(function(use)
-- local
{ "hrsh7th/cmp-cmdline", after = "nvim-cmp" },
{ "hrsh7th/cmp-buffer", after = "nvim-cmp" },
{ "hrsh7th/cmp-path", after = "nvim-cmp" },
{ "FelipeLema/cmp-async-path", after = "nvim-cmp" },
{
"petertriho/cmp-git",
after = "nvim-cmp",
@ -148,18 +148,18 @@ return require("packer").startup(function(use)
require("hop").setup({ keys = "etovxqpdygfblzhckisuran" })
end,
})
use({
"c0r73x/neotags.lua",
event = "BufEnter",
config = function()
require("neotags").setup({
ctags = {
directory = vim.env.HOME .. '/.cache/nvim/neotags/' -- default directory where to store tags
}
})
end
})
-- use({
-- "c0r73x/neotags.lua",
-- event = "BufEnter",
-- config = function()
-- require("neotags").setup({
-- enable = string.find(vim.fn.getcwd(), "/home/"),
-- ctags = {
-- directory = vim.env.HOME .. '/.cache/nvim/neotags' -- default directory where to store tags
-- },
-- })
-- end
-- })
-- eye-candy
use({

View File

@ -51,13 +51,13 @@ cmp.setup({
-- ... Your other mappings ...
},
sources = cmp.config.sources({
{ name = "luasnip" }, -- For luasnip users.
{ name = "ctags" },
{ name = "nvim_lsp" },
{ name = "treesitter" },
{ name = "buffer" },
{ name = "luasnip" }, -- For luasnip users.
{ name = "path" },
{ name = "async_path" },
{ name = "git" },
{ name = "ctags" },
{ name = "buffer" },
})
-- ... Your other configuration ...
})