# HG changeset patch # User zegervdv # Date 1618046089 -7200 # Node ID 2a8195e14cad7658b872208c7ba2bc72b15bf304 # Parent 2150c55c89b7879d879541c65698864110246c77 Add lua-format config for efm diff -r 2150c55c89b7 -r 2a8195e14cad dot_config/lua-format/.keep diff -r 2150c55c89b7 -r 2a8195e14cad dot_config/lua-format/conf.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dot_config/lua-format/conf.yml Sat Apr 10 11:14:49 2021 +0200 @@ -0,0 +1,11 @@ +column_limit: 100 +indent_width: 2 +use_tab: false +chop_down_parameter: true +break_before_functionref_rp: true +chop_down_table: true +table_sep: ',' +extra_sep_at_table_end: true +double_quote_to_single_quote: true +spaces_before_call: 1 +spaces_inside_table_braces: true diff -r 2150c55c89b7 -r 2a8195e14cad dot_config/nvim/config.lua --- a/dot_config/nvim/config.lua Fri Apr 09 15:00:08 2021 +0200 +++ b/dot_config/nvim/config.lua Sat Apr 10 11:14:49 2021 +0200 @@ -446,6 +446,7 @@ if (vim.fn.executable('efm-langserver') == 1) then require 'efm/python' + require 'efm/lua' -- May not be installed, use pcall to handle errors -- pcall(require, 'efm/systemverilog') diff -r 2150c55c89b7 -r 2a8195e14cad dot_config/nvim/lua/efm/lua.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dot_config/nvim/lua/efm/lua.lua Sat Apr 10 11:14:49 2021 +0200 @@ -0,0 +1,10 @@ +local languages = require 'efm/languages' + +languages.lua = {} + +if (vim.fn.executable('lua-format') == 1) then + table.insert(languages.lua, { + formatCommand = "lua-format -c ~/.config/lua-format/conf.yml", + formatStdin = true + }) +end