small comment updates

This commit is contained in:
Ward Truyen
2025-06-02 15:05:56 +02:00
parent bf6e8e038b
commit 1aa0e3034d
3 changed files with 17 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
--$ autocomplete for C++ Rust and Lua
--$ autocomplete for C++, Rust, Lua, etc
--$ URL: https://github.com/hrsh7th/nvim-cmp
--$ help: nvim-cmp
return {

View File

@@ -1,3 +1,4 @@
--Note: this will show what part of a file was changed deleted or added in a git repo
return {
"lewis6991/gitsigns.nvim",
-- event = "BufReadPre",

View File

@@ -1,3 +1,5 @@
-- NOTE: this adds a Language Server Provider for source files like C++, Java/-Script, etc.
-- It will check the code for errors, warnings, variables and structures and give suggestions.
return {
"neovim/nvim-lspconfig",
version = "*",
@@ -30,6 +32,9 @@ return {
"clangd",
"--offset-encoding=utf-16",
},
init_options = {
fllbackFlags = { '-std=c++20' },
},
handlers = handlers,
})
@@ -88,6 +93,11 @@ return {
-- To jump back, press <C-t>.
map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
-- 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")
-- Find references for the word under your cursor.
map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
@@ -100,6 +110,11 @@ return {
-- the definition of its *type*, not where it was *defined*.
map("<leader>ld", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition")
-- Jump to the type of the word under your cursor.
-- Useful when you're not sure what type a variable is and you want to see
-- the definition of its *type*, not where it was *defined*.
map("<leader>lD", vim.lsp.buf.declaration, "Go to [D]eclaration")
-- Fuzzy find all the symbols in your current document.
-- Symbols are things like variables, functions, types, etc.
map("<leader>ls", require("telescope.builtin").lsp_document_symbols, "document [S]ymbols")
@@ -134,10 +149,6 @@ return {
-- Opens a popup that displays documentation about the word under your cursor
-- See `:help K` for why this keymap.
-- 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")
map("<leader>th", function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf }))
end, "[T]oggle Inlay [H]ints")