From ed33147a1f787cdc273f336fa8b49ccf59aea9c7 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Fri, 30 Dec 2022 11:48:44 +0100 Subject: [PATCH] nvim: add noice --- .config/nvim/lua/config/plugins/init.lua | 11 ++++++++++- .config/nvim/lua/config/plugins/lsp-config.lua | 1 - .config/nvim/lua/config/plugins/noice.lua | 17 +++++++++++++++++ .config/nvim/lua/config/plugins/telescope.lua | 3 ++- .config/nvim/lua/config/plugins/treesitter.lua | 10 ++++++++++ .config/nvim/lua/config/plugins/zenbones.lua | 4 ++++ 6 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 .config/nvim/lua/config/plugins/noice.lua diff --git a/.config/nvim/lua/config/plugins/init.lua b/.config/nvim/lua/config/plugins/init.lua index de3527e..8943a66 100644 --- a/.config/nvim/lua/config/plugins/init.lua +++ b/.config/nvim/lua/config/plugins/init.lua @@ -1,12 +1,21 @@ return { "hashivim/vim-terraform", - "pierreglaser/folding-nvim", + "jose-elias-alvarez/typescript.nvim", "tjdevries/colorbuddy.vim", "wbthomason/packer.nvim", "jose-elias-alvarez/nvim-lsp-ts-utils", "jjo/vim-cue", "ckipp01/stylua-nvim", + { + "smjonas/inc-rename.nvim", + cmd = "IncRename", + config = true, + keys = { + { "rn", ":IncRename " }, + }, + }, + { "SmiteshP/nvim-navic", config = function() diff --git a/.config/nvim/lua/config/plugins/lsp-config.lua b/.config/nvim/lua/config/plugins/lsp-config.lua index 8e4351e..ae9689e 100644 --- a/.config/nvim/lua/config/plugins/lsp-config.lua +++ b/.config/nvim/lua/config/plugins/lsp-config.lua @@ -12,7 +12,6 @@ function M.config() vim.keymap.set("i", "", "lua vim.lsp.buf.signature_help()") vim.keymap.set("n", "1gd", "lua vim.lsp.buf.type_definition()") vim.keymap.set("n", "gf", "lua vim.lsp.buf.format()") - vim.keymap.set("n", "rn", "lua vim.lsp.buf.rename()") vim.keymap.set("n", "[d", "lua vim.lsp.diagnostic.goto_prev()") vim.keymap.set("n", "]d", "lua vim.lsp.diagnostic.goto_next()") vim.keymap.set("n", "gwa", "lua vim.lsp.buf.add_workspace_folder()") diff --git a/.config/nvim/lua/config/plugins/noice.lua b/.config/nvim/lua/config/plugins/noice.lua new file mode 100644 index 0000000..c73ea37 --- /dev/null +++ b/.config/nvim/lua/config/plugins/noice.lua @@ -0,0 +1,17 @@ +local M = { + "folke/noice.nvim", + event = "VeryLazy", + dependencies = { + "MunifTanjim/nui.nvim", + }, +} + +function M.config() + require("noice").setup({ + presets = { + inc_rename = true, + }, + }) +end + +return M diff --git a/.config/nvim/lua/config/plugins/telescope.lua b/.config/nvim/lua/config/plugins/telescope.lua index f374dfb..b0b67e1 100644 --- a/.config/nvim/lua/config/plugins/telescope.lua +++ b/.config/nvim/lua/config/plugins/telescope.lua @@ -50,7 +50,8 @@ function M.config() -- layout_defaults = {flip_columns = 160}, layout_config = { preview_cutoff = 10, - prompt_position = "top", + prompt_position = "bottom", + mirror = true, }, mappings = { i = { diff --git a/.config/nvim/lua/config/plugins/treesitter.lua b/.config/nvim/lua/config/plugins/treesitter.lua index f012694..b8d3b59 100644 --- a/.config/nvim/lua/config/plugins/treesitter.lua +++ b/.config/nvim/lua/config/plugins/treesitter.lua @@ -18,8 +18,13 @@ return { "cpp", "css", "diff", + "dockerfile", + "gdscript", + "git_rebase", + "gitcommit", "gitignore", "go", + "gomod", "graphql", "help", "html", @@ -29,16 +34,20 @@ return { "jsdoc", "json", "jsonc", + "kotlin", "latex", "lua", + "make", "markdown", "markdown_inline", "meson", "ninja", "php", + "proto", "python", "query", "regex", + "rego", "rust", "scss", "sql", @@ -52,6 +61,7 @@ return { "vue", "wgsl", "yaml", + "zig", }, highlight = { enable = true, diff --git a/.config/nvim/lua/config/plugins/zenbones.lua b/.config/nvim/lua/config/plugins/zenbones.lua index 8a590d1..6626316 100644 --- a/.config/nvim/lua/config/plugins/zenbones.lua +++ b/.config/nvim/lua/config/plugins/zenbones.lua @@ -30,6 +30,7 @@ function M.config() CopilotSuggestion({ fg = "#0066cc", gui = "bold,italic" }), LineNr({ fg = "#9FA8AC", gui = "bold,italic" }), LineNrAbove({ fg = "#9F080C", gui = "bold,italic" }), + IndentBlanklineContextChar({ fg = "#FF713F", gui = "italic" }), Indent1({ fg = "#DFDF9A", gui = "italic" }), Indent2({ fg = "#BAE1FF", gui = "italic" }), Indent3({ fg = "#BAFFC9", gui = "italic" }), @@ -93,6 +94,9 @@ function M.config() -- LspCodeLens({ fg = "#00ff00", gui = "undercurl" }), -- LspSignatureActiveParameter({ fg = "#ff0000", bg = "#ffffcc" }), + NoiceCmdlinePopup({ bg = "#E1F5FE" }), + NoiceMini({ bg = "#FFF9C4" }), + PMenu({ bg = "#F7F5F0" }), PMenuBorder({ bg = "#F7F5F0", fg = "#886622" }), PMenuSel({ fg = "#FFFFFF", bg = "#1976D2" }),