From f413fe5e74af9bafd6330282562a414fc7b6560c Mon Sep 17 00:00:00 2001 From: Aotrix Date: Sat, 17 Aug 2024 01:23:04 +0200 Subject: set nightfox theme and added transparent background --- init.lua | 10 ++++++---- lazy-lock.json | 2 ++ lua/nvim_settings/remap.lua | 4 ++-- lua/telescope/telescope.lua | 11 +++++++++++ lua/theme/nightfox.lua | 1 + lua/treesitter/treesitter.lua | 2 +- 6 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 lua/theme/nightfox.lua diff --git a/init.lua b/init.lua index 09900ae..f024cdb 100644 --- a/init.lua +++ b/init.lua @@ -14,10 +14,11 @@ vim.opt.rtp:prepend(lazypath) -- lazy setup require('lazy').setup({ -- Loading theme - { "rose-pine/neovim", - config = function() - require('theme/rose-pine') - end,}, + { + "EdenEast/nightfox.nvim", + config = function() + require('theme/nightfox') + end,}, -- LSP { @@ -58,6 +59,7 @@ require('lazy').setup({ -- or , branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope-live-grep-args.nvim', + 'fannheyward/telescope-coc.nvim', }, config = function() require('telescope/telescope') diff --git a/lazy-lock.json b/lazy-lock.json index 977424a..15f7ecd 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -6,8 +6,10 @@ "lazy.nvim": { "branch": "main", "commit": "c501b429cf995c645454539b924aaefae45bb9eb" }, "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, "neovim": { "branch": "main", "commit": "f01ce3a71748a92997d266cfe2c985decd18c601" }, + "nightfox.nvim": { "branch": "main", "commit": "d3e8b1acc095baf57af81bb5e89fe7c4359eb619" }, "nvim-treesitter": { "branch": "master", "commit": "f6342874b1113984dfedfcf595ad321c4cd1a896" }, "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, + "telescope-coc.nvim": { "branch": "master", "commit": "0819a790dc95336ce2a954513434a76bb76c41c7" }, "telescope-live-grep-args.nvim": { "branch": "master", "commit": "731a046da7dd3adff9de871a42f9b7fb85f60f47" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "transparent.nvim": { "branch": "main", "commit": "fd35a46f4b7c1b244249266bdcb2da3814f01724" } diff --git a/lua/nvim_settings/remap.lua b/lua/nvim_settings/remap.lua index c056bc6..b3210c8 100644 --- a/lua/nvim_settings/remap.lua +++ b/lua/nvim_settings/remap.lua @@ -28,7 +28,7 @@ vim.keymap.set("n", "", function() require("harpoon.ui").nav_file(4) end) -- GoTo code navigation vim.keymap.set("n", "gD", "(coc-declaration)", {silent = true}) vim.keymap.set("n", "gd", "(coc-definition)", {silent = true}) -vim.keymap.set("n", "K", 'lua _G.show_docs()', {silent = true}) -vim.keymap.set("n", "gr", "(coc-references)", {silent = true}) +vim.keymap.set("n", "K", "lua _G.show_docs()", {silent = true}) +vim.keymap.set("n", "gr", "Telescope coc references", {silent = true}) vim.keymap.set("n", "gy", "(coc-type-definition)", {silent = true}) vim.keymap.set("n", "gi", "(coc-implementation)", {silent = true}) diff --git a/lua/telescope/telescope.lua b/lua/telescope/telescope.lua index e69de29..2902903 100644 --- a/lua/telescope/telescope.lua +++ b/lua/telescope/telescope.lua @@ -0,0 +1,11 @@ +require("telescope").setup({ + extensions = { + coc = { + theme = 'ivy', + prefer_locations = true, -- always use Telescope locations to preview definitions/declarations/implementations etc + push_cursor_on_edit = true, -- save the cursor position to jump back in the future + timeout = 3000, -- timeout for coc commands + } + }, +}) +require('telescope').load_extension('coc') diff --git a/lua/theme/nightfox.lua b/lua/theme/nightfox.lua new file mode 100644 index 0000000..e8338a2 --- /dev/null +++ b/lua/theme/nightfox.lua @@ -0,0 +1 @@ +vim.cmd([[colorscheme nightfox]]) diff --git a/lua/treesitter/treesitter.lua b/lua/treesitter/treesitter.lua index 59d0d2f..3cf605f 100644 --- a/lua/treesitter/treesitter.lua +++ b/lua/treesitter/treesitter.lua @@ -10,7 +10,7 @@ require'nvim-treesitter.configs'.setup { auto_install = true, -- List of parsers to ignore installing (or "all") - ignore_install = { "javascript" }, + ignore_install = { "html" }, ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! -- cgit v1.2.3