mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-25 00:38:23 -05:00
Bunch of changes
neovim: add more plugins nushell, xonsh: update startup hook for starship
This commit is contained in:
parent
7889449676
commit
2a62792e2b
@ -1,12 +1,11 @@
|
||||
skip_welcome_message = true
|
||||
startup = [
|
||||
"mkdir ~/.cache/nu",
|
||||
"zoxide init nushell --hook prompt | save ~/.cache/nu/zoxide.nu",
|
||||
"source ~/.cache/nu/zoxide.nu",
|
||||
"starship init nu | save ~/.cache/nu/starship.nu",
|
||||
"source ~/.cache/nu/starship.nu"
|
||||
]
|
||||
prompt = "__zoxide_hook; starship prompt"
|
||||
"zoxide init nushell --hook prompt | save ~/.local/share/nu/zoxide.nu",
|
||||
"source ~/.local/share/nu/zoxide.nu",
|
||||
"starship init nu | save ~/.local/share/nu/starship.nu",
|
||||
"source ~/.local/share/nu/starship.nu"
|
||||
]
|
||||
prompt = "starship_prompt"
|
||||
|
||||
[line_editor]
|
||||
completion_type = "list"
|
||||
|
@ -1,5 +1,3 @@
|
||||
-- Credit: https://github.com/shaunsingh/nord.nvim
|
||||
|
||||
local M = {}
|
||||
|
||||
M.colors = {
|
||||
|
@ -239,6 +239,13 @@ wk.register({
|
||||
|
||||
n = {':NnnPicker %:p:h<CR>', 'File picker'},
|
||||
|
||||
r = {
|
||||
name = 'REST',
|
||||
c = {'<Plug>RestNvim', 'Run request under cursor'},
|
||||
p = {'<Plug>RestNvimPreview', 'Preview request cURL command'},
|
||||
l = {'<Plug>RestNvimLast', 'Re-run last request'}
|
||||
},
|
||||
|
||||
s = {
|
||||
name = 'Find/Replace',
|
||||
o = {':lua require("spectre").open()<CR>', 'Open spectre'},
|
||||
|
@ -69,6 +69,16 @@ function M.treesitter_conf()
|
||||
vim.api.nvim_command('set foldmethod=expr')
|
||||
vim.api.nvim_command('set foldexpr=nvim_treesitter#foldexpr()')
|
||||
|
||||
-- Additional parser for rest.nvim (*.http files)
|
||||
local parser_configs = require('nvim-treesitter.parsers').get_parser_configs()
|
||||
parser_configs.http = {
|
||||
install_info = {
|
||||
url = 'https://github.com/NTBBloodbath/tree-sitter-http',
|
||||
files = { 'src/parser.c' },
|
||||
branch = 'main'
|
||||
}
|
||||
}
|
||||
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = 'maintained',
|
||||
highlight = {enable = true},
|
||||
|
@ -91,6 +91,22 @@ function M.markdown_preview_conf()
|
||||
-- vim.g.mkdp_echo_preview_url = 1
|
||||
end
|
||||
|
||||
function M.rest_conf()
|
||||
require('rest-nvim').setup({
|
||||
-- Open request results in a horizontal split
|
||||
result_split_horizontal = false,
|
||||
-- Skip SSL verification, useful for unknown certificates
|
||||
skip_ssl_verification = false,
|
||||
-- Highlight request on run
|
||||
highlight = {
|
||||
enabled = true,
|
||||
timeout = 150,
|
||||
},
|
||||
-- Jump to request line on run
|
||||
jump_to_request = false,
|
||||
})
|
||||
end
|
||||
|
||||
function M.zenmode_conf()
|
||||
require('zen-mode').setup {
|
||||
window = {
|
||||
|
@ -135,6 +135,11 @@ return require('packer').startup(
|
||||
'editorconfig/editorconfig-vim',
|
||||
ft = {'go', 'rust', 'python', 'c', 'cpp', 'javascript', 'typescript', 'vim', 'zig'}
|
||||
}
|
||||
use { -- TODO: move to nvim-parinfer (lua)
|
||||
'eraserhd/parinfer-rust',
|
||||
run = 'cargo build --release',
|
||||
ft = {'clojure', 'lisp', 'scheme'}
|
||||
}
|
||||
|
||||
---------
|
||||
-- LSP --
|
||||
@ -275,10 +280,7 @@ return require('packer').startup(
|
||||
use {
|
||||
'TimUntersberger/neogit',
|
||||
cmd = 'Neogit',
|
||||
wants = {
|
||||
'diffview.nvim',
|
||||
'plenary.nvim'
|
||||
},
|
||||
wants = {'diffview.nvim', 'plenary.nvim'},
|
||||
requires = {
|
||||
{
|
||||
'sindrets/diffview.nvim',
|
||||
@ -372,13 +374,23 @@ return require('packer').startup(
|
||||
run = 'bash ./install.sh 1',
|
||||
cmd = 'SnipRun'
|
||||
}
|
||||
use {
|
||||
'NTBBloodbath/rest.nvim',
|
||||
keys = {'<Plug>RestNvim', '<Plug>RestNvimPreview', '<Plug>RestNvimLast'},
|
||||
wants = {'plenary.nvim', 'nvim-treesitter'},
|
||||
run = ':TSInstall http',
|
||||
config = tools.rest_conf
|
||||
}
|
||||
-- use { -- TODO: mappings
|
||||
-- 'rktjmp/hotpot.nvim',
|
||||
-- config = function() require('hotpot') end
|
||||
-- }
|
||||
use {
|
||||
'sbdchd/neoformat',
|
||||
cmd = 'Neoformat'
|
||||
}
|
||||
use {'tweekmonster/startuptime.vim', cmd = 'StartupTime'} -- Just for benchmarking
|
||||
|
||||
-- TODO: rest.nvim, parinfer.nvim, conjure, dial.nvim, hotpot.nvim,
|
||||
-- rust-tools.nvim, crates.nvim, go.nvim
|
||||
-- TODO: conjure + cmp-conjure, dial.nvim, rust-tools.nvim, crates.nvim, go.nvim
|
||||
end
|
||||
)
|
||||
|
@ -1,2 +1,2 @@
|
||||
execx($(zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide')
|
||||
execx($(starship init xonsh))
|
||||
execx($(starship init xonsh --print-full-init))
|
||||
|
Loading…
Reference in New Issue
Block a user