[feat] Add carapace completer
This commit is contained in:
@@ -1,40 +1,17 @@
|
|||||||
Config(
|
Config(
|
||||||
// `width` and `vertical_offset` use an enum for the value it can be either:
|
width: Absolute(1000),
|
||||||
// Absolute(n): The absolute value in pixels
|
height: Absolute(0),
|
||||||
// Fraction(n): A fraction of the width or height of the full screen (depends on exclusive zones and the settings related to them) window respectively
|
|
||||||
|
|
||||||
// How wide the input box and results are.
|
|
||||||
width: Absolute(1000),
|
|
||||||
|
|
||||||
// Where Anyrun is located on the screen: Top, Center
|
|
||||||
position: Center,
|
|
||||||
|
|
||||||
// How much the runner is shifted vertically
|
x: Fraction(0.5),
|
||||||
vertical_offset: Absolute(-200),
|
y: Fraction(0.3),
|
||||||
|
|
||||||
// Hide match and plugin info icons
|
hide_icons: false,
|
||||||
hide_icons: false,
|
ignore_exclusive_zones: false,
|
||||||
|
layer: Overlay,
|
||||||
// ignore exclusive zones, f.e. Waybar
|
hide_plugin_info: false,
|
||||||
ignore_exclusive_zones: false,
|
|
||||||
|
|
||||||
// Layer shell layer: Background, Bottom, Top, Overlay
|
|
||||||
layer: Overlay,
|
|
||||||
|
|
||||||
// Hide the plugin info panel
|
|
||||||
hide_plugin_info: false,
|
|
||||||
|
|
||||||
// Close window when a click outside the main box is received
|
|
||||||
close_on_click: false,
|
close_on_click: false,
|
||||||
|
|
||||||
// Show search results immediately when Anyrun starts
|
|
||||||
show_results_immediately: false,
|
show_results_immediately: false,
|
||||||
|
|
||||||
// Limit amount of entries shown in total
|
|
||||||
max_entries: None,
|
max_entries: None,
|
||||||
|
|
||||||
// List of plugins to be loaded by default, can be specified with a relative path to be loaded from the
|
|
||||||
// `<anyrun config dir>/plugins` directory or with an absolute path to just load the file the path points to.
|
|
||||||
plugins: [
|
plugins: [
|
||||||
"libhyprwin.so",
|
"libhyprwin.so",
|
||||||
"librink.so",
|
"librink.so",
|
||||||
|
|||||||
@@ -10,3 +10,4 @@ export CARGO_TARGET_DIR="$HOME/.local/share/cargo-target"
|
|||||||
# The next line updates PATH for the Google Cloud SDK.
|
# The next line updates PATH for the Google Cloud SDK.
|
||||||
if [ -f '/Users/fs0c131y/Projects/gcloud/google-cloud-sdk/path.fish.inc' ]; . '/Users/fs0c131y/Projects/gcloud/google-cloud-sdk/path.fish.inc'; end
|
if [ -f '/Users/fs0c131y/Projects/gcloud/google-cloud-sdk/path.fish.inc' ]; . '/Users/fs0c131y/Projects/gcloud/google-cloud-sdk/path.fish.inc'; end
|
||||||
|
|
||||||
|
alias rebuds="bluetoothctl remove XX:XX:XX:XX:XX:XX; bluetoothctl scan on;bluetoothctl pair XX:XX:XX:XX:XX:XX; bluetoothctl connect XX:XX:XX:XX:XX:XX"
|
||||||
|
|||||||
@@ -1,37 +1,37 @@
|
|||||||
# Nushell Config File
|
# Nushell Config File
|
||||||
|
|
||||||
let fish_completer = {|spans|
|
# let fish_completer = {|spans|
|
||||||
fish --command $'complete "--do-complete=($spans | str join " ")"'
|
# fish --command $'complete "--do-complete=($spans | str join " ")"'
|
||||||
| $"value(char tab)description(char newline)" + $in
|
# | $"value(char tab)description(char newline)" + $in
|
||||||
| from tsv --flexible --no-infer
|
# | from tsv --flexible --no-infer
|
||||||
}
|
# }
|
||||||
|
|
||||||
let carapace_completer = {|spans: list<string>|
|
# let carapace_completer = {|spans: list<string>|
|
||||||
carapace $spans.0 nushell ...$spans
|
# carapace $spans.0 nushell ...$spans
|
||||||
| from json
|
# | from json
|
||||||
| if ($in | default [] | where value =~ '^-.*ERR$' | is-empty) { $in } else { null }
|
# | if ($in | default [] | where value =~ '^-.*ERR$' | is-empty) { $in } else { null }
|
||||||
}
|
# }
|
||||||
|
|
||||||
# This completer will use carapace by default
|
# # This completer will use carapace by default
|
||||||
let external_completer = {|spans|
|
# let external_completer = {|spans|
|
||||||
let expanded_alias = scope aliases
|
# let expanded_alias = scope aliases
|
||||||
| where name == $spans.0
|
# | where name == $spans.0
|
||||||
| get -i 0.expansion
|
# | get -i 0.expansion
|
||||||
|
|
||||||
let spans = if $expanded_alias != null {
|
# let spans = if $expanded_alias != null {
|
||||||
$spans
|
# $spans
|
||||||
| skip 1
|
# | skip 1
|
||||||
| prepend ($expanded_alias | split row ' ')
|
# | prepend ($expanded_alias | split row ' ')
|
||||||
} else {
|
# } else {
|
||||||
$spans
|
# $spans
|
||||||
}
|
# }
|
||||||
|
|
||||||
match $spans.0 {
|
# match $spans.0 {
|
||||||
nu => $fish_completer
|
# nu => $fish_completer
|
||||||
git => $fish_completer
|
# git => $fish_completer
|
||||||
_ => $carapace_completer
|
# _ => $carapace_completer
|
||||||
} | do $in $spans
|
# } | do $in $spans
|
||||||
}
|
# }
|
||||||
|
|
||||||
# For more information on themes, see
|
# For more information on themes, see
|
||||||
# https://www.nushell.sh/book/coloring_and_theming.html
|
# https://www.nushell.sh/book/coloring_and_theming.html
|
||||||
@@ -293,7 +293,7 @@ $env.config = {
|
|||||||
external: {
|
external: {
|
||||||
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow
|
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow
|
||||||
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
|
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
|
||||||
completer: $external_completer
|
# completer: $external_completer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
filesize: {
|
filesize: {
|
||||||
@@ -557,6 +557,7 @@ $env.config = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
source ~/.cache/carapace/init.nu
|
||||||
source starship.nu
|
source starship.nu
|
||||||
source zoxide.nu
|
source zoxide.nu
|
||||||
source alias.nu
|
source alias.nu
|
||||||
|
|||||||
@@ -84,3 +84,7 @@ if ($os | str contains Windows) {
|
|||||||
$env.PATH = ($env.PATH | prepend $"($env.HOME)/.local/vcpkg")
|
$env.PATH = ($env.PATH | prepend $"($env.HOME)/.local/vcpkg")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$env.CARAPACE_BRIDGES = 'zsh,fish,bash,inshellisense' # optional
|
||||||
|
mkdir ~/.cache/carapace
|
||||||
|
carapace _carapace nushell | save --force ~/.cache/carapace/init.nu
|
||||||
|
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
register /Users/fs0c131y/.local/bin/nu_plugin_from_agp {
|
|
||||||
"sig": {
|
|
||||||
"name": "from agp",
|
|
||||||
"usage": "Parse text as agprefs and create a table.",
|
|
||||||
"extra_usage": "",
|
|
||||||
"search_terms": [],
|
|
||||||
"required_positional": [],
|
|
||||||
"optional_positional": [],
|
|
||||||
"rest_positional": null,
|
|
||||||
"named": [
|
|
||||||
{
|
|
||||||
"long": "help",
|
|
||||||
"short": "h",
|
|
||||||
"arg": null,
|
|
||||||
"required": false,
|
|
||||||
"desc": "Display the help message for this command",
|
|
||||||
"var_id": null,
|
|
||||||
"default_value": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"input_output_types": [
|
|
||||||
[
|
|
||||||
"String",
|
|
||||||
{
|
|
||||||
"Table": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"allow_variants_without_examples": false,
|
|
||||||
"is_filter": false,
|
|
||||||
"creates_scope": false,
|
|
||||||
"allows_unknown_args": false,
|
|
||||||
"category": "Formats"
|
|
||||||
},
|
|
||||||
"examples": []
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"comfortable-motion.vim": { "branch": "master", "commit": "e20aeafb07c6184727b29f7674530150f7ab2036" },
|
"comfortable-motion.vim": { "branch": "master", "commit": "e20aeafb07c6184727b29f7674530150f7ab2036" },
|
||||||
"copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" },
|
"copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" },
|
||||||
"copilot.lua": { "branch": "master", "commit": "b03617a6dc4bc88b65ab5deac1631da9a9c2dcaf" },
|
"copilot.lua": { "branch": "master", "commit": "71382c2efec76647287d46a4fbe0ec8c9809e2ee" },
|
||||||
"d2-vim": { "branch": "master", "commit": "981c87dccb63df2887cc41b96e84bf550f736c57" },
|
"d2-vim": { "branch": "master", "commit": "981c87dccb63df2887cc41b96e84bf550f736c57" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
|
"diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "1d1042d418ee8cb70d68f1e38db639844331c093" },
|
"fidget.nvim": { "branch": "main", "commit": "1d1042d418ee8cb70d68f1e38db639844331c093" },
|
||||||
@@ -26,13 +26,13 @@
|
|||||||
"mini.nvim": { "branch": "main", "commit": "b5645ac6eefce8e7af9d7dd4e5e296a81cba8a10" },
|
"mini.nvim": { "branch": "main", "commit": "b5645ac6eefce8e7af9d7dd4e5e296a81cba8a10" },
|
||||||
"neorg": { "branch": "main", "commit": "e6d89d333aff65a771a98955fac9fc178345c01c" },
|
"neorg": { "branch": "main", "commit": "e6d89d333aff65a771a98955fac9fc178345c01c" },
|
||||||
"no-neck-pain.nvim": { "branch": "main", "commit": "fc3cc9012d9720aca3203702447caa59bd93f1a6" },
|
"no-neck-pain.nvim": { "branch": "main", "commit": "fc3cc9012d9720aca3203702447caa59bd93f1a6" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "9adbfdca13afbe646d09a8d7a86d5d031fb9c5a5" },
|
"nvim-dap": { "branch": "master", "commit": "9adbfdca13afbe646d09a8d7a86d5d031fb9c5a5" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "d845ebd798ad1cf30aa4abd4c4eff795cdcfdd4f" },
|
"nvim-dap-ui": { "branch": "master", "commit": "d845ebd798ad1cf30aa4abd4c4eff795cdcfdd4f" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "1759ea68fbbb1303192020d3e59936189359e0ed" },
|
"nvim-lspconfig": { "branch": "master", "commit": "ac530dfb97e51d82e3b0a7cddbf7a4a7c4c10ff8" },
|
||||||
"nvim-nu": { "branch": "main", "commit": "f45f36a97fb0ea6e39f08cc2fac7a2fb3dc3999b" },
|
"nvim-nu": { "branch": "main", "commit": "f45f36a97fb0ea6e39f08cc2fac7a2fb3dc3999b" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "364b86ec8ea88e4a77ba676b93fb10829d6a9cb3" },
|
"nvim-treesitter": { "branch": "master", "commit": "95125827758ee49a398cce05750dc9563ee3a23d" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "9c06b115abc57c99cf0aa81dc29490f5001f57a1" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "9c06b115abc57c99cf0aa81dc29490f5001f57a1" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "aaec87dbdaa776bfa0a13c8694bec9bcb7454719" },
|
"nvim-web-devicons": { "branch": "master", "commit": "aaec87dbdaa776bfa0a13c8694bec9bcb7454719" },
|
||||||
"octo.nvim": { "branch": "master", "commit": "f8db415529f0a28f62484e49e3518b48e2b76644" },
|
"octo.nvim": { "branch": "master", "commit": "f8db415529f0a28f62484e49e3518b48e2b76644" },
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
"symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" },
|
"symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "e54fbf4ab2b64640b639b75c006c23b4bc51c86f" },
|
"telescope.nvim": { "branch": "master", "commit": "7b5c5f56a21e82fdcfe5b250278b8dfc4b1cbab4" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
|
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "b49df5cdce67a8964d1b027dae94bde212092b51" },
|
"toggleterm.nvim": { "branch": "main", "commit": "b49df5cdce67a8964d1b027dae94bde212092b51" },
|
||||||
"tree-sitter-just": { "branch": "main", "commit": "4f5d53b52a65771f9695df3f1a294d5c80b916fb" },
|
"tree-sitter-just": { "branch": "main", "commit": "4f5d53b52a65771f9695df3f1a294d5c80b916fb" },
|
||||||
|
|||||||
@@ -97,11 +97,18 @@ return require('lazy').setup({
|
|||||||
load = {
|
load = {
|
||||||
["core.defaults"] = {}, -- Loads default behaviour
|
["core.defaults"] = {}, -- Loads default behaviour
|
||||||
["core.concealer"] = {}, -- Adds pretty icons to your documents
|
["core.concealer"] = {}, -- Adds pretty icons to your documents
|
||||||
["core.dirman"] = { -- Manages Neorg workspaces
|
["core.completion"] = {
|
||||||
|
config = {
|
||||||
|
engine = "nvim-cmp",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["core.dirman"] = { -- Manages Neorg workspaces
|
||||||
config = {
|
config = {
|
||||||
workspaces = {
|
workspaces = {
|
||||||
notes = "~/Documents/norg",
|
notes = "~/Documents/norg",
|
||||||
},
|
},
|
||||||
|
default_workspace = "general",
|
||||||
|
index = "index.norg"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -470,6 +477,47 @@ return require('lazy').setup({
|
|||||||
dependencies = { "mfussenegger/nvim-dap" },
|
dependencies = { "mfussenegger/nvim-dap" },
|
||||||
config = function() require("dapui").setup() end
|
config = function() require("dapui").setup() end
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
-- event = "LspAttach",
|
||||||
|
config = function()
|
||||||
|
local dap = require('dap')
|
||||||
|
local registry = require('mason-registry').get_package("codelldb");
|
||||||
|
local codelldb = registry:get_install_path() .. "/codelldb"
|
||||||
|
dap.adapters.codelldb = {
|
||||||
|
type = 'server',
|
||||||
|
port = "${port}",
|
||||||
|
executable = {
|
||||||
|
-- CHANGE THIS to your path!
|
||||||
|
command = codelldb,
|
||||||
|
args = { "--port", "${port}" },
|
||||||
|
|
||||||
|
-- On windows you may have to uncomment this:
|
||||||
|
-- detached = false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
local program = function()
|
||||||
|
return vim.ui.select({
|
||||||
|
}, {
|
||||||
|
prompt = "Select program to debug: ",
|
||||||
|
format_item = function(item)
|
||||||
|
return item
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
dap.configurations.rust = {
|
||||||
|
{
|
||||||
|
name = "Launch Rust (CODELLDB)",
|
||||||
|
type = "codelldb",
|
||||||
|
request = "launch",
|
||||||
|
program = program,
|
||||||
|
cwd = '${workspaceFolder}',
|
||||||
|
stopOnEntry = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
},
|
||||||
-- {
|
-- {
|
||||||
-- 'phaazon/hop.nvim',
|
-- 'phaazon/hop.nvim',
|
||||||
-- branch = 'v2', -- optional but strongly recommended
|
-- branch = 'v2', -- optional but strongly recommended
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
-- local extension_path = vim.env.HOME .. '/.vscode/extensions/vadimcn.vscode-lldb-1.7.0'
|
-- local extension_path = vim.env.HOME .. '/.vscode/extensions/vadimcn.vscode-lldb-1.7.0'
|
||||||
-- local codelldb_path = extension_path .. 'adapter/codelldb'
|
-- local codelldb_path = extension_path .. 'adapter/codelldb'
|
||||||
-- local liblldb_path = extension_path .. 'lldb/lib/liblldb.dylib'
|
-- local liblldb_path = extension_path .. 'lldb/lib/liblldb.dylib'
|
||||||
local codelldb_path = '/Users/fs0c131y/.vscode-oss/extensions/vadimcn.vscode-lldb-1.8.1-universal/adapter/codelldb'
|
-- local codelldb_path = '/Users/fs0c131y/.vscode-oss/extensions/vadimcn.vscode-lldb-1.8.1-universal/adapter/codelldb'
|
||||||
local liblldb_path = '/Users/fs0c131y/.vscode-oss/extensions/vadimcn.vscode-lldb-1.8.1-universal/lldb/lib/liblldb.dylib'
|
-- local liblldb_path = '/Users/fs0c131y/.vscode-oss/extensions/vadimcn.vscode-lldb-1.8.1-universal/lldb/lib/liblldb.dylib'
|
||||||
local lspstatus = require('lsp-status')
|
local lspstatus = require('lsp-status')
|
||||||
-- local lsp_signature = require('lsp_signature')
|
-- local lsp_signature = require('lsp_signature')
|
||||||
|
|
||||||
@@ -62,6 +62,8 @@ vim.g.rustaceanvim = {
|
|||||||
-- },
|
-- },
|
||||||
-- },
|
-- },
|
||||||
-- -- DAP configuration
|
-- -- DAP configuration
|
||||||
-- dap = {},
|
},
|
||||||
|
dap = {
|
||||||
|
autoload_configurations = false
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user