NMAC427 / guess-indent.nvim

Automatic indentation style detection for Neovim
MIT License
386 stars 7 forks source link

How to use GuessIndent plugin and ftplugin files ? #5

Open lcheylus opened 2 years ago

lcheylus commented 2 years ago

Hello, thanks for your work on GuessIndent plugin : it's a great tool for my neovim usage.

I'm using ftplugin files for C, Go and Python to automatically configure my indent settings (filetype plugin indent on in configuration). For example, ftplugin/python.vim :

setlocal tabstop=4
setlocal softtabstop=4
setlocal shiftwidth=4
setlocal smarttab
setlocal expandtab

How to use your plugin to set automatically indentation with ftplugin files ? If your plugin detects an indentation different from my configuration, what configuration will be used ? I want to use my default configuration for C, Go and Python when I work on my projects but I would like to use automatic indentation detected by GuessIndent when I work on external project (common usage : C project indented with TAB of 8, 4 spaces for indent in my personal config for C).

Susensio commented 1 month ago

I'm getting race conditions between Guess Indent and after/ftplugins. Did you managed to get this sorted out @lcheylus ?

lcheylus commented 1 month ago

Sorry, I didn't find a good solution to use the GuessIndent plugin and my config in ftplugin/ files :(