From 5da5f0506b5799dc757e9d93af23cebbfa18eb91 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Thu, 3 Jul 2025 11:54:10 +0900 Subject: updates --- ar/.config/LazyVim/lua/plugins/lspconfig.lua | 77 ---------------------------- 1 file changed, 77 deletions(-) delete mode 100644 ar/.config/LazyVim/lua/plugins/lspconfig.lua (limited to 'ar/.config/LazyVim/lua/plugins/lspconfig.lua') diff --git a/ar/.config/LazyVim/lua/plugins/lspconfig.lua b/ar/.config/LazyVim/lua/plugins/lspconfig.lua deleted file mode 100644 index 4d8db1c..0000000 --- a/ar/.config/LazyVim/lua/plugins/lspconfig.lua +++ /dev/null @@ -1,77 +0,0 @@ -return { - "neovim/nvim-lspconfig", - init = function() - local keys = require("lazyvim.plugins.lsp.keymaps").get() - -- change a keymap - -- keys[#keys + 1] = { "K", "echo 'hello'" } - -- keys[#keys + 1] = { "", mode = { "i" }, false } - - -- disable a keymap - -- keys[#keys + 1] = { "K", false } - keys[#keys + 1] = { mode = { "i" }, "", false } - - -- add a keymap - -- keys[#keys + 1] = { "H", "echo 'hello'" } - end, - opts = { - servers = { - -- Ensure mason installs the server - clangd = { - keys = { - { "cR", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, - }, - root_dir = function(fname) - return require("lspconfig.util").root_pattern( - "Makefile", - "configure.ac", - "configure.in", - "config.h.in", - "meson.build", - "meson_options.txt", - "build.ninja" - )(fname) or require("lspconfig.util").root_pattern("compile_commands.json", "compile_flags.txt")( - fname - ) or require("lspconfig.util").find_git_ancestor(fname) - end, - capabilities = { - offsetEncoding = { "utf-16" }, - }, - cmd = { - "clangd", - "--background-index", - "--clang-tidy", - "--header-insertion=iwyu", - "--completion-style=detailed", - "--function-arg-placeholders", - "--fallback-style=llvm", - }, - init_options = { - usePlaceholders = true, - completeUnimported = true, - clangdFileStatus = true, - }, - }, - }, - setup = { - clangd = function(_, opts) - local clangd_ext_opts = require("lazyvim.util").opts("clangd_extensions.nvim") - require("clangd_extensions").setup(vim.tbl_deep_extend("force", clangd_ext_opts or {}, { server = opts })) - return false - end, - }, - }, - keys = { - { - -- mode = "n", - "rr", - ":w | :TermExec cmd='compiler \"%\"' size=50 direction=tab go_back=0", - desc = "Run Code", - }, - { - -- mode = "n", - "rd", - ":w | :TermExec cmd='compiler \"%\" -d' size=50 direction=tab go_back=0", - desc = "Debug Code", - }, - }, -} -- cgit v1.2.3