Skip to content
This repository has been archived by the owner on Jul 23, 2023. It is now read-only.

haolian9/fixends.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

archived: having this for weeks, i have never used it once. it's useless to me.

an example that tries to fix/complete the end for current context/position.

design choices

  • be pragmatic, guarantee no 100% correctness
  • every pattern is hardcoded, as i know nothing about queries of treesitter
  • be stupid and lazy, it must be triggered by user
  • treesitter parsers are good, avoid string manipulations ASAP

status

  • it is not stable
  • its implementation is ugly

supported cases

lua: multiline blocks

  • do -> do | end
  • for.. -> for..do | end
  • for..in.. -> for..do | end
  • if.. -> if..then | end
  • if..then -> if..then | end
  • for..do -> for..do | end

general: inline pairs

  • '
  • "
  • (
  • [
  • {
  • [[

prerequisites

  • neovim 0.9.* with treesitter
  • haolian9/squirrel.nvim
  • haolian9/infra.nvim

usage

my personal config:

-- after/ftplugin/lua.vim
inoremap <buffer> <c-;> <cmd>lua require'fixends'.lua()<cr>

todo

  • python
  • zig

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages