dotfiles
bugabingas dorkfiles
owned by bugabinga
nushell: struggeling with linux system PATH. such a mees. much wow
fda47e6cfd078446567092ca5374a41d40f78c77
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (10)
environment.d/package.conf
Addednew file mode 100644 1 +PATH =
"$PATH:/home/oli/Packages/Binaries" 59 59 [
url "git@github.com:"]
60 + insteadOf
= "github:" neovim/lua/bugabinga/java.lua
Modified241 241 [
'language/status'] =
function(_, status)
242 242 if status.message
== 'ServiceReady' and jdtls_ss_id
~= nil then 243 + vim.notify(
'Stopping jdtls_ss: ' .. jdtls_ss_id)
243 244 vim.lsp.stop_client(jdtls_ss_id,
true)
255 256 description
= 'Starts jdlts (with syntax mode initially)',
256 257 command = function()
257 258 local path
= vim.api.nvim_buf_get_name(
0)
258 260 jdtls_ss_id
= vim.lsp.start(create_config(
true, path))
259 - puk
'jdtls'.start_or_attach(create_config(
false, path))
neovim/lua/bugabinga/treesitter.lua
Modified 6 6 require 'bugabinga.health'.add_dependency
7 7 {
name_of_executable =
'zig' }
8 - {
name =
'TreeSitter CLI',
name_of_executable =
'tree-sitter' }
9 - {
name_of_executable =
'tar' }
10 - {
name_of_executable =
'curl' }
8 + {
name =
'TreeSitter CLI',
name_of_executable =
'tree-sitter' }
9 + {
name_of_executable =
'tar' }
10 + {
name_of_executable =
'curl' }
12 12 local treesitter
= puk
'nvim-treesitter' 13 13 treesitter.setup {}
16 16 description
= 'Try loading a treesitter parser, if available.',
17 17 events
= 'FileType',
19 - command = function ( data )
19 + command = function(data)
20 20 local match
= data.match
21 21 if match
== 'text' then return end 22 - if table.contains( ignored.filetypes, match )
then 23 - vim.notify(
'Ignore ' .. match
.. ' for treesitter.', vim.log.levels.TRACE )
22 + if table.contains(ignored.filetypes, match)
then 23 + vim.notify(
'Ignore ' .. match
.. ' for treesitter.', vim.log.levels.TRACE)
26 - local ok, err
= pcall( vim.treesitter.start )
26 + local ok, err
= pcall(vim.treesitter.start)
28 28 local available
= require 'nvim-treesitter.parsers' 29 29 local potential_parser
= available[match]
30 30 if potential_parser
then 31 - vim.notify(
'Found potential treesitter parser for current filetype. Trying to install it. ' .. match )
32 - vim.cmd.TSInstall( match )
33 - require 'nvim-treesitter.install'.install( match, {
force =
false },
function ()
31 + vim.notify(
'Found potential treesitter parser for current filetype. Trying to install it. ' .. match)
32 + vim.cmd.TSInstall(match)
33 + require 'nvim-treesitter.install'.install(match, {
force =
false },
function()
34 34 vim.treesitter.start()
38 - vim.notify( err, vim.log.levels.ERROR )
38 + vim.notify(err, vim.log.levels.ERROR)
43 43 vim.wo.foldexpr
= 'v:lua.vim.treesitter.foldexpr()' 47 +auto
'install_asciidoc_parser' {
48 + description =
"Install asciidoc parser into nvim-treesitter",
50 + pattern =
'TSUpdate',
51 + command =
function()
52 + require(
'nvim-treesitter.parsers').asciidoc
= {
54 + url =
'https://github.com/cathaysia/tree-sitter-asciidoc',
55 + revision =
"5b6ccea9953b939959f447f7bfea699ae6968a99",
57 + location =
'tree-sitter-asciidoc',
59 + generate_from_json =
false,
60 + queries =
'queries/asciidoc',
neovim/lua/std/ignored.lua
Modifiednushell/modules/package/environment_path.nu
Deleteddeleted file mode 100644 6 -export def --env set-system-path [] {
7 - let bin = (folders binaries)
8 - match $nu.os-info.family {
10 - if (
$env.PATH | find
$bin | is-empty) {
11 - let envd = [
$nu.home-dir .config environment.d] | path join
12 - if(not (
$envd | path exists)) {
13 - error make {msg: $
"systemd environment.d must exist under ($envd)!"}
15 - let packgage_path = $
'PATH = "$PATH:($bin)"' 16 - $packgage_path | save --raw ([
$envd package.conf] | path join)
17 - $env | upsert PATH
$bin 21 - if (
$env.Path | find
$bin | is-empty ) {
23 - $newPath = [Environment]::GetEnvironmentVariable\(\"Path\", \"User\"\) + \";(
$bin)\"
24 - [Environment]::SetEnvironmentVariable\(\
"Path\", $newPath, \"User\"\)" 25 - run-external powershell
'-EncodedCommand' (
$ps_command | endode base64)
26 - $env | upsert Path
$bin nushell/modules/package/installer.nu
Modified 12 16 export def install [
nushell/modules/package/os_path.nu
Addednew file mode 100644 6 +export def --env setup-system-path [] {
7 + let bin = (folders binaries)
8 + match $nu.os-info.family {
10 + if (
$env.PATH | find
$bin | is-empty) {
11 + let envd = [
$nu.home-path .config environment.d] | path join
12 + if (not (
$envd | path exists)) {
13 + error make {msg: $
"systemd environment.d must exist under ($envd)!"}
15 + let package_conf = [
$envd package.conf] | path join
16 + if (not (
$package_conf | path exists)) {
17 + let packgage_path = $
'PATH = "$PATH:($bin)"' 18 + $packgage_path | save --raw (
$package_conf)
19 + $env | upsert PATH
$bin 24 + if (
$env.Path | find
$bin | is-empty ) {
26 + $newPath = [Environment]::GetEnvironmentVariable\(\"Path\", \"User\"\) + \";(
$bin)\"
27 + [Environment]::SetEnvironmentVariable\(\
"Path\", $newPath, \"User\"\)" 28 + run-external powershell
'-EncodedCommand' (
$ps_command | endode base64)
29 + $env | upsert Path
$bin nushell/modules/package/provider.nu
Modified11 -use ./environment_path.nu
14 14 export def provision [] {
46 - environment_path setup
43 + os_path setup-system-path
wezterm/bugabinga/launch.lua
Modified 2 2 local wez
= require 'wezterm' 4 4 return function ( cfg )
7 + label =
'Anime (new)',
8 + args = {
'nu',
'--execute',
'ani-cli --skip'},
12 + label =
'Anime (continue)',
13 + args = {
'nu',
'--execute',
'ani-cli --skip --continue'},
8 18 args = {
'topgrade', },