Skip to content

Configuration option to disable for filetypes#119

Open
bogzbonny wants to merge 13 commits intoggml-org:masterfrom
bogzbonny:master
Open

Configuration option to disable for filetypes#119
bogzbonny wants to merge 13 commits intoggml-org:masterfrom
bogzbonny:master

Conversation

@bogzbonny
Copy link
Copy Markdown
Contributor

@bogzbonny bogzbonny commented Mar 25, 2026

closes #118

Pretty straight forward functionality. Will gladly make any requested changes if there is a desire to merge this!

I tested it manually, both setups in the readme work


from the README updates:

6. Disable code completion for certain filetypes (e.g., markdown)

    ```vim
    let g:llama_config = { 'disabled_filetypes': ['markdown', 'text'] }
    ```

    Or with lazy.nvim:

    ```lua
    {
        'ggml-org/llama.vim',
        init = function()
            vim.g.llama_config = {
                disabled_filetypes = { 'markdown', 'text'},
            }
        end,
    }
    ```

    This will prevent the plugin from enabling when the filetype matches any
    of the entries in the `disabled_filetypes` list. 

    Additionally, using `enabled_filetypes` one can disable code completion for
    all filetypes, then further only enabled it for specific filetypes. eg:

    ```vim
    let g:llama_config = { 'disabled_filetypes': ['*'], 'enabled_filetypes': ['rust']  }
    ```

@bogzbonny bogzbonny marked this pull request as draft March 25, 2026 06:12
@bogzbonny bogzbonny marked this pull request as ready for review March 25, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable for filetype(s)

1 participant