|
|
@@ -74,7 +74,6 @@ fn load_config(custom_path: Option<PathBuf>) -> Result<(oxwm::Config, bool)> { |
| 74 |
74 |
println!(" See the new config.lua template for examples.\n"); |
| 75 |
75 |
} |
| 76 |
76 |
} else { |
| 77 |
|
- // Always update LSP files to match the running version |
| 78 |
77 |
update_lsp_files()?; |
| 79 |
78 |
} |
| 80 |
79 |
|
|
|
@@ -105,7 +104,6 @@ fn init_config() -> Result<()> { |
| 105 |
104 |
let config_path = config_dir.join("config.lua"); |
| 106 |
105 |
std::fs::write(&config_path, config_template)?; |
| 107 |
106 |
|
| 108 |
|
- // Update LSP files |
| 109 |
107 |
update_lsp_files()?; |
| 110 |
108 |
|
| 111 |
109 |
println!("✓ Config created at {:?}", config_path); |
|
|
@@ -119,16 +117,13 @@ fn init_config() -> Result<()> { |
| 119 |
117 |
fn update_lsp_files() -> Result<()> { |
| 120 |
118 |
let config_dir = get_config_path(); |
| 121 |
119 |
|
| 122 |
|
- // Create lib directory for LSP files |
| 123 |
120 |
let lib_dir = config_dir.join("lib"); |
| 124 |
121 |
std::fs::create_dir_all(&lib_dir)?; |
| 125 |
122 |
|
| 126 |
|
- // Always overwrite oxwm.lua with the version from this binary |
| 127 |
123 |
let oxwm_lua_template = include_str!("../../templates/oxwm.lua"); |
| 128 |
124 |
let oxwm_lua_path = lib_dir.join("oxwm.lua"); |
| 129 |
125 |
std::fs::write(&oxwm_lua_path, oxwm_lua_template)?; |
| 130 |
126 |
|
| 131 |
|
- // Create/update .luarc.json for LSP configuration |
| 132 |
127 |
let luarc_content = r#"{ |
| 133 |
128 |
"workspace.library": [ |
| 134 |
129 |
"lib" |