1
0

remove bloat

This commit is contained in:
2025-02-16 14:11:58 +01:00
parent 3ff5bf0258
commit e7fcc5a5e3
7 changed files with 314 additions and 300 deletions

View File

@@ -1,4 +1,5 @@
require("ink.remap")
require("ink.lsp")
vim.opt.hlsearch = false -- do not highlight matches
vim.wo.number = true

View File

@@ -0,0 +1,23 @@
-- vim.lsp.config["luals"] = {
-- -- Command and arguments to start the server.
-- cmd = { "lua-language-server" },
-- -- Filetypes to automatically attach to.
-- filetypes = { "lua" },
-- -- Sets the "root directory" to the parent directory of the file in the
-- -- current buffer that contains either a ".luarc.json" or a
-- -- ".luarc.jsonc" file. Files that share a root directory will reuse
-- -- the connection to the same LSP server.
-- root_markers = { ".luarc.json", ".luarc.jsonc" },
-- -- Specific settings to send to the server. The schema for this is
-- -- defined by the server. For example the schema for lua-language-server
-- -- can be found here https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json
-- settings = {
-- Lua = {
-- runtime = {
-- version = "LuaJIT",
-- },
-- },
-- },
-- }
--
-- vim.lsp.enable("luals")

View File

@@ -1,18 +1,4 @@
return {
{ -- highlight and search TODO commends
"folke/todo-comments.nvim",
cmd = { "TodoTrouble", "TodoTelescope" },
opts = {},
-- stylua: ignore
keys = {
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next Todo Comment" },
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous Todo Comment" },
{ "<leader>xt", "<cmd>Trouble todo toggle<cr>", desc = "Todo (Trouble)" },
{ "<leader>xT", "<cmd>Trouble todo toggle filter = {tag = {TODO,FIX,FIXME}}<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
{ "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
},
},
-- keymap helper
{ "folke/which-key.nvim", opts = {} },
{ -- undo tree

View File

@@ -1,286 +1,286 @@
return {
{
"folke/lazydev.nvim",
ft = "lua", -- only load on lua files
opts = {
library = {
-- See the configuration section for more details
-- Load luvit types when the `vim.uv` word is found
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
},
},
},
{
"saghen/blink.cmp",
-- optional: provides snippets for the snippet source
dependencies = {
"rafamadriz/friendly-snippets",
"Kaiser-Yang/blink-cmp-dictionary",
"moyiz/blink-emoji.nvim",
"mikavilpas/blink-ripgrep.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
},
-- use a release tag to download pre-built binaries
version = "*",
-- AND/OR build from source, requires nightly:
-- https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
-- 'default' for mappings similar to built-in completion
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
-- See the full "keymap" documentation for information on defining your own keymap.
keymap = {
preset = "super-tab",
},
completion = {
list = {
selection = {
preselect = function(ctx)
return ctx.mode ~= "cmdline"
end,
},
},
menu = {
-- nvim-cmp style menu
draw = {
columns = {
{ "label", "label_description", gap = 1 },
{ "kind_icon", "kind" },
},
},
},
documentation = { auto_show = true, auto_show_delay_ms = 500 },
ghost_text = { enabled = false },
},
appearance = {
-- Sets the fallback highlight groups to nvim-cmp's highlight groups
-- Useful for when your theme doesn't support blink.cmp
-- Will be removed in a future release
use_nvim_cmp_as_default = true,
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = "mono",
},
-- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend`
sources = {
--default = { 'lsp', 'path', 'snippets', 'buffer', 'ctags' },
default = { "lazydev", "lsp", "path", "snippets", "buffer", "ripgrep", "emoji" },
providers = {
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100,
},
emoji = {
module = "blink-emoji",
name = "Emoji",
score_offset = 15, -- Tune by preference
opts = { insert = true }, -- Insert emoji (default) or complete its name
-- should_show_items = function()
-- return vim.tbl_contains(
-- -- Enable emoji completion only for git commits and markdown.
-- -- By default, enabled for all file-types.
-- { "gitcommit", "markdown" },
-- vim.o.filetype
-- )
-- {
-- "folke/lazydev.nvim",
-- ft = "lua", -- only load on lua files
-- opts = {
-- library = {
-- -- See the configuration section for more details
-- -- Load luvit types when the `vim.uv` word is found
-- { path = "${3rd}/luv/library", words = { "vim%.uv" } },
-- },
-- },
-- },
-- {
-- "saghen/blink.cmp",
-- -- optional: provides snippets for the snippet source
-- dependencies = {
-- "rafamadriz/friendly-snippets",
-- "Kaiser-Yang/blink-cmp-dictionary",
-- "moyiz/blink-emoji.nvim",
-- "mikavilpas/blink-ripgrep.nvim",
-- dependencies = { "nvim-lua/plenary.nvim" },
-- },
--
-- -- use a release tag to download pre-built binaries
-- version = "*",
-- -- AND/OR build from source, requires nightly:
-- -- https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- -- build = 'cargo build --release',
-- -- If you use nix, you can build from source using latest nightly rust with:
-- -- build = 'nix run .#build-plugin',
--
-- ---@module 'blink.cmp'
-- ---@type blink.cmp.Config
-- opts = {
-- -- 'default' for mappings similar to built-in completion
-- -- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
-- -- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
-- -- See the full "keymap" documentation for information on defining your own keymap.
-- keymap = {
-- preset = "super-tab",
-- },
--
-- completion = {
-- list = {
-- selection = {
-- preselect = function(ctx)
-- return ctx.mode ~= "cmdline"
-- end,
},
ripgrep = {
module = "blink-ripgrep",
name = "Ripgrep",
-- the options below are optional, some default values are shown
---@module "blink-ripgrep"
---@type blink-ripgrep.Options
opts = {
-- For many options, see `rg --help` for an exact description of
-- the values that ripgrep expects.
-- the minimum length of the current word to start searching
-- (if the word is shorter than this, the search will not start)
prefix_min_len = 3,
-- The number of lines to show around each match in the preview
-- (documentation) window. For example, 5 means to show 5 lines
-- before, then the match, and another 5 lines after the match.
context_size = 5,
-- The maximum file size of a file that ripgrep should include in
-- its search. Useful when your project contains large files that
-- might cause performance issues.
-- Examples:
-- "1024" (bytes by default), "200K", "1M", "1G", which will
-- exclude files larger than that size.
max_filesize = "1M",
-- Specifies how to find the root of the project where the ripgrep
-- search will start from. Accepts the same options as the marker
-- given to `:h vim.fs.root()` which offers many possibilities for
-- configuration. If none can be found, defaults to Neovim's cwd.
-- },
-- },
--
-- Examples:
-- - ".git" (default)
-- - { ".git", "package.json", ".root" }
project_root_marker = { ".git", ".terraform", "requirements.txt", "lazy-lock.json" },
-- Enable fallback to neovim cwd if project_root_marker is not
-- found. Default: `true`, which means to use the cwd.
project_root_fallback = true,
-- The casing to use for the search in a format that ripgrep
-- accepts. Defaults to "--ignore-case". See `rg --help` for all the
-- available options ripgrep supports, but you can try
-- "--case-sensitive" or "--smart-case".
search_casing = "--ignore-case",
-- (advanced) Any additional options you want to give to ripgrep.
-- See `rg -h` for a list of all available options. Might be
-- helpful in adjusting performance in specific situations.
-- If you have an idea for a default, please open an issue!
-- menu = {
-- -- nvim-cmp style menu
-- draw = {
-- columns = {
-- { "label", "label_description", gap = 1 },
-- { "kind_icon", "kind" },
-- },
-- },
-- },
--
-- Not everything will work (obviously).
additional_rg_options = {},
-- When a result is found for a file whose filetype does not have a
-- treesitter parser installed, fall back to regex based highlighting
-- that is bundled in Neovim.
fallback_to_regex_highlighting = true,
-- Absolute root paths where the rg command will not be executed.
-- Usually you want to exclude paths using gitignore files or
-- ripgrep specific ignore files, but this can be used to only
-- ignore the paths in blink-ripgrep.nvim, maintaining the ability
-- to use ripgrep for those paths on the command line. If you need
-- to find out where the searches are executed, enable `debug` and
-- look at `:messages`.
ignore_paths = {},
-- Any additional paths to search in, in addition to the project
-- root. This can be useful if you want to include dictionary files
-- (/usr/share/dict/words), framework documentation, or any other
-- reference material that is not available within the project
-- root.
additional_paths = {},
-- Features that are not yet stable and might change in the future.
-- You can enable these to try them out beforehand, but be aware
-- that they might change. Nothing is enabled by default.
future_features = {
-- Keymaps to toggle features on/off. This can be used to alter
-- the behavior of the plugin without restarting Neovim. Nothing
-- is enabled by default.
toggles = {
-- The keymap to toggle the plugin on and off from blink
-- completion results. Example: "<leader>tg"
on_off = "<leader>tg",
},
},
-- Show debug information in `:messages` that can help in
-- diagnosing issues with the plugin.
debug = false,
},
-- (optional) customize how the results are displayed. Many options
-- are available - make sure your lua LSP is set up so you get
-- autocompletion help
transform_items = function(_, items)
for _, item in ipairs(items) do
-- example: append a description to easily distinguish rg results
item.labelDetails = {
description = "(rg)",
}
end
return items
end,
},
},
},
},
opts_extend = { "sources.default" },
},
{
"neovim/nvim-lspconfig",
dependencies = {
"saghen/blink.cmp",
-- "netmute/ctags-lsp.nvim"
},
-- example using `opts` for defining servers
opts = {
servers = {
-- brew install rust-analyzer
-- rust_analyzer = {
-- settings = {
-- ["rust-analyzer"] = {},
-- },
-- },
-- brew install bash-language-server
bashls = {},
-- lua_ls = {
-- settings = {
-- Lua = {
-- diagnostics = {
-- globals = { "vim" },
-- undefined_global = false, -- remove this from diag!
-- missing_parameters = false, -- missing fields :)
-- },
-- },
-- },
-- },
-- ctags_lsp = {},
},
},
config = function(_, opts)
local lspconfig = require("lspconfig")
--- brew install netmute/tap/ctags-lsp
-- require("lspconfig").ctags_lsp.setup({})
for server, config in pairs(opts.servers) do
-- passing config.capabilities to blink.cmp merges with the capabilities in your
-- `opts[server].capabilities, if you've defined it
config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
lspconfig[server].setup(config)
end
end,
},
{
"mrcjkb/rustaceanvim",
version = "^5", -- Recommended
lazy = false, -- This plugin is already lazy
config = function()
vim.g.rustaceanvim = {
tools = {
float_win_config = {
border = {
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
},
max_width = nil,
max_height = nil,
auto_focus = true,
},
},
}
end,
},
-- documentation = { auto_show = true, auto_show_delay_ms = 500 },
--
-- ghost_text = { enabled = false },
-- },
--
-- appearance = {
-- -- Sets the fallback highlight groups to nvim-cmp's highlight groups
-- -- Useful for when your theme doesn't support blink.cmp
-- -- Will be removed in a future release
-- use_nvim_cmp_as_default = true,
-- -- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- -- Adjusts spacing to ensure icons are aligned
-- nerd_font_variant = "mono",
-- },
--
-- -- Default list of enabled providers defined so that you can extend it
-- -- elsewhere in your config, without redefining it, due to `opts_extend`
-- sources = {
-- --default = { 'lsp', 'path', 'snippets', 'buffer', 'ctags' },
-- default = { "lazydev", "lsp", "path", "snippets", "buffer", "ripgrep", "emoji" },
-- providers = {
-- lazydev = {
-- name = "LazyDev",
-- module = "lazydev.integrations.blink",
-- -- make lazydev completions top priority (see `:h blink.cmp`)
-- score_offset = 100,
-- },
-- emoji = {
-- module = "blink-emoji",
-- name = "Emoji",
-- score_offset = 15, -- Tune by preference
-- opts = { insert = true }, -- Insert emoji (default) or complete its name
-- -- should_show_items = function()
-- -- return vim.tbl_contains(
-- -- -- Enable emoji completion only for git commits and markdown.
-- -- -- By default, enabled for all file-types.
-- -- { "gitcommit", "markdown" },
-- -- vim.o.filetype
-- -- )
-- -- end,
-- },
-- ripgrep = {
-- module = "blink-ripgrep",
-- name = "Ripgrep",
-- -- the options below are optional, some default values are shown
-- ---@module "blink-ripgrep"
-- ---@type blink-ripgrep.Options
-- opts = {
-- -- For many options, see `rg --help` for an exact description of
-- -- the values that ripgrep expects.
--
-- -- the minimum length of the current word to start searching
-- -- (if the word is shorter than this, the search will not start)
-- prefix_min_len = 3,
--
-- -- The number of lines to show around each match in the preview
-- -- (documentation) window. For example, 5 means to show 5 lines
-- -- before, then the match, and another 5 lines after the match.
-- context_size = 5,
--
-- -- The maximum file size of a file that ripgrep should include in
-- -- its search. Useful when your project contains large files that
-- -- might cause performance issues.
-- -- Examples:
-- -- "1024" (bytes by default), "200K", "1M", "1G", which will
-- -- exclude files larger than that size.
-- max_filesize = "1M",
--
-- -- Specifies how to find the root of the project where the ripgrep
-- -- search will start from. Accepts the same options as the marker
-- -- given to `:h vim.fs.root()` which offers many possibilities for
-- -- configuration. If none can be found, defaults to Neovim's cwd.
-- --
-- -- Examples:
-- -- - ".git" (default)
-- -- - { ".git", "package.json", ".root" }
-- project_root_marker = { ".git", ".terraform", "requirements.txt", "lazy-lock.json" },
--
-- -- Enable fallback to neovim cwd if project_root_marker is not
-- -- found. Default: `true`, which means to use the cwd.
-- project_root_fallback = true,
--
-- -- The casing to use for the search in a format that ripgrep
-- -- accepts. Defaults to "--ignore-case". See `rg --help` for all the
-- -- available options ripgrep supports, but you can try
-- -- "--case-sensitive" or "--smart-case".
-- search_casing = "--ignore-case",
--
-- -- (advanced) Any additional options you want to give to ripgrep.
-- -- See `rg -h` for a list of all available options. Might be
-- -- helpful in adjusting performance in specific situations.
-- -- If you have an idea for a default, please open an issue!
-- --
-- -- Not everything will work (obviously).
-- additional_rg_options = {},
--
-- -- When a result is found for a file whose filetype does not have a
-- -- treesitter parser installed, fall back to regex based highlighting
-- -- that is bundled in Neovim.
-- fallback_to_regex_highlighting = true,
--
-- -- Absolute root paths where the rg command will not be executed.
-- -- Usually you want to exclude paths using gitignore files or
-- -- ripgrep specific ignore files, but this can be used to only
-- -- ignore the paths in blink-ripgrep.nvim, maintaining the ability
-- -- to use ripgrep for those paths on the command line. If you need
-- -- to find out where the searches are executed, enable `debug` and
-- -- look at `:messages`.
-- ignore_paths = {},
--
-- -- Any additional paths to search in, in addition to the project
-- -- root. This can be useful if you want to include dictionary files
-- -- (/usr/share/dict/words), framework documentation, or any other
-- -- reference material that is not available within the project
-- -- root.
-- additional_paths = {},
--
-- -- Features that are not yet stable and might change in the future.
-- -- You can enable these to try them out beforehand, but be aware
-- -- that they might change. Nothing is enabled by default.
-- future_features = {
-- -- Keymaps to toggle features on/off. This can be used to alter
-- -- the behavior of the plugin without restarting Neovim. Nothing
-- -- is enabled by default.
-- toggles = {
-- -- The keymap to toggle the plugin on and off from blink
-- -- completion results. Example: "<leader>tg"
-- on_off = "<leader>tg",
-- },
-- },
--
-- -- Show debug information in `:messages` that can help in
-- -- diagnosing issues with the plugin.
-- debug = false,
-- },
-- -- (optional) customize how the results are displayed. Many options
-- -- are available - make sure your lua LSP is set up so you get
-- -- autocompletion help
-- transform_items = function(_, items)
-- for _, item in ipairs(items) do
-- -- example: append a description to easily distinguish rg results
-- item.labelDetails = {
-- description = "(rg)",
-- }
-- end
-- return items
-- end,
-- },
-- },
-- },
-- },
-- opts_extend = { "sources.default" },
-- },
-- {
-- "neovim/nvim-lspconfig",
-- dependencies = {
-- "saghen/blink.cmp",
-- -- "netmute/ctags-lsp.nvim"
-- },
--
-- -- example using `opts` for defining servers
-- opts = {
-- servers = {
-- -- brew install rust-analyzer
-- -- rust_analyzer = {
-- -- settings = {
-- -- ["rust-analyzer"] = {},
-- -- },
-- -- },
-- -- brew install bash-language-server
-- bashls = {},
-- -- lua_ls = {
-- -- settings = {
-- -- Lua = {
-- -- diagnostics = {
-- -- globals = { "vim" },
-- -- undefined_global = false, -- remove this from diag!
-- -- missing_parameters = false, -- missing fields :)
-- -- },
-- -- },
-- -- },
-- -- },
-- -- ctags_lsp = {},
-- },
-- },
-- config = function(_, opts)
-- local lspconfig = require("lspconfig")
-- --- brew install netmute/tap/ctags-lsp
-- -- require("lspconfig").ctags_lsp.setup({})
--
-- for server, config in pairs(opts.servers) do
-- -- passing config.capabilities to blink.cmp merges with the capabilities in your
-- -- `opts[server].capabilities, if you've defined it
-- config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
-- lspconfig[server].setup(config)
-- end
-- end,
-- },
-- {
-- "mrcjkb/rustaceanvim",
-- version = "^5", -- Recommended
-- lazy = false, -- This plugin is already lazy
-- config = function()
-- vim.g.rustaceanvim = {
-- tools = {
-- float_win_config = {
-- border = {
-- { "╭", "FloatBorder" },
-- { "─", "FloatBorder" },
-- { "╮", "FloatBorder" },
-- { "│", "FloatBorder" },
-- { "╯", "FloatBorder" },
-- { "─", "FloatBorder" },
-- { "╰", "FloatBorder" },
-- { "│", "FloatBorder" },
-- },
-- max_width = nil,
-- max_height = nil,
-- auto_focus = true,
-- },
-- },
-- }
-- end,
-- },
}

View File

@@ -45,6 +45,7 @@ return {
".terraform",
".git",
".venv",
"Cargo.toml",
},
hidden = true,
},

View File

@@ -78,8 +78,8 @@ set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-dir '~/.tmux/resurrect/'
set -g @continuum-save-interval '15'
set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
# set -g @continuum-restore 'on'
# set -g @continuum-boot 'on'
set -g @dracula-continuum-mode countdown
### tmux-resurrect

View File

@@ -1,6 +1,9 @@
alias tree='tree -CF --du -h'
alias cbonsai='cbonsai --live --infinite --time 0.3 --base 2 --wait 2 --leaf "&,#,$,*,@"'
alias tmux_main='tmux new-session -s main'
alias tmux_secondary_win='tmux new-session -t main -s secondary'
# enable color support of ls and also add handy aliases
alias ls='ls --color=auto'
alias grep='grep --color=auto'