Skip to content

Commit

Permalink
Only send the change file message when not ignoring the file
Browse files Browse the repository at this point in the history
  • Loading branch information
Schottkyc137 committed Apr 27, 2024
1 parent b07c761 commit 1a5f297
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vhdl_ls/src/vhdl_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use vhdl_lang::{

/// Defines how the language server handles files
/// that are not part of the `vhdl_ls.toml` project settings file.
#[derive(Default, Clone)]
#[derive(Default, Clone, Eq, PartialEq)]
pub enum NonProjectFileHandling {
/// Ignore any non-project files
Ignore,
Expand Down Expand Up @@ -270,7 +270,7 @@ impl VHDLServer {
}
self.project.update_source(&source);
self.publish_diagnostics();
} else {
} else if self.settings.non_project_file_handling != NonProjectFileHandling::Ignore {
self.message(Message::error(format!(
"Changing file {} that is not part of the project",
file_name.to_string_lossy()
Expand Down

0 comments on commit 1a5f297

Please sign in to comment.