2025-04-22

2025-04-22

I found ruff is a quite good example on how to structure the language server in rust.

Shit. My attention span. I really need some pomodoro timer

    fn settings_for_path(&self, path: &Path) -> Option<&WorkspaceSettings> {
        self.settings
            .range(..path.to_path_buf())
            .next_back()
            .map(|(_, settings)| settings)
    }

oh this is nice. it is using .range() over BTreeMap, passing range with PathBuf. I guess this will return value for key of closest ancester directory path.