From 96792596b8b48fdf73d99caab5781394c6fab00c Mon Sep 17 00:00:00 2001 From: triethyl Date: Thu, 10 Jul 2025 19:02:27 -0400 Subject: working on custom neovim Former-commit-id: 4ce0bec0e948790108ad93d37bd99097537302a6 --- pkgs/custom-neovim/config/lua/colorscheme.lua | 16 ++++++++++++++++ pkgs/custom-neovim/config/lua/mappings.lua | 1 + pkgs/custom-neovim/config/lua/plugins/alpha.lua | 9 +++++---- pkgs/custom-neovim/config/lua/plugins/lspconfig.lua | 4 ++-- 4 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 pkgs/custom-neovim/config/lua/colorscheme.lua (limited to 'pkgs/custom-neovim/config/lua') diff --git a/pkgs/custom-neovim/config/lua/colorscheme.lua b/pkgs/custom-neovim/config/lua/colorscheme.lua new file mode 100644 index 0000000..59cb970 --- /dev/null +++ b/pkgs/custom-neovim/config/lua/colorscheme.lua @@ -0,0 +1,16 @@ +-- Set colorscheme. +vim.cmd.colorscheme("oxocarbon") + +-- Set boolean to use patches. +local correct_borderless_windows = true + +-- Patches. +local link_highlight = function(first_highlight, second_highlight) + vim.cmd.highlight {bang = true, "link", first_highlight, second_highlight} +end + +if correct_borderless_windows then + link_highlight("TelescopeBorder", "Comment") + link_highlight("TelescopeResultsTitle", "Comment") + link_highlight("TelescopePreviewTitle", "Comment") +end diff --git a/pkgs/custom-neovim/config/lua/mappings.lua b/pkgs/custom-neovim/config/lua/mappings.lua index 1ffbadb..15a28e5 100644 --- a/pkgs/custom-neovim/config/lua/mappings.lua +++ b/pkgs/custom-neovim/config/lua/mappings.lua @@ -27,3 +27,4 @@ vim.keymap.set("c", "", function() if vim.fn.pumvisible() == 1 then return '' end return '' end, { expr = true }) -- Make enter complete command. +mapkey("n", "", "Clear highlights", ":noh") -- Make esc clear highlights diff --git a/pkgs/custom-neovim/config/lua/plugins/alpha.lua b/pkgs/custom-neovim/config/lua/plugins/alpha.lua index 6599bdb..e0fa7e9 100644 --- a/pkgs/custom-neovim/config/lua/plugins/alpha.lua +++ b/pkgs/custom-neovim/config/lua/plugins/alpha.lua @@ -6,10 +6,11 @@ dashboard.section.header.val = art.misc.hydra -- Set menu dashboard.section.buttons.val = { - dashboard.button( "f", " > Find file", ":cd $HOME | Telescope find_files"), - dashboard.button( "r", " > Find recent file", ":Telescope oldfiles"), - dashboard.button( "s", " > Load session", ":Telescope persisted"), - dashboard.button( "q", " > Quit", ":qa"), + dashboard.button( "f", " > Find file", ":cd $HOME | Telescope find_files" ), + dashboard.button( "r", " > Find recent file", ":Telescope oldfiles" ), + dashboard.button( "s", " > Load session", ":Telescope persisted" ), + dashboard.button( "l", " > Load last session", ":SessionLoadLast" ), + dashboard.button( "q", " > Quit", ":qa" ), } -- Send config to alpha diff --git a/pkgs/custom-neovim/config/lua/plugins/lspconfig.lua b/pkgs/custom-neovim/config/lua/plugins/lspconfig.lua index 98b34f2..445caee 100644 --- a/pkgs/custom-neovim/config/lua/plugins/lspconfig.lua +++ b/pkgs/custom-neovim/config/lua/plugins/lspconfig.lua @@ -38,8 +38,8 @@ vim.api.nvim_create_autocmd('LspAttach', { print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end) keymap('n', 'r', "Rename Symbol", vim.lsp.buf.rename) - keymap("n", "s", "Open symbol picker", [[:Pick lsp scope="document_symbol"]]) - keymap("n", "S", "Open workspace symbol picker", [[:Pick lsp scope="workspace_symbol"]]) + keymap("n", "s", "Open symbol picker", ":Telescope lsp_document_symbols") + keymap("n", "S", "Open workspace symbol picker", ":Telescope lsp_workspace_symbols") -- LSP Pickers keymap({'n', 'v'}, "a", "Perform code action", require("actions-preview").code_actions) -- cgit v1.2.3