From a153490f39e3b9ea0cde4aeeddfdb83b6e59150d Mon Sep 17 00:00:00 2001 From: Gilad Sher <39515060+giladsher@users.noreply.github.com> Date: Sat, 7 Sep 2024 10:06:51 -0400 Subject: [PATCH] update to my config --- init.lua | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 13c8143d..8f83c292 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- 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 ]] -- See `:help vim.opt` @@ -237,6 +237,11 @@ require('lazy').setup({ -- -- Use `opts = {}` to force a plugin to be loaded. -- + -- This is equivalent to: + -- require('Comment').setup({}) + + -- "gc" to comment visual regions/lines + { 'numToStr/Comment.nvim', opts = {} }, -- Here is a more advanced example where we pass configuration -- options to `gitsigns.nvim`. This is equivalent to the following Lua: @@ -543,6 +548,10 @@ require('lazy').setup({ -- or a suggestion from your LSP for this to activate. map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' }) + -- Opens a popup that displays documentation about the word under your cursor + -- See `:help K` for why this keymap + map('K', vim.lsp.buf.hover, 'Hover Documentation') + -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') @@ -728,12 +737,12 @@ require('lazy').setup({ -- `friendly-snippets` contains a variety of premade snippets. -- See the README about individual language/framework/plugin snippets: -- https://github.com/rafamadriz/friendly-snippets - -- { - -- 'rafamadriz/friendly-snippets', - -- config = function() - -- require('luasnip.loaders.from_vscode').lazy_load() - -- end, - -- }, + { + 'rafamadriz/friendly-snippets', + config = function() + require('luasnip.loaders.from_vscode').lazy_load() + end, + }, }, }, 'saadparwaiz1/cmp_luasnip',