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.remap")
require("ink.lsp")
vim.opt.hlsearch = false -- do not highlight matches vim.opt.hlsearch = false -- do not highlight matches
vim.wo.number = true 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 { 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 -- keymap helper
{ "folke/which-key.nvim", opts = {} }, { "folke/which-key.nvim", opts = {} },
{ -- undo tree { -- undo tree

View File

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

View File

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

View File

@@ -1,6 +1,9 @@
alias tree='tree -CF --du -h' alias tree='tree -CF --du -h'
alias cbonsai='cbonsai --live --infinite --time 0.3 --base 2 --wait 2 --leaf "&,#,$,*,@"' 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 # enable color support of ls and also add handy aliases
alias ls='ls --color=auto' alias ls='ls --color=auto'
alias grep='grep --color=auto' alias grep='grep --color=auto'