Skip to content

matthewmturner/ghostty-lsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ghostty-lsp

LSP for Ghostty providing hover definitions for each parameter in Ghostty's configuration.

Installation

Install using the Rust package manager.

cargo build --release

Make sure the created binary is in your $PATH.

Neovim

Add the following LSP configuration to have the LSP only activate on the Ghostty config (this assumes you use default location for Ghostty config - if not update the normalized location to your needs).

function setup_ghostty_lsp()
    -- Only activate ghostty-lsp when editing the ghostty config
    if vim.fn.expand("%:p") == vim.fs.normalize("~/.config/ghostty/config") then
        vim.lsp.start({
            name = "ghostty-lsp",
            cmd = { "ghostty-lsp" },
            root_dir = vim.fs.normalize("~/.config/ghostty")
        })
    end
end

vim.api.nvim_create_autocmd("BufRead", { pattern = "*", callback = setup_ghostty_lsp })

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages