kitchen sink now don't support any version lower than 0.11.0 for lsp
- dap now works for java and c
This commit is contained in:
9
after/lsp/basedpyright.lua
Normal file
9
after/lsp/basedpyright.lua
Normal file
@ -0,0 +1,9 @@
|
||||
local map = require("core.misc").map
|
||||
|
||||
return {
|
||||
on_attach = function(_, bufnr)
|
||||
-- add some basedpyright specific mappings
|
||||
local opts = { buffer = bufnr }
|
||||
map("n", "cri", "<cmd>PyrightOrganizeImports<CR>", opts)
|
||||
end,
|
||||
}
|
27
after/lsp/clangd.lua
Normal file
27
after/lsp/clangd.lua
Normal file
@ -0,0 +1,27 @@
|
||||
local map = require("core.misc").map
|
||||
|
||||
return {
|
||||
on_attach = function(_, bufnr)
|
||||
-- add some clangd specific mappings
|
||||
local opts = { buffer = bufnr }
|
||||
map("n", "<leader>o", "<cmd>ClangdSwitchSourceHeader<CR>", opts)
|
||||
end,
|
||||
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--background-index",
|
||||
"--clang-tidy",
|
||||
"--header-insertion=iwyu",
|
||||
"--completion-style=detailed",
|
||||
"--function-arg-placeholders",
|
||||
"--fallback-style=llvm"
|
||||
},
|
||||
|
||||
init_options = {
|
||||
usePlaceholders = true,
|
||||
clangdFileStatus = true,
|
||||
fallback_flags = {
|
||||
"-xc" -- makes clangd think we"re using c instead of c++
|
||||
}
|
||||
}
|
||||
}
|
24
after/lsp/lua_ls.lua
Normal file
24
after/lsp/lua_ls.lua
Normal file
@ -0,0 +1,24 @@
|
||||
return {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim", "mp" }
|
||||
},
|
||||
runtime = {
|
||||
version = "LuaJIT"
|
||||
},
|
||||
format = {
|
||||
enable = false
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = true,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
root_markers = { ".luarc.json", ".luarc.jsonc", ".luacheckrc", ".stylua.toml",
|
||||
"stylua.toml", "selene.toml", "selene.yml", "README.md" }
|
||||
}
|
Reference in New Issue
Block a user