Browse Source

jump to definition

imac
Juni Kim 2 years ago
parent
commit
a97858496f
  1. 8
      after/plugin/lsp.lua
  2. 2
      lua/junikim/remap.lua

8
after/plugin/lsp.lua

@ -42,10 +42,10 @@ lsp.configure("efm", {
filetypes = { "sh", "bash", "zsh" } filetypes = { "sh", "bash", "zsh" }
}) })
--lsp.on_attach(function(client, bufnr)
-- local opts = { buffer = bufnr, remap = false }
-- vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
--end)
lsp.on_attach(function(client, bufnr)
local opts = { buffer = bufnr, remap = false }
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
end)
lsp.setup() lsp.setup()

2
lua/junikim/remap.lua

@ -31,6 +31,8 @@ vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
vim.keymap.set("n", "<leader>Y", [["+Y]]) vim.keymap.set("n", "<leader>Y", [["+Y]])
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true }) vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
vim.keymap.set("n", "<leader>X", "<cmd>!chmod -x %<CR>", { silent = true }) vim.keymap.set("n", "<leader>X", "<cmd>!chmod -x %<CR>", { silent = true })
-- execute file
vim.keymap.set("n", "<leader>e", "<cmd>!%:p<CR>", { silent = true })
vim.keymap.set("n", "<leader>vc", "<cmd>e ~/.config/nvim<CR>"); vim.keymap.set("n", "<leader>vc", "<cmd>e ~/.config/nvim<CR>");
vim.keymap.set("n", "<leader>vz", "<cmd>e ~/.zshrc<CR>"); vim.keymap.set("n", "<leader>vz", "<cmd>e ~/.zshrc<CR>");

Loading…
Cancel
Save