about summary refs log tree commit diff stats
path: root/hm/soispha/conf/nvim/plgs/femaco
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-02-20 17:21:42 +0100
committerSoispha <soispha@vhack.eu>2024-02-20 17:21:42 +0100
commitf2bdeaed0bcf97a880fe36cfc8a050d1643120b8 (patch)
treeba4fe9c3ddf076529701c0e776ffef2104ac23d5 /hm/soispha/conf/nvim/plgs/femaco
parentrefactor(treewide): Add a `.sh` extension to shell scripts (diff)
downloadnixos-config-f2bdeaed0bcf97a880fe36cfc8a050d1643120b8.zip
refactor(treewide): Reformat all files with treefmt
This includes getting all shellscripts to pass shellcheck. To accomplish
this, some old scripts were removed
Diffstat (limited to 'hm/soispha/conf/nvim/plgs/femaco')
-rw-r--r--hm/soispha/conf/nvim/plgs/femaco/lua/femaco.lua32
1 files changed, 16 insertions, 16 deletions
diff --git a/hm/soispha/conf/nvim/plgs/femaco/lua/femaco.lua b/hm/soispha/conf/nvim/plgs/femaco/lua/femaco.lua
index 10064b5e..da3be8e1 100644
--- a/hm/soispha/conf/nvim/plgs/femaco/lua/femaco.lua
+++ b/hm/soispha/conf/nvim/plgs/femaco/lua/femaco.lua
@@ -1,4 +1,4 @@
-local clip_val = require('femaco.utils').clip_val
+local clip_val = require("femaco.utils").clip_val
 require("femaco").setup({
   -- should prepare a new buffer and return the winid
   -- by default opens a floating window
@@ -7,7 +7,7 @@ require("femaco").setup({
   prepare_buffer = function(opts)
     local buf = vim.api.nvim_create_buf(false, false)
     return vim.api.nvim_open_win(buf, true, opts)
-  end;
+  end,
   -- should return options passed to nvim_open_win
   -- @param code_block: data about the code-block with the keys
   --   * range
@@ -15,30 +15,30 @@ require("femaco").setup({
   --   * lang
   float_opts = function(code_block)
     return {
-      relative = "cursor";
-      width = clip_val(5, 120, vim.api.nvim_win_get_width(0) - 10); -- TODO: how to offset sign column etc?
-      height = clip_val(5, #code_block.lines, vim.api.nvim_win_get_height(0) - 6);
-      anchor = "NW";
-      row = 0;
-      col = 0;
-      style = "minimal";
-      border = "rounded";
-      zindex = 1;
+      relative = "cursor",
+      width = clip_val(5, 120, vim.api.nvim_win_get_width(0) - 10), -- TODO: how to offset sign column etc?
+      height = clip_val(5, #code_block.lines, vim.api.nvim_win_get_height(0) - 6),
+      anchor = "NW",
+      row = 0,
+      col = 0,
+      style = "minimal",
+      border = "rounded",
+      zindex = 1,
     }
-  end;
+  end,
   -- return filetype to use for a given lang
   -- lang can be nil
   ft_from_lang = function(lang)
     return lang
-  end;
+  end,
   -- what to do after opening the float
   post_open_float = function(winnr)
     vim.wo.signcolumn = "no"
-  end;
+  end,
   -- create the path to a temporary file
   create_tmp_filepath = function(filetype)
     return os.tmpname()
-  end;
+  end,
   -- if a newline should always be used, useful for multiline injections
   -- which separators needs to be on separate lines such as markdown, neorg etc
   -- @param base_filetype: The filetype which FeMaco is called from, not the
@@ -46,5 +46,5 @@ require("femaco").setup({
   -- get it from vim.bo.filetyp).
   ensure_newline = function(base_filetype)
     return false
-  end;
+  end,
 })