use crate::server::LspServer;
use crate::utils::*;
#[allow(unused)]
use log::info;
use tower_lsp::lsp_types::*;

mod sv;
mod vhdl;

impl LspServer {
    pub fn code_lens(&self, params: CodeLensParams) -> Option<Vec<CodeLens>> {
        let language_id = get_language_id_by_uri(&params.text_document.uri);
        match language_id.as_str() {
            "vhdl" => vhdl::code_lens(
                self,
                &params
            ),

            "verilog" | "systemverilog" => sv::code_lens(
                self,
                &params
            ),
            
            _ => None
        }
    }
}