Refractored Plugin Config
This commit is contained in:
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,4 +0,0 @@
|
||||
[submodule "pack/plugins/start/nvim-treesitter"]
|
||||
path = pack/plugins/start/nvim-treesitter
|
||||
url = https://github.com/nvim-treesitter/nvim-treesitter
|
||||
branch = master
|
||||
|
||||
32
init.lua
32
init.lua
@@ -3,7 +3,7 @@ vim.api.nvim_exec2('language POSIX', {})
|
||||
-- }}}
|
||||
|
||||
-- Source plugins if they exist {{{
|
||||
pcall(require, 'plugins')
|
||||
pcall(require, 'treesitter')
|
||||
-- }}}
|
||||
|
||||
-- General Editor Settings {{{
|
||||
@@ -15,8 +15,6 @@ vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = false
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars:append 'space:·'
|
||||
vim.opt.path:append '**'
|
||||
vim.opt.path:append '.'
|
||||
vim.opt.wildmenu = true
|
||||
vim.opt.wrap = false
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
@@ -50,34 +48,6 @@ end, { nargs = 1 })
|
||||
vim.opt.statusline = ' #%n %f %h%w%m%r %= %y %l:%c %p%% '
|
||||
-- }}}
|
||||
|
||||
-- FilePicker Script {{{
|
||||
local function get_list_completion(arg_lead, cmdline, cur_pos)
|
||||
local cmdout = ''
|
||||
if (arg_lead == '') then
|
||||
cmdout = vim.trim(io.popen('rg --files'):read('*a'))
|
||||
else
|
||||
local tmp = arg_lead:gsub('\\', '\\\\')
|
||||
cmdout = vim.trim(io.popen('rg --files | rg ' .. tmp):read('*a'))
|
||||
end
|
||||
return vim.split(cmdout, '\n')
|
||||
end
|
||||
|
||||
local function cmd_handler(opts)
|
||||
if vim.tbl_count(opts.fargs) == 0 then
|
||||
return
|
||||
end
|
||||
for _, arg in ipairs(opts.fargs) do
|
||||
vim.cmd.edit({args = {arg}})
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_user_command(
|
||||
'FilePick',
|
||||
cmd_handler,
|
||||
{ complete = get_list_completion, nargs = 1, force = true }
|
||||
)
|
||||
-- }}}
|
||||
|
||||
-- Toggle Terminal Script {{{
|
||||
local term_buf = nil
|
||||
local term_winid = nil
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
require('treesitter')
|
||||
Submodule pack/plugins/start/nvim-treesitter deleted from 42fc28ba91
Reference in New Issue
Block a user