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

pub mod feature;

mod sv;
mod vhdl;

impl LspServer {
    pub fn hover(&self, params: HoverParams) -> Option<Hover> {
        let language_id = get_language_id_by_uri(&params.text_document_position_params.text_document.uri);
        match language_id.as_str() {
            "vhdl" => vhdl::hover(
                self,
                &params
            ),

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