CRAG666 / code_runner.nvim

Neovim plugin.The best code runner you could have, it is like the one in vscode but with super powers, it manages projects like in intellij but without being slow
MIT License
534 stars 38 forks source link

height and width issue of a float window #87

Closed azinsharaf closed 1 year ago

azinsharaf commented 1 year ago

I'm using float window with single border type. But it always shows the window in fullscreen no matter which height and width i use. If I don't specify a height and width it works fine.

return {  
"CRAG666/code_runner.nvim",
  enabled = true,
  event = "VeryLazy",
  init = function() require("which-key").register({ ["<leader>r"] = { name = "Code Runner" } }, { mode = "n" }) end,
  opts = {
    mode = "float", --"toggle", "float", "tab", "toggleterm" 
    focus = true,
    term = {
      position = "bot",
      size = 25,
    },
    float = {
      border = "single",
      height = 30,
      width = 50,
    },
    filetype = {
      python = "C:\\Users\\azin\\AppData\\Local\\ESRI\\conda\\envs\\arcgispro-py3-clone\\python.exe"
    },
  },
  keys = {
    { "<leader>rr", "<cmd>RunCode<cr>",    desc = "Run Code" },
    { "<leader>rf", "<cmd>RunFile<cr>",    desc = "Run File" },
    -- { "<leader>rft", "<cmd>RunFile tab<cr>", desc = "Run File Tab" },
    { "<leader>rp", "<cmd>RunProject<cr>", desc = "Run Project" },
    { "<leader>rc", "<cmd>RunClose<cr>",   desc = "Run Close" },
    -- { "<leader>crf", "<cmd>CRFiletype<cr>", desc = "Open Json supported files" },
    -- { "<leader>crp", "<cmd>CRProject<cr>", desc = "Open Json list of projects" },
  },
}
CRAG666 commented 1 year ago

Please use floating numbers: height = .3, width = .5,

azinsharaf commented 1 year ago

Thanks. I would check it.