mirror of
https://github.com/DefectingCat/dotfiles
synced 2025-07-16 01:01:36 +00:00
add gopher
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
local dap = require "dap"
|
local dap = require("dap")
|
||||||
|
|
||||||
dap.adapters["pwa-node"] = {
|
dap.adapters["pwa-node"] = {
|
||||||
type = "server",
|
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] = {
|
dap.configurations[language] = {
|
||||||
{
|
{
|
||||||
type = "pwa-node",
|
type = "pwa-node",
|
||||||
|
@ -21,7 +21,7 @@ require("mason-lspconfig").setup_handlers({
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.rust_analyzer.setup({
|
--[[ lspconfig.rust_analyzer.setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
settings = {
|
settings = {
|
||||||
@ -69,7 +69,7 @@ lspconfig.rust_analyzer.setup({
|
|||||||
allTargets = false,
|
allTargets = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
}) ]]
|
||||||
|
|
||||||
lspconfig.tsserver.setup({
|
lspconfig.tsserver.setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
|
@ -55,7 +55,7 @@ vim.g.rustaceanvim = function()
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
procMacro = {
|
procMacro = {
|
||||||
enable = false,
|
enable = true,
|
||||||
ignored = {
|
ignored = {
|
||||||
["async-trait"] = { "async_trait" },
|
["async-trait"] = { "async_trait" },
|
||||||
["napi-derive"] = { "napi" },
|
["napi-derive"] = { "napi" },
|
||||||
|
@ -162,14 +162,14 @@ local plugins = {
|
|||||||
require("rust-tools").setup(opts)
|
require("rust-tools").setup(opts)
|
||||||
end,
|
end,
|
||||||
}, ]]
|
}, ]]
|
||||||
--[[ {
|
{
|
||||||
"mrcjkb/rustaceanvim",
|
"mrcjkb/rustaceanvim",
|
||||||
version = "^3", -- Recommended
|
version = "^3", -- Recommended
|
||||||
ft = "rust",
|
ft = "rust",
|
||||||
config = function()
|
config = function()
|
||||||
require("custom.configs.rust")
|
require("custom.configs.rust")
|
||||||
end,
|
end,
|
||||||
}, ]]
|
},
|
||||||
{
|
{
|
||||||
"saecki/crates.nvim",
|
"saecki/crates.nvim",
|
||||||
ft = { "toml" },
|
ft = { "toml" },
|
||||||
@ -190,6 +190,18 @@ local plugins = {
|
|||||||
vim.g.rustfmt_autosave = 1
|
vim.g.rustfmt_autosave = 1
|
||||||
end,
|
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",
|
"b0o/schemastore.nvim",
|
||||||
},
|
},
|
||||||
|
@ -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/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
|
[ -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
|
fi
|
||||||
|
# deno
|
||||||
|
export DVM_DIR="/Users/xfy/.dvm"
|
||||||
|
export PATH="$DVM_DIR/bin:$PATH"
|
||||||
# rust
|
# rust
|
||||||
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
|
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
|
||||||
export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
|
export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
|
||||||
|
Reference in New Issue
Block a user