add gopher

This commit is contained in:
DefectingCat
2024-03-05 08:53:58 +08:00
parent 16e210453b
commit db0ba385a0
5 changed files with 22 additions and 7 deletions

View File

@ -1,4 +1,4 @@
local dap = require "dap"
local dap = require("dap")
dap.adapters["pwa-node"] = {
type = "server",
@ -9,7 +9,7 @@ dap.adapters["pwa-node"] = {
},
}
for _, language in ipairs { "typescript", "javascript" } do
for _, language in ipairs({ "typescript", "javascript" }) do
dap.configurations[language] = {
{
type = "pwa-node",

View File

@ -21,7 +21,7 @@ require("mason-lspconfig").setup_handlers({
end,
})
lspconfig.rust_analyzer.setup({
--[[ lspconfig.rust_analyzer.setup({
on_attach = on_attach,
capabilities = capabilities,
settings = {
@ -69,7 +69,7 @@ lspconfig.rust_analyzer.setup({
allTargets = false,
},
},
})
}) ]]
lspconfig.tsserver.setup({
on_attach = on_attach,

View File

@ -55,7 +55,7 @@ vim.g.rustaceanvim = function()
},
},
procMacro = {
enable = false,
enable = true,
ignored = {
["async-trait"] = { "async_trait" },
["napi-derive"] = { "napi" },

View File

@ -162,14 +162,14 @@ local plugins = {
require("rust-tools").setup(opts)
end,
}, ]]
--[[ {
{
"mrcjkb/rustaceanvim",
version = "^3", -- Recommended
ft = "rust",
config = function()
require("custom.configs.rust")
end,
}, ]]
},
{
"saecki/crates.nvim",
ft = { "toml" },
@ -190,6 +190,18 @@ local plugins = {
vim.g.rustfmt_autosave = 1
end,
},
-- golang
{
"olexsmir/gopher.nvim",
ft = "go",
config = function(_, opts)
require("gopher").setup(opts)
--[[ require("core.utils").load_mappings("gopher") ]]
end,
build = function()
vim.cmd([[silent! GoInstallDeps]])
end,
},
{
"b0o/schemastore.nvim",
},

View File

@ -24,6 +24,9 @@ if [[ $OSTYPE == "darwin"* ]]; then
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
fi
# deno
export DVM_DIR="/Users/xfy/.dvm"
export PATH="$DVM_DIR/bin:$PATH"
# rust
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup