aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2021-05-12 16:56:22 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2021-05-12 16:57:19 +0200
commit4cbf85204da530a35df5e54bda5b8028c2273df8 (patch)
tree0766dd2e722bb5ce95e26784c79e7bfcb013312c
parent82dd65151bf2bf047f484fe664b34f72f57302b5 (diff)
downloaddotfiles-4cbf85204da530a35df5e54bda5b8028c2273df8.tar.gz
dotfiles-4cbf85204da530a35df5e54bda5b8028c2273df8.zip
[vis] add vis-lspc and vis-fzf-open plugins
-rw-r--r--.gitmodules6
m---------config/vis/plugins/vis-fzf-open0
m---------config/vis/plugins/vis-lspc0
-rw-r--r--config/vis/visrc.lua42
4 files changed, 18 insertions, 30 deletions
diff --git a/.gitmodules b/.gitmodules
index c42122b..73f0a4d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -35,3 +35,9 @@
[submodule "config/vis/plugins/vis-ctags"]
path = config/vis/plugins/vis-ctags
url = https://github.com/kupospelov/vis-ctags
+[submodule "config/vis/plugins/vis-lspc"]
+ path = config/vis/plugins/vis-lspc
+ url = https://github.com/fischerling/vis-lspc.git
+[submodule "config/vis/plugins/vis-fzf-open"]
+ path = config/vis/plugins/vis-fzf-open
+ url = https://git.sr.ht/~mcepl/vis-fzf-open
diff --git a/config/vis/plugins/vis-fzf-open b/config/vis/plugins/vis-fzf-open
new file mode 160000
+Subproject ef104ea956776a97d1a5ff07281606eb0ab9e7f
diff --git a/config/vis/plugins/vis-lspc b/config/vis/plugins/vis-lspc
new file mode 160000
+Subproject 1f12949fca5ecbd3a16ee41d6a8c44a00fa291a
diff --git a/config/vis/visrc.lua b/config/vis/visrc.lua
index 2f20494..9fa6e37 100644
--- a/config/vis/visrc.lua
+++ b/config/vis/visrc.lua
@@ -2,13 +2,22 @@
require('vis')
require('plugins/filetype')
require('plugins/textobject-lexer')
-require('plugins/vis-cursors').cursors_path = string.format('%s/vis/cursors', os.getenv('XDG_DATA_HOME') or os.getenv('HOME').."/.local/share")
-require('plugins/vis-spellcheck/spellcheck')
+local cursors = require('plugins/vis-cursors')
+cursors.cursors_path = string.format('%s/vis/cursors',
+ os.getenv('XDG_DATA_HOME') or
+ os.getenv('HOME').."/.local/share")
+require('plugins/vis-spellcheck')
require('plugins/vis-commentary/vis-commentary')
require('plugins/vis-ctags/ctags')
-- This hooks vis.events.START so its fine to load it before the default settings
require('plugins/vis-modelines/vis-modelines')
+local lspc = require('plugins/vis-lspc')
+if next(lspc) then
+ lspc.logging = true
+ lspc.ls_map.lua = {name = 'lua', cmd = 'lua-language-server'}
+end
+require('plugins/vis-fzf-open')
require('plugins/suw')
vis.events.subscribe(vis.events.INIT, function()
@@ -54,35 +63,8 @@ end)
-- load plugins that hook WIN_OPEN to change settings after hook with default settings
require('plugins/vis-editorconfig')
-vis:command_register("fzf", function(argv, force, cur_win, selection, range)
- local out = io.popen("fzf"):read()
- if out then
- if argv[1] then
- vis:command(string.format('e "%s"', out))
- -- should e return false when failed
- else
- vis:command(string.format('open "%s"', out))
- end
- vis:feedkeys("<vis-redraw>")
- end
-end)
-
-vis:map(vis.modes.NORMAL, ";l", function()
- vis:command('fzf')
-end)
-
vis:map(vis.modes.NORMAL, ";o", function()
- vis:command('fzf true')
+ vis:command('fzf')
end)
vis:map(vis.modes.NORMAL, ";;", "<vis-window-next>")
-
---vis.events.subscribe(vis.events.FILE_SAVE_PRE, function(file)
- ---- purge trailing whitespace
- --local i = 1
- --while i <= #file.lines do
- --file.lines[i] = file.lines[i]:match("(.-)%s*$")
- --i = i + 1
- --end
- --return true
---end)