gpt4 book ai didi

autocomplete - 带有 Sublime Text 的 OmniSharp 似乎没有运行 OmniSharpServer

转载 作者:行者123 更新时间:2023-12-04 20:39:37 25 4
gpt4 key购买 nike

我正在尝试让 ASP.NET MVC5 项目在 Sublime Text 中工作。我已经安装了 OmniSharp 和 Kulture sublime 文本插件。

但是,OmniSharp 服务器似乎没有运行,因为我无法获得任何有意义的自动完成选项。我已按照 this guide 中的所有步骤进行操作(除了关于 .sln 文件的那个,因为我没有 .sln 文件,并且文档指出 .proj 文件会自动找到)。

此外,重命名/转到定义选项似乎也根本不起作用。我是否需要以某种方式使用 Sublime 文本启动 OmniSharp 服务器?

当我在 Atom ( http://atom.io ) 中安装 OmniSharp 插件时,我必须手动启动 OmniSharp 插件 (ctrl+alt+o),然后才能按预期获得所有功能。

所以,我只是想知道我是否遗漏了一些明显的东西?

最佳答案

我深入研究了插件代码,发现 OmniSharpServer 仅在打开 C# 文件时启动。见 server_runner.py 在 OmniSharpSublime 存储库中。

我更改了代码以测试解决方案或 project.json在目前看来。尝试这个:

import sublime_plugin

from ..lib import helpers
from ..lib import omnisharp


class OmniSharpServerRunnerEventListener(sublime_plugin.EventListener):
def on_activated(self, view):
if helpers.is_csharp(view) or helpers.current_solution_or_project_json_folder(view):
omnisharp.create_omnisharp_server_subprocess(view)

关于autocomplete - 带有 Sublime Text 的 OmniSharp 似乎没有运行 OmniSharpServer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28791935/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com