@@ -29,7 +29,7 @@ This plugin was built entirely with Claude Code in a Neovim terminal, and then i
2929- 🧠 Support for command-line arguments like ` --continue ` and custom variants
3030- 🔄 Automatically detect and reload files modified by Claude Code
3131- ⚡ Real-time buffer updates when files are changed externally
32- - 📱 Customizable window position and size
32+ - 📱 Customizable window position and size (including floating windows)
3333- 🤖 Integration with which-key (if available)
3434- 📂 Automatically uses git project root as working directory (when available)
3535- 🧩 Modular and maintainable code structure
@@ -93,10 +93,20 @@ require("claude-code").setup({
9393 -- Terminal window settings
9494 window = {
9595 split_ratio = 0.3 , -- Percentage of screen for the terminal window (height for horizontal, width for vertical splits)
96- position = " botright" , -- Position of the window: "botright", "topleft", "vertical", "rightbelow vsplit ", etc.
96+ position = " botright" , -- Position of the window: "botright", "topleft", "vertical", "float ", etc.
9797 enter_insert = true , -- Whether to enter insert mode when opening Claude Code
9898 hide_numbers = true , -- Hide line numbers in the terminal window
9999 hide_signcolumn = true , -- Hide the sign column in the terminal window
100+
101+ -- Floating window configuration (only applies when position = "float")
102+ float = {
103+ width = " 80%" , -- Width: number of columns or percentage string
104+ height = " 80%" , -- Height: number of rows or percentage string
105+ row = " center" , -- Row position: number, "center", or percentage string
106+ col = " center" , -- Column position: number, "center", or percentage string
107+ relative = " editor" , -- Relative to: "editor" or "cursor"
108+ border = " rounded" , -- Border style: "none", "single", "double", "rounded", "solid", "shadow"
109+ },
100110 },
101111 -- File refresh settings
102112 refresh = {
@@ -201,6 +211,26 @@ Note: After scrolling with `<C-f>` or `<C-b>`, you'll need to press the `i` key
201211
202212When Claude Code modifies files that are open in Neovim, they'll be automatically reloaded.
203213
214+ ### Floating Window Example
215+
216+ To use Claude Code in a floating window:
217+
218+ ``` lua
219+ require (" claude-code" ).setup ({
220+ window = {
221+ position = " float" ,
222+ float = {
223+ width = " 90%" , -- Take up 90% of the editor width
224+ height = " 90%" , -- Take up 90% of the editor height
225+ row = " center" , -- Center vertically
226+ col = " center" , -- Center horizontally
227+ relative = " editor" ,
228+ border = " double" , -- Use double border style
229+ },
230+ },
231+ })
232+ ```
233+
204234## How it Works
205235
206236This plugin:
0 commit comments