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

lsp seems doens't use event about file #54

Closed
Wordluc opened this issue Sep 24, 2024 · 4 comments
Closed

lsp seems doens't use event about file #54

Wordluc opened this issue Sep 24, 2024 · 4 comments

Comments

@Wordluc
Copy link

Wordluc commented Sep 24, 2024

When i create a file.cs on nvim, lsp wont return errors.

@seblj
Copy link
Owner

seblj commented Sep 24, 2024

Sorry but this is impossible to respond to... you have to give me more info than this

@Wordluc
Copy link
Author

Wordluc commented Sep 24, 2024

sorry, basically when i create a file (from either neotree and netrw ) in neovim of type cs, roslyn doesn't return error, it gives the suggestions but not the error(so the diagnostic).I have to restart the lsp
this is my configuration:

	filewatching=false,
	config = {
		cmd = {
			"dotnet",
			vim.fs.joinpath(vim.fn.stdpath("data"), "roslyn", "Microsoft.CodeAnalysis.LanguageServer.dll"),
		},
		settings = {
			["csharp|inlay_hints"] = {
				csharp_enable_inlay_hints_for_implicit_object_creation = true,
				csharp_enable_inlay_hints_for_implicit_variable_types = true,
				csharp_enable_inlay_hints_for_lambda_parameter_types = true,
				csharp_enable_inlay_hints_for_types = true,
				dotnet_enable_inlay_hints_for_indexer_parameters = true,
				dotnet_enable_inlay_hints_for_literal_parameters = true,
				dotnet_enable_inlay_hints_for_object_creation_parameters = true,
				dotnet_enable_inlay_hints_for_other_parameters = true,
				dotnet_enable_inlay_hints_for_parameters = true,
				dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix = true,
				dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name = true,
				dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent = true,
			},
			["csharp|code_lens"] = {
				dotnet_enable_references_code_lens = true,
			},
		}
	}

}) ```

@Wordluc
Copy link
Author

Wordluc commented Sep 24, 2024

this is the issue of the parent: jmederosalvarado#27

@seblj
Copy link
Owner

seblj commented Sep 24, 2024

Seems to be because of filewatching = false in your setup function. I could only reproduce this when that option is set to false. It seems to work as expected when it is set to true (or removed, as true is the default option)

That is really a hack to not make the server choke on large codebases and is not the default value.

(You could also remove the config.cmd option if you like, as that is the default value)

@seblj seblj closed this as completed Sep 24, 2024
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