From 51c4fb61662da177d9e0506c4825fd4e92696e79 Mon Sep 17 00:00:00 2001 From: ignuki Date: Fri, 14 Feb 2025 03:50:37 +0100 Subject: [PATCH] improvements and font change --- README.md | 1 + alacritty/.config/alacritty/alacritty.toml | 8 ++--- curl/.curl-format.txt | 8 +++++ nvim/.config/nvim/after/ftplugin/rust.lua | 21 +++++++++++ nvim/.config/nvim/lua/plugins/completion.lua | 38 ++++++++++++++++---- zsh/.zsh_aliases | 1 - 6 files changed, 66 insertions(+), 11 deletions(-) create mode 100644 curl/.curl-format.txt create mode 100644 nvim/.config/nvim/after/ftplugin/rust.lua diff --git a/README.md b/README.md index 9f2478b..d20ed3f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ## Dependencies +- alacritty - zsh - homebrew/linuxbrew - stow diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml index 540a88f..03c455a 100644 --- a/alacritty/.config/alacritty/alacritty.toml +++ b/alacritty/.config/alacritty/alacritty.toml @@ -3,17 +3,17 @@ import = ["/home/ink/.config/alacritty/dracula.toml"] size = 12.0 [font.bold] -family = "PragmataPro Mono Liga" +family = "jetbrainsmono nerd font" style = "Bold" [font.bold_italic] -family = "PragmataPro Mono Liga" +family = "jetbrainsmono nerd font" style = "Bold Italic" [font.italic] -family = "PragmataPro Mono Liga" +family = "jetbrainsmono nerd font" style = "Italic" [font.normal] -family = "PragmataPro Mono Liga" +family = "jetbrainsmono nerd font" style = "Regular" diff --git a/curl/.curl-format.txt b/curl/.curl-format.txt new file mode 100644 index 0000000..eba37ae --- /dev/null +++ b/curl/.curl-format.txt @@ -0,0 +1,8 @@ + time_namelookup: %{time_namelookup}s\n + time_connect: %{time_connect}s\n + time_appconnect: %{time_appconnect}s\n + time_pretransfer: %{time_pretransfer}s\n + time_redirect: %{time_redirect}s\n + time_starttransfer: %{time_starttransfer}s\n + ----------\n + time_total: %{time_total}s\n diff --git a/nvim/.config/nvim/after/ftplugin/rust.lua b/nvim/.config/nvim/after/ftplugin/rust.lua new file mode 100644 index 0000000..9848e28 --- /dev/null +++ b/nvim/.config/nvim/after/ftplugin/rust.lua @@ -0,0 +1,21 @@ +local bufnr = vim.api.nvim_get_current_buf() +vim.keymap.set("n", "a", function() + vim.cmd.RustLsp("codeAction") -- supports rust-analyzer's grouping + -- or vim.lsp.buf.codeAction() if you don't want grouping. +end, { silent = true, buffer = bufnr }) +vim.keymap.set( + "n", + "K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions + function() + vim.cmd.RustLsp({ "hover", "actions" }) + end, + { silent = true, buffer = bufnr } +) +vim.keymap.set( + "n", + "?", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions + function() + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) + end, + { buffer = bufnr } +) diff --git a/nvim/.config/nvim/lua/plugins/completion.lua b/nvim/.config/nvim/lua/plugins/completion.lua index 6b2370c..7d266a3 100644 --- a/nvim/.config/nvim/lua/plugins/completion.lua +++ b/nvim/.config/nvim/lua/plugins/completion.lua @@ -37,7 +37,7 @@ return { -- '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 = "enter", + preset = "super-tab", }, completion = { @@ -223,11 +223,11 @@ return { opts = { servers = { -- brew install rust-analyzer - rust_analyzer = { - settings = { - ["rust-analyzer"] = {}, - }, - }, + -- rust_analyzer = { + -- settings = { + -- ["rust-analyzer"] = {}, + -- }, + -- }, -- brew install bash-language-server bashls = {}, -- lua_ls = { @@ -257,4 +257,30 @@ return { 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, + }, } diff --git a/zsh/.zsh_aliases b/zsh/.zsh_aliases index 130a202..503844e 100644 --- a/zsh/.zsh_aliases +++ b/zsh/.zsh_aliases @@ -23,7 +23,6 @@ for index ({1..9}) alias "c$index"="cd +${index}"; unset index # alias tgg="aws-vault exec feedzai-main -d 8h -- terragrunt graph-dependencies" alias idot='dot -Tsvg -Goverlap=scale -Grankdir=RL -Gbgcolor="#282a36" -Ncolor="#f8f8f2" -Ecolor="#f8f8f2" -Nfontcolor="#f8f8f2" -Gfontname="PragmataPro Mono Liga Regular" -Gfontsize=13 -Nfontname="PragmataPro" -Nfontsize=13 -Nshape=box -Earrowhead=normal' -alias icat="kitty +kitten icat" alias curltime="curl -w \"@$HOME/.curl-format.txt\" -o /dev/null -s "