Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Code Actions #248

Open
virella2385 opened this issue Oct 2, 2018 · 2 comments
Open

Using Code Actions #248

virella2385 opened this issue Oct 2, 2018 · 2 comments

Comments

@virella2385
Copy link

I've been trying to use code actions in situations like creating an interface when the cursor is on a new interface name or creating a private variable declaration when highlighting a just type variable name (i.e. _conf) but nothing happens. I get the following message on the log:

======== request ======== 
 Url: http://localhost:58936/getcodeactions 
 Data: {"column": "32", "selectionStartLine": 15, "filename": "/Users/alakratt/Documents/github/DotnetCoreFundamentals/TestNetCoreWebApp/IGreeter.cs", "selectionEndColumn": 32, "selectionStartColumn": 32, "selectionEndLine": 15, "line": "15", "buffer": "using Microsoft.Extensions.Configuration;\n\nnamespace TestNetCoreWebApp\n{\n\t\n    public interface IGreeter\n    {\n        string GetMessageOfTheDay();\n    }\n\n    public class Greeter : IGreeter\n    {\n    \tprivate IConfiguration _conf;\n\n    \tpublic Greeter(IConfiguration conf)\n    \t{\n    \t\t_conf = conf;\n    \t}\n\n    \tpublic string GetMessageOfTheDay()\n    \t{\n    \t\treturn _conf[\"Greeting\"];\n    \t}\n    }\n}"}
======== response ======== 
 {"CodeActions":[]}
{'CodeActions': []}
codeactions is :
{'CodeActions': []}
======== end ========

Is it something I'm doing wrong or is this a bug?

@virella2385
Copy link
Author

Can anybody point me to the documentation where I can find more about configuring (if needed) code actions? I've checked the online docs but it makes zero references to code actions.

@Rosalie241
Copy link
Contributor

The code actions are handled by omnisharp-roslyn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants