Skip to content

Welcome the higher intelligence (hint) to your nvim editor

License

Notifications You must be signed in to change notification settings

AdrianBakke/hint.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hint.nvim Header

hint.nvim

Free yourself, brothers and sisters

demo.mp4

Credits

This extension woudln't exist if it weren't for https://github.com/melbaldove/llm.nvim and https://github.com/yacineMTB/dingllm.nvim

I diff'd on a fork of it until it was basically a rewrite. Thanks @yacineMTB!

The main difference is that this streams the llm output into a floating window, istead of directly in the editor. You can open and close the window as you like and you don`t have to deal with the clutter of having the stream come directly into your code file.

return {
  {
    'AdrianBakke/hint.nvim',
    dependencies = { 'nvim-lua/plenary.nvim' },
    config = function()
      local hint = require 'hint'
      vim.keymap.set({ 'n', 'v' }, '<C-j>', hint.toggle_window, { desc = 'Open HINT Window' })
      vim.keymap.set({ 'n', 'v' }, '<leader>1', hint.openai_chat_completion, { desc = 'OpenAI Chat Completion' })
      vim.keymap.set({ 'n', 'v' }, '<leader>2', hint.openai_chat_completion_reasoner, { desc = 'OpenAI Chat Completion Reasoner' })
      vim.keymap.set({ 'n', 'v' }, '<leader>3', hint.deepseek_chat_completion, { desc = 'DeepSeek Chat Completion Reasoner' })
    end,
  },
}

Documentation

read the code dummy

TODO

  • make creating prompt with text selected with ctrl-v work []
  • make it possible to stop llm output with q []
  • possible syntax highlighting inside floating window? q [x]
  • create a demo showcasing how to use [x] (demo should be better)
  • create floating window with tabs<33 [x]

About

Welcome the higher intelligence (hint) to your nvim editor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages