mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-13 14:42:58 +01:00
update a bunch of nvim stuff
This commit is contained in:
parent
b6e49ded57
commit
70d7fa533a
5 changed files with 34 additions and 1 deletions
|
@ -11,5 +11,5 @@ export CXX=clang++
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
export PATH="$HOME/.cargo/bin:$HOME/.local/bin:$HOME/go/bin:$PATH"
|
export PATH="$HOME/.mix/escripts:$HOME/.cargo/bin:$HOME/.local/bin:$HOME/go/bin:$PATH"
|
||||||
export LUA_CPATH="$HOME/.local/lib/lua/?.so;$HOME/.local/lib/lua/?.lua;;"
|
export LUA_CPATH="$HOME/.local/lib/lua/?.so;$HOME/.local/lib/lua/?.lua;;"
|
||||||
|
|
|
@ -4,3 +4,4 @@ require "plugins"
|
||||||
require "settings"
|
require "settings"
|
||||||
require "maps"
|
require "maps"
|
||||||
require "neovide"
|
require "neovide"
|
||||||
|
require "pipe"
|
||||||
|
|
27
.config/nvim/lua/pipe.lua
Normal file
27
.config/nvim/lua/pipe.lua
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
-- https://gist.github.com/ii14/c5d6c39c1bc7b8553afe76db3350c043
|
||||||
|
-- :! replacement that supports char-wise selection
|
||||||
|
-- from visual mode :Pipe <command>
|
||||||
|
vim.api.nvim_create_user_command('Pipe', function(ctx)
|
||||||
|
local ms = vim.api.nvim_buf_get_mark(0, '<')
|
||||||
|
local me = vim.api.nvim_buf_get_mark(0, '>')
|
||||||
|
local mt = vim.fn.visualmode()
|
||||||
|
if mt == '\22' then
|
||||||
|
error 'blockwise selection not supported'
|
||||||
|
end
|
||||||
|
|
||||||
|
local lines = vim.api.nvim_buf_get_lines(0, ms[1] - 1, me[1], true)
|
||||||
|
local input = vim.deepcopy(lines)
|
||||||
|
if mt == 'v' then
|
||||||
|
input[#input] = input[#input]:sub(1, me[2] + 1)
|
||||||
|
input[1] = input[1]:sub(ms[2] + 1)
|
||||||
|
end
|
||||||
|
local output = vim.fn.systemlist(ctx.args, input)
|
||||||
|
if #output == 0 then
|
||||||
|
output = {''}
|
||||||
|
end
|
||||||
|
if mt == 'v' then
|
||||||
|
output[#output] = output[#output] .. lines[#lines]:sub(me[2] + 2)
|
||||||
|
output[1] = lines[#lines]:sub(1, ms[2]) .. output[1]
|
||||||
|
end
|
||||||
|
vim.api.nvim_buf_set_lines(0, ms[1] - 1, me[1], true, output)
|
||||||
|
end, { range = true, nargs = '+', complete = 'shellcmd' })
|
|
@ -12,6 +12,10 @@ table.insert(lua_runtime_path, "lua/?/init.lua")
|
||||||
|
|
||||||
lspc.clangd.setup { capabilities = caps }
|
lspc.clangd.setup { capabilities = caps }
|
||||||
lspc.cssls.setup { capabilities = caps }
|
lspc.cssls.setup { capabilities = caps }
|
||||||
|
lspc.elixirls.setup {
|
||||||
|
capabilities = caps,
|
||||||
|
cmd = { "elixir-ls" },
|
||||||
|
}
|
||||||
lspc.eslint.setup { capabilities = caps }
|
lspc.eslint.setup { capabilities = caps }
|
||||||
lspc.haxe_language_server.setup { capabilities = caps }
|
lspc.haxe_language_server.setup { capabilities = caps }
|
||||||
lspc.html.setup { capabilities = caps }
|
lspc.html.setup { capabilities = caps }
|
||||||
|
|
1
justfile
1
justfile
|
@ -1,4 +1,5 @@
|
||||||
lsps := "
|
lsps := "
|
||||||
|
elixir-ls-git
|
||||||
eslint
|
eslint
|
||||||
lua-language-server
|
lua-language-server
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
|
|
Loading…
Reference in a new issue