about summary refs log tree commit diff stats
path: root/home-manager/soispha/config/neovim/nixvim/plugins/femaco/lua
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-08-26 22:52:12 +0200
committerSoispha <soispha@vhack.eu>2023-08-26 22:56:09 +0200
commit4c743a2afb87994be4ff7c2dc76d21c70d31e4de (patch)
tree70922dd5db390641da012085bc674333b53d2ef1 /home-manager/soispha/config/neovim/nixvim/plugins/femaco/lua
parentFix(hm/conf/neovim/plugins/colorscheme): Mk todo,fix,&c comments visible (diff)
downloadnixos-config-4c743a2afb87994be4ff7c2dc76d21c70d31e4de.zip
Style(treewide): Format all lua-files makes lua ➛ nix easier
The files were formatted according to the `.editorconfig` file and with
the formatter from [this](1) repo, as it's the only one that fully
understands all keys in the `.editorconfig` file.

The formatting was chosen in this special (and honestly unconventional)
way because moving code from lua to nix is now easier, as the syntax is
nearly identical in some places.
Diffstat (limited to 'home-manager/soispha/config/neovim/nixvim/plugins/femaco/lua')
-rw-r--r--home-manager/soispha/config/neovim/nixvim/plugins/femaco/lua/femaco.lua34
1 files changed, 17 insertions, 17 deletions
diff --git a/home-manager/soispha/config/neovim/nixvim/plugins/femaco/lua/femaco.lua b/home-manager/soispha/config/neovim/nixvim/plugins/femaco/lua/femaco.lua
index 228b0aa6..12171793 100644
--- a/home-manager/soispha/config/neovim/nixvim/plugins/femaco/lua/femaco.lua
+++ b/home-manager/soispha/config/neovim/nixvim/plugins/femaco/lua/femaco.lua
@@ -1,4 +1,4 @@
-require('femaco').setup({
+require("femaco").setup({
   -- should prepare a new buffer and return the winid
   -- by default opens a floating window
   -- provide a different callback to change this behaviour
@@ -6,7 +6,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
@@ -14,30 +14,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,
+    vim.wo.signcolumn = "no"
+  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
@@ -45,5 +45,5 @@ require('femaco').setup({
   -- get it from vim.bo.filetyp).
   ensure_newline = function(base_filetype)
     return false
-  end,
+  end;
 })