[kitty|nvim] Replace kitty-scrollback plugin with simplier solution
- Also clean up nvim config
This commit is contained in:
1 parent
44795fb3f9
commit
6c096f15ee
10 files changed
+140
-22
No files matched your search
@@ -41,10 +41,6 @@ close_on_child_death no
|
|||||||
allow_hyperlinks yes
|
allow_hyperlinks yes
|
||||||
enabled_layouts splits
|
enabled_layouts splits
|
||||||
|
|
||||||
allow_remote_control socket-only
|
|
||||||
listen_on unix:/tmp/kitty
|
|
||||||
shell_integrated enabled
|
|
||||||
|
|
||||||
# Keymaps
|
# Keymaps
|
||||||
map ctrl+a>q close_window
|
map ctrl+a>q close_window
|
||||||
map ctrl+a>minus launch --location=hsplit
|
map ctrl+a>minus launch --location=hsplit
|
||||||
@@ -66,12 +62,5 @@ map ctrl+a>up resize_window taller
|
|||||||
map ctrl+a>down resize_window shorter 3
|
map ctrl+a>down resize_window shorter 3
|
||||||
map ctrl+a>home resize_window reset
|
map ctrl+a>home resize_window reset
|
||||||
|
|
||||||
# Kittens
|
env read_from_login_shell=NVIM_APPNAME
|
||||||
# kitty-scrollback.nvim Kitten alias
|
map ctrl+a>y launch --type=overlay --env NVIM_APPNAME=${NVIM_APPNAME} --stdin-source=@screen_scrollback nvim -c 'nnoremap <silent> y "+y:qa!<CR>' -c 'nnoremap <silent> Y "+Y:qa!<CR>' -c 'vnoremap <silent> y "+y:qa!<CR>' -c 'nnoremap <silent> q :qa!<CR>' -c 'normal! G' -
|
||||||
action_alias kitty_scrollback_nvim kitten '/home/benq/.local/share/nvim/benq/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py'
|
|
||||||
# Browse scrollback buffer in nvim
|
|
||||||
map kitty_mod+h kitty_scrollback_nvim
|
|
||||||
# Browse output of the last shell command in nvim
|
|
||||||
map kitty_mod+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output
|
|
||||||
# Show clicked command output in nvim
|
|
||||||
mouse_map ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
workspace = {
|
||||||
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
cmd = {
|
||||||
|
'roslyn-language-server',
|
||||||
|
'--logLevel',
|
||||||
|
'Information',
|
||||||
|
'--extensionLogDirectory',
|
||||||
|
vim.fs.joinpath(vim.uv.os_tmpdir(), 'roslyn_ls/logs'),
|
||||||
|
'--stdio',
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
cmd = {
|
||||||
|
'roslyn-language-server',
|
||||||
|
'--logLevel',
|
||||||
|
'Information',
|
||||||
|
'--extensionLogDirectory',
|
||||||
|
vim.fs.joinpath(vim.uv.os_tmpdir(), 'roslyn_ls/logs'),
|
||||||
|
'--stdio',
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
cmd = {
|
||||||
|
'roslyn-language-server',
|
||||||
|
'--logLevel',
|
||||||
|
'Information',
|
||||||
|
'--extensionLogDirectory',
|
||||||
|
vim.fs.joinpath(vim.uv.os_tmpdir(), 'roslyn_ls/logs'),
|
||||||
|
'--stdio',
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
local vue_language_server_path = vim.fn.expand("~/.local/lib/node_modules/@vue/language-server")
|
||||||
|
|
||||||
|
return {
|
||||||
|
cmd = { "vtsls", "--stdio" },
|
||||||
|
init_options = {
|
||||||
|
hostInfo = "neovim",
|
||||||
|
},
|
||||||
|
filetypes = {
|
||||||
|
"javascript",
|
||||||
|
"javascriptreact",
|
||||||
|
"typescript",
|
||||||
|
"typescriptreact",
|
||||||
|
"vue",
|
||||||
|
},
|
||||||
|
root_dir = function(bufnr, on_dir)
|
||||||
|
-- The project root is where the LSP can be started from
|
||||||
|
-- As stated in the documentation above, this LSP supports monorepos and simple projects.
|
||||||
|
-- We select then from the project root, which is identified by the presence of a package
|
||||||
|
-- manager lock file.
|
||||||
|
local root_markers = { "package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock" }
|
||||||
|
-- Give the root markers equal priority by wrapping them in a table
|
||||||
|
root_markers = vim.fn.has("nvim-0.11.3") == 1 and { root_markers, { ".git" } }
|
||||||
|
or vim.list_extend(root_markers, { ".git" })
|
||||||
|
-- exclude deno
|
||||||
|
local deno_root = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" })
|
||||||
|
local deno_lock_root = vim.fs.root(bufnr, { "deno.lock" })
|
||||||
|
local project_root = vim.fs.root(bufnr, root_markers)
|
||||||
|
if deno_lock_root and (not project_root or #deno_lock_root > #project_root) then
|
||||||
|
-- deno lock is closer than package manager lock, abort
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if deno_root and (not project_root or #deno_root >= #project_root) then
|
||||||
|
-- deno config is closer than or equal to package manager lock, abort
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- project is standard TS, not deno
|
||||||
|
-- We fallback to the current working directory if no project root is found
|
||||||
|
on_dir(project_root or vim.fn.getcwd())
|
||||||
|
end,
|
||||||
|
settings = {
|
||||||
|
vtsls = {
|
||||||
|
tsserver = {
|
||||||
|
globalPlugins = {
|
||||||
|
{
|
||||||
|
name = "@vue/typescript-plugin",
|
||||||
|
location = vue_language_server_path,
|
||||||
|
languages = { "vue" },
|
||||||
|
configNamespace = "typescript",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
return {
|
||||||
|
settings = {
|
||||||
|
["csharp|background_analysis"] = {
|
||||||
|
dotnet_analyzer_diagnostics_scope = "fullSolution",
|
||||||
|
dotnet_compiler_diagnostics_scope = "fullSolution",
|
||||||
|
},
|
||||||
|
["csharp|inlay_hints"] = {
|
||||||
|
csharp_enable_inlay_hints_for_implicit_object_creation = true,
|
||||||
|
csharp_enable_inlay_hints_for_implicit_variable_types = true,
|
||||||
|
csharp_enable_inlay_hints_for_lambda_parameter_types = true,
|
||||||
|
csharp_enable_inlay_hints_for_types = true,
|
||||||
|
dotnet_enable_inlay_hints_for_indexer_parameters = true,
|
||||||
|
dotnet_enable_inlay_hints_for_literal_parameters = true,
|
||||||
|
dotnet_enable_inlay_hints_for_object_creation_parameters = true,
|
||||||
|
dotnet_enable_inlay_hints_for_other_parameters = true,
|
||||||
|
dotnet_enable_inlay_hints_for_parameters = true,
|
||||||
|
dotnet_suppress_inlay_hints_for_parameters_that_differ_only_by_suffix = true,
|
||||||
|
dotnet_suppress_inlay_hints_for_parameters_that_match_argument_name = true,
|
||||||
|
dotnet_suppress_inlay_hints_for_parameters_that_match_method_intent = true,
|
||||||
|
},
|
||||||
|
["csharp|symbol_search"] = {
|
||||||
|
dotnet_search_reference_assemblies = true,
|
||||||
|
},
|
||||||
|
["csharp|completion"] = {
|
||||||
|
dotnet_show_name_completion_suggestions = true,
|
||||||
|
dotnet_show_completion_items_from_unimported_namespaces = true,
|
||||||
|
dotnet_provide_regex_completions = true,
|
||||||
|
},
|
||||||
|
["csharp|code_lens"] = {
|
||||||
|
dotnet_enable_references_code_lens = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
'mikesmithgh/kitty-scrollback.nvim',
|
|
||||||
enabled = true,
|
|
||||||
version = '^6.0.0',
|
|
||||||
lazy = true,
|
|
||||||
cmd = { 'KittyScrollbackGenerateKittens', 'KittyScrollbackCheckHealth', 'KittyScrollbackGenerateCommandLineEditing' },
|
|
||||||
event = { 'User KittyScrollbackLaunch' },
|
|
||||||
opts = {}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
return {
|
||||||
|
"seblyng/roslyn.nvim",
|
||||||
|
---@module 'roslyn.config'
|
||||||
|
---@type RoslynNvimConfig
|
||||||
|
opts = {},
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
Reference in new issue
Block a user