From a8e82286961ec184224baf8d3c85003b17bbe9b2 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Fri, 6 Oct 2023 09:10:39 -0400 Subject: [PATCH] Updated neovim and noice config --- nvim/m-housh/init.lua | 6 ++--- nvim/m-housh/lazy-lock.json | 16 ++++++------- nvim/m-housh/lua/user/mappings.lua | 31 ++++++++++++++++++++++++++ nvim/m-housh/lua/user/plugin/noice.lua | 16 ++++++++++--- 4 files changed, 55 insertions(+), 14 deletions(-) diff --git a/nvim/m-housh/init.lua b/nvim/m-housh/init.lua index 90c25d6..a1f8e4b 100644 --- a/nvim/m-housh/init.lua +++ b/nvim/m-housh/init.lua @@ -1,7 +1,4 @@ --- Key maps -require('user.mappings') - -- Common settings require('user.settings') @@ -11,6 +8,9 @@ require('user.autocmd') -- Plugins require('user.plugins') +-- Key maps +require('user.mappings') + -- Theme (must stay after plugins are loaded) require('user.theme') diff --git a/nvim/m-housh/lazy-lock.json b/nvim/m-housh/lazy-lock.json index b9f7c03..1460e93 100644 --- a/nvim/m-housh/lazy-lock.json +++ b/nvim/m-housh/lazy-lock.json @@ -1,6 +1,6 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "480b032f6708573334f4437d3f83307d143f1a72" }, + "LuaSnip": { "branch": "master", "commit": "2c3a3a3e4fb503bf39efb61290ecfa8aae95f5eb" }, "bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, @@ -14,7 +14,7 @@ "friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" }, "go.nvim": { "branch": "master", "commit": "54387e506e597ab65a89baa1681429728f66ed71" }, "guihua.lua": { "branch": "master", "commit": "5ad8dba19ce9b9fd8965598984dfdc9c119f97e4" }, - "lazy.nvim": { "branch": "main", "commit": "59335c5b9d116f5d3948f833288a89e2a829a005" }, + "lazy.nvim": { "branch": "main", "commit": "6b6f0a451200bb6abde85978c577c73ea1577758" }, "lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" }, "lsp_signature.nvim": { "branch": "master", "commit": "bdf3dc7bb03edd25c2173e0e31c2fb122052ed23" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, @@ -22,16 +22,16 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "e2705063f395b44f676cd26596a11007a2cbd3bd" }, "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "71f1841ba6c652908678cece623f52c1fea8a6cd" }, - "neodev.nvim": { "branch": "main", "commit": "5147640bc8435ca3557a105ebd1143bc20420b60" }, + "neodev.nvim": { "branch": "main", "commit": "ee960afffdb95472f719a72a1edb494ffea09c92" }, "nightfox.nvim": { "branch": "main", "commit": "fe2fc7b93d66349eff2c5baa6cec922ee3958f56" }, - "noice.nvim": { "branch": "main", "commit": "396f9146529130904e07c45e90ecdbfa607534f3" }, + "noice.nvim": { "branch": "main", "commit": "7cf858c30841c9c41601ce58e5bc2023228037ef" }, "nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" }, "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nvim-lsp-installer": { "branch": "main", "commit": "17e0bfa5f2c8854d1636fcd036dc8284db136baa" }, - "nvim-lspconfig": { "branch": "master", "commit": "ac478757efcde1ac346f7044ab774e7cbb482533" }, + "nvim-lspconfig": { "branch": "master", "commit": "2b361e043810d5587d9af0787f8ce40da92ec5e9" }, "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, - "nvim-treesitter": { "branch": "master", "commit": "d96c216c54cc2d48d3c66ba7f0fc3c7c5b71b3b1" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" }, + "nvim-treesitter": { "branch": "master", "commit": "10bfa4826f2235c600c073a82e0d78718aa7240e" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "4724694bc03ce1148860a46d9d77c3664d8188ab" }, "nvim-web-devicons": { "branch": "master", "commit": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82" }, "plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" }, "swift.nvim": { "branch": "main", "commit": "a84cb608b0076aef39d3d4b1d20448a86a73b2eb" }, @@ -41,5 +41,5 @@ "vim-tmux-navigator": { "branch": "master", "commit": "7db70e08ea03b3e4d91f63713d76134512e28d7e" }, "which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }, "wrapping.nvim": { "branch": "master", "commit": "e1ce68aae5ea729fc20e5bc17fb569314f76b9bb" }, - "zen-mode.nvim": { "branch": "main", "commit": "68f554702de63f4b7b6b6d4bcb10178f41a0acc7" } + "zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" } } \ No newline at end of file diff --git a/nvim/m-housh/lua/user/mappings.lua b/nvim/m-housh/lua/user/mappings.lua index b15684e..6e86c18 100644 --- a/nvim/m-housh/lua/user/mappings.lua +++ b/nvim/m-housh/lua/user/mappings.lua @@ -1,5 +1,6 @@ local keymap = vim.keymap.set local default_options = {noremap = true, silent = true} +local telescope = require('telescope.builtin') -- local expr_options = {noremap = true, expr = true, silent = true} vim.g.mapleader = " " vim.g.maplocalleader = " " @@ -52,6 +53,36 @@ vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') keymap('n', 'f', ':Format', default_options) keymap('n', 'F', ':FormatWrite', default_options) +-- Finds + +-- Find espanso config files. +keymap('n', 'fn', function() + telescope.find_files({ + cwd='$HOME/.dotfiles/espanso/espanso' + }) +end, default_options) + +-- Find nvim config files. +keymap('n', 'fn', function() + telescope.find_files({ + cwd='$HOME/.dotfiles/nvim/m-housh' + }) +end, default_options) + +-- Find script files. +keymap('n', 'fs', function() + telescope.find_files({ + cwd='$HOME/.dotfiles/scripts/scripts' + }) +end, default_options) + +-- Find zsh config files. +keymap('n', 'fz', function() + telescope.find_files({ + cwd='$HOME/.dotfiles/zsh/config' + }) +end, default_options) + -- Turn off highlighting after search. keymap('n', 'n', ':noh', default_options) diff --git a/nvim/m-housh/lua/user/plugin/noice.lua b/nvim/m-housh/lua/user/plugin/noice.lua index 30dca6b..c2872b5 100644 --- a/nvim/m-housh/lua/user/plugin/noice.lua +++ b/nvim/m-housh/lua/user/plugin/noice.lua @@ -1,6 +1,7 @@ return { "folke/noice.nvim", event = "VeryLazy", + -- config.lsp.signature.enabled = false opts = { lsp = { -- override markdown rendering so that **cmp** and other plugins use **Treesitter** @@ -20,11 +21,20 @@ return { signature = { enabled = false }, }, routes = { - { + { -- enables messages for showing macro recording. view = "notify", filter = { event = "msg_showmode" }, }, - } + { -- Hide the written messages. + view = 'notify', + filter = { + event = "msg_show", + kind = "", + find = "written" + }, + opts = { skip = true } + } + }, }, dependencies = { -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries @@ -33,5 +43,5 @@ return { -- `nvim-notify` is only needed, if you want to use the notification view. -- If not available, we use `mini` as the fallback "rcarriga/nvim-notify", - } + }, }