mirror of
https://github.com/kristoferssolo/runner.nvim.git
synced 2025-10-21 19:50:34 +00:00
Fix single quotes
This commit is contained in:
parent
ed804de3fa
commit
f4f42e02ec
23
README.md
23
README.md
@ -25,7 +25,10 @@ A customizable Neovim plugin to run code inside the editor
|
|||||||
requires = {
|
requires = {
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
requires = { 'nvim-lua/plenary.nvim' }
|
requires = { 'nvim-lua/plenary.nvim' }
|
||||||
}
|
},
|
||||||
|
config = function()
|
||||||
|
require('runner').setup()
|
||||||
|
end
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
```
|
```
|
||||||
@ -41,11 +44,7 @@ A customizable Neovim plugin to run code inside the editor
|
|||||||
dependencies = { 'nvim-lua/plenary.nvim' }
|
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("runner").setup({
|
require(runner').setup()
|
||||||
position = "right", -- position of task window can be: top, left, right, bottom
|
|
||||||
width = 80, -- width of window when position is left or right
|
|
||||||
height = 10, -- height of window when position is top or bottom
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -62,14 +61,14 @@ A customizable Neovim plugin to run code inside the editor
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### S`setup(options)`
|
### `setup(options)`
|
||||||
Runner comes with the following defaults:
|
Runner comes with the following defaults:
|
||||||
```lua
|
```lua
|
||||||
{
|
require('runner').setup({
|
||||||
position = "right", -- position of task window can be: top, left, right, bottom
|
position = 'right', -- position of task window can be: top, left, right, bottom
|
||||||
width = 80, -- width of window when position is left or right
|
width = 80, -- width of window when position is left or right
|
||||||
height = 10, -- height of window when position is top or bottom
|
height = 10, -- height of window when position is top or bottom
|
||||||
}
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
Default handlers can be found [here](./lua/runner/handlers/init.lua).
|
Default handlers can be found [here](./lua/runner/handlers/init.lua).
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local defaults = {
|
local defaults = {
|
||||||
position = "right", -- options: top, left, right, bottom
|
position = 'right', -- options: top, left, right, bottom
|
||||||
width = 80, -- width of window when position is left or right
|
width = 80, -- width of window when position is left or right
|
||||||
height = 10, -- height of window when position is top or bottom
|
height = 10, -- height of window when position is top or bottom
|
||||||
}
|
}
|
||||||
@ -9,7 +9,7 @@ local defaults = {
|
|||||||
M.options = {}
|
M.options = {}
|
||||||
|
|
||||||
M.setup = function(options)
|
M.setup = function(options)
|
||||||
M.options = vim.tbl_deep_extend("force", {}, defaults, options or {})
|
M.options = vim.tbl_deep_extend('force', {}, defaults, options or {})
|
||||||
end
|
end
|
||||||
|
|
||||||
M.setup()
|
M.setup()
|
||||||
|
|||||||
@ -23,13 +23,13 @@ M.create_window = function()
|
|||||||
return M._window
|
return M._window
|
||||||
end
|
end
|
||||||
|
|
||||||
if (config.options.position == "right") then
|
if (config.options.position == 'right') then
|
||||||
vim.cmd('botright ' .. config.options.width .. ' vsplit')
|
vim.cmd('botright ' .. config.options.width .. ' vsplit')
|
||||||
elseif (config.options.position == "left") then
|
elseif (config.options.position == 'left') then
|
||||||
vim.cmd('topleft ' .. config.options.width .. ' vsplit')
|
vim.cmd('topleft ' .. config.options.width .. ' vsplit')
|
||||||
elseif (config.options.position == "bottom") then
|
elseif (config.options.position == 'bottom') then
|
||||||
vim.cmd('botright ' .. config.options.height .. 'split')
|
vim.cmd('botright ' .. config.options.height .. 'split')
|
||||||
elseif (config.options.position == "top") then
|
elseif (config.options.position == 'top') then
|
||||||
vim.cmd('topleft ' .. config.options.height .. 'split')
|
vim.cmd('topleft ' .. config.options.height .. 'split')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user