File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ struct Args {
1414 #[ arg( long, default_value_t = false ) ]
1515 no_lint : bool ,
1616
17+ /// Path to the config file for the VHDL standard libraries (i.e., IEEE std_logic_1164).
18+ /// If omitted, will search for these libraries in a set of standard paths
19+ #[ arg( short = 'l' , long) ]
20+ libraries : Option < String > ,
21+
1722 /// Normally warning and error messages are sent to window/showMessage
1823 /// This will silence all window/showMessage and only use window/logMessage
1924 #[ arg( long, default_value_t = false ) ]
@@ -28,6 +33,7 @@ fn main() {
2833 vhdl_ls:: start ( VHDLServerSettings {
2934 no_lint : args. no_lint ,
3035 silent : args. silent ,
36+ libraries_path : args. libraries ,
3137 ..Default :: default ( )
3238 } ) ;
3339}
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ pub struct VHDLServerSettings {
5353 pub no_lint : bool ,
5454 pub silent : bool ,
5555 pub non_project_file_handling : NonProjectFileHandling ,
56+ pub libraries_path : Option < String > ,
5657}
5758
5859pub struct VHDLServer {
@@ -123,7 +124,10 @@ impl VHDLServer {
123124 let mut config = Config :: default ( ) ;
124125
125126 if self . use_external_config {
126- config. load_external_config ( & mut self . message_filter ( ) , None ) ;
127+ config. load_external_config (
128+ & mut self . message_filter ( ) ,
129+ self . settings . libraries_path . clone ( ) ,
130+ ) ;
127131 }
128132
129133 match self . load_root_uri_config ( ) {
You can’t perform that action at this time.
0 commit comments