uhhhhh
This commit is contained in:
parent
62945314e2
commit
b20f5d07a6
3 changed files with 40 additions and 5 deletions
|
|
@ -1,8 +1,29 @@
|
|||
local nonels_augroup = core.misc.augroup("nullls formatting")
|
||||
|
||||
return {
|
||||
{ "neovim/nvim-lspconfig",
|
||||
reqs = {
|
||||
"mason-org/mason.nvim",
|
||||
"mason-org/mason-lspconfig.nvim"
|
||||
},
|
||||
load = function()
|
||||
core.lsp.setup()
|
||||
require("mason-lspconfig").setup {
|
||||
ensure_added = {
|
||||
"clangd",
|
||||
"mesonlsp",
|
||||
"bashls",
|
||||
"jdtls",
|
||||
"lua_ls",
|
||||
"basedpyright",
|
||||
"black",
|
||||
"debugpy"
|
||||
}
|
||||
}
|
||||
end
|
||||
},
|
||||
|
||||
{ "mason-org/mason.nvim",
|
||||
reqs = "neovim/nvim-lspconfig",
|
||||
load = function()
|
||||
require("mason").setup {
|
||||
ui = {
|
||||
|
|
@ -14,8 +35,6 @@ return {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
core.mason.ensure_installed()
|
||||
end
|
||||
},
|
||||
|
||||
|
|
@ -30,11 +49,11 @@ return {
|
|||
|
||||
null_ls.setup {
|
||||
sources = {
|
||||
null_ls.builtins.formatting.black
|
||||
null_ls.builtins.formatting.black,
|
||||
},
|
||||
|
||||
on_attach = function(client, bufnr)
|
||||
if client:supports_method("textDocument/formatting") then
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({
|
||||
group = nonels_augroup,
|
||||
buffer = bufnr
|
||||
|
|
|
|||
10
lua/conf/plugins/opencode.lua
Normal file
10
lua/conf/plugins/opencode.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
return { "NickvanDyke/opencode.nvim",
|
||||
load = function()
|
||||
core.misc.map("n", "<leader>oa", function()
|
||||
require("opencode").ask()
|
||||
end, { desc = "Ask opencode" })
|
||||
core.misc.map("v", "<leader>oa", function()
|
||||
require("opencode").ask("@selection: ")
|
||||
end, { desc = "Ask opencode about selection" })
|
||||
end
|
||||
}
|
||||
|
|
@ -48,6 +48,12 @@ return {
|
|||
end
|
||||
}
|
||||
}
|
||||
|
||||
core.misc.map("n", "<leader><leader>t", function()
|
||||
pcall(vim.cmd.TSInstall, vim.api.nvim_get_option_value("ft", {
|
||||
buf = vim.api.nvim_get_current_buf()
|
||||
}))
|
||||
end)
|
||||
end
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue