added neovim
This commit is contained in:
74
.config/nvim/init.lua
Normal file
74
.config/nvim/init.lua
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
require("plugins")
|
||||||
|
require("cyberdream").setup({
|
||||||
|
-- Set light or dark variant
|
||||||
|
variant = "default", -- use "light" for the light variant. Also accepts "auto" to set dark or light colors based on the current value of `vim.o.background`
|
||||||
|
|
||||||
|
-- Enable transparent background
|
||||||
|
transparent = false,
|
||||||
|
|
||||||
|
-- Reduce the overall saturation of colours for a more muted look
|
||||||
|
saturation = 1, -- accepts a value between 0 and 1. 0 will be fully desaturated (greyscale) and 1 will be the full color (default)
|
||||||
|
|
||||||
|
-- Enable italics comments
|
||||||
|
italic_comments = false,
|
||||||
|
|
||||||
|
-- Replace all fillchars with ' ' for the ultimate clean look
|
||||||
|
hide_fillchars = false,
|
||||||
|
|
||||||
|
-- Apply a modern borderless look to pickers like Telescope, Snacks Picker & Fzf-Lua
|
||||||
|
borderless_pickers = false,
|
||||||
|
|
||||||
|
-- Set terminal colors used in `:terminal`
|
||||||
|
terminal_colors = true,
|
||||||
|
|
||||||
|
-- Improve start up time by caching highlights. Generate cache with :CyberdreamBuildCache and clear with :CyberdreamClearCache
|
||||||
|
cache = false,
|
||||||
|
|
||||||
|
-- Override highlight groups with your own colour values
|
||||||
|
highlights = {
|
||||||
|
-- Highlight groups to override, adding new groups is also possible
|
||||||
|
-- See `:h highlight-groups` for a list of highlight groups or run `:hi` to see all groups and their current values
|
||||||
|
|
||||||
|
-- Example:
|
||||||
|
Comment = { fg = "#696969", bg = "NONE", italic = true },
|
||||||
|
|
||||||
|
-- More examples can be found in `lua/cyberdream/extensions/*.lua`
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Override a highlight group entirely using the built-in colour palette
|
||||||
|
overrides = function(colors) -- NOTE: This function nullifies the `highlights` option
|
||||||
|
-- Example:
|
||||||
|
return {
|
||||||
|
Comment = { fg = colors.green, bg = "NONE", italic = true },
|
||||||
|
["@property"] = { fg = colors.magenta, bold = true },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
|
||||||
|
-- Override colors
|
||||||
|
colors = {
|
||||||
|
-- For a list of colors see `lua/cyberdream/colours.lua`
|
||||||
|
|
||||||
|
-- Override colors for both light and dark variants
|
||||||
|
bg = "#000000",
|
||||||
|
green = "#00ff00",
|
||||||
|
|
||||||
|
-- If you want to override colors for light or dark variants only, use the following format:
|
||||||
|
dark = {
|
||||||
|
magenta = "#ff00ff",
|
||||||
|
fg = "#eeeeee",
|
||||||
|
},
|
||||||
|
light = {
|
||||||
|
red = "#ff5c57",
|
||||||
|
cyan = "#5ef1ff",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Disable or enable colorscheme extensions
|
||||||
|
extensions = {
|
||||||
|
telescope = true,
|
||||||
|
notify = true,
|
||||||
|
mini = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.cmd 'colorscheme cyberdream'
|
||||||
55
.config/nvim/lua/plugins.lua
Normal file
55
.config/nvim/lua/plugins.lua
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
local fn = vim.fn
|
||||||
|
|
||||||
|
-- Automatically install packer
|
||||||
|
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
||||||
|
if fn.empty(fn.glob(install_path)) > 0 then
|
||||||
|
PACKER_BOOTSTRAP = fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--depth",
|
||||||
|
"1",
|
||||||
|
"https://github.com/wbthomason/packer.nvim",
|
||||||
|
install_path,
|
||||||
|
})
|
||||||
|
print("Installing packer close and reopen Neovim...")
|
||||||
|
vim.cmd([[packadd packer.nvim]])
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Autocommand that reloads neovim whenever you save the plugins.lua file
|
||||||
|
vim.cmd([[
|
||||||
|
augroup packer_user_config
|
||||||
|
autocmd!
|
||||||
|
autocmd BufWritePost plugins.lua source <afile> | PackerSync
|
||||||
|
augroup end
|
||||||
|
]])
|
||||||
|
|
||||||
|
-- Use a protected call so we don't error out on first use
|
||||||
|
local status_ok, packer = pcall(require, "packer")
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Have packer use a popup window
|
||||||
|
packer.init({
|
||||||
|
display = {
|
||||||
|
open_fn = function()
|
||||||
|
return require("packer.util").float({ border = "rounded" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Install your plugins here
|
||||||
|
return packer.startup(function(use)
|
||||||
|
use ("wbthomason/packer.nvim") -- Have packer manage itself
|
||||||
|
|
||||||
|
use("scottmckendry/cyberdream.nvim")
|
||||||
|
use('folke/tokyonight.nvim')
|
||||||
|
|
||||||
|
--nvim-web-devicons
|
||||||
|
use("nvim-tree/nvim-web-devicons") -- Add entry here to install the plugin
|
||||||
|
|
||||||
|
if PACKER_BOOTSTRAP then
|
||||||
|
require("packer").sync()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
114
.config/nvim/plugin/packer_compiled.lua
Normal file
114
.config/nvim/plugin/packer_compiled.lua
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
-- Automatically generated packer.nvim plugin loader code
|
||||||
|
|
||||||
|
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
|
||||||
|
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_command('packadd packer.nvim')
|
||||||
|
|
||||||
|
local no_errors, error_msg = pcall(function()
|
||||||
|
|
||||||
|
_G._packer = _G._packer or {}
|
||||||
|
_G._packer.inside_compile = true
|
||||||
|
|
||||||
|
local time
|
||||||
|
local profile_info
|
||||||
|
local should_profile = false
|
||||||
|
if should_profile then
|
||||||
|
local hrtime = vim.loop.hrtime
|
||||||
|
profile_info = {}
|
||||||
|
time = function(chunk, start)
|
||||||
|
if start then
|
||||||
|
profile_info[chunk] = hrtime()
|
||||||
|
else
|
||||||
|
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
time = function(chunk, start) end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function save_profiles(threshold)
|
||||||
|
local sorted_times = {}
|
||||||
|
for chunk_name, time_taken in pairs(profile_info) do
|
||||||
|
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
||||||
|
end
|
||||||
|
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
||||||
|
local results = {}
|
||||||
|
for i, elem in ipairs(sorted_times) do
|
||||||
|
if not threshold or threshold and elem[2] > threshold then
|
||||||
|
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if threshold then
|
||||||
|
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
|
||||||
|
end
|
||||||
|
|
||||||
|
_G._packer.profile_output = results
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[Luarocks path setup]], true)
|
||||||
|
local package_path_str = "/home/thierry/.cache/nvim/packer_hererocks/2.1.1748459687/share/lua/5.1/?.lua;/home/thierry/.cache/nvim/packer_hererocks/2.1.1748459687/share/lua/5.1/?/init.lua;/home/thierry/.cache/nvim/packer_hererocks/2.1.1748459687/lib/luarocks/rocks-5.1/?.lua;/home/thierry/.cache/nvim/packer_hererocks/2.1.1748459687/lib/luarocks/rocks-5.1/?/init.lua"
|
||||||
|
local install_cpath_pattern = "/home/thierry/.cache/nvim/packer_hererocks/2.1.1748459687/lib/lua/5.1/?.so"
|
||||||
|
if not string.find(package.path, package_path_str, 1, true) then
|
||||||
|
package.path = package.path .. ';' .. package_path_str
|
||||||
|
end
|
||||||
|
|
||||||
|
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
|
||||||
|
package.cpath = package.cpath .. ';' .. install_cpath_pattern
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[Luarocks path setup]], false)
|
||||||
|
time([[try_loadstring definition]], true)
|
||||||
|
local function try_loadstring(s, component, name)
|
||||||
|
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
||||||
|
if not success then
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
time([[try_loadstring definition]], false)
|
||||||
|
time([[Defining packer_plugins]], true)
|
||||||
|
_G.packer_plugins = {
|
||||||
|
["cyberdream.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/thierry/.local/share/nvim/site/pack/packer/start/cyberdream.nvim",
|
||||||
|
url = "https://github.com/scottmckendry/cyberdream.nvim"
|
||||||
|
},
|
||||||
|
["nvim-web-devicons"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/thierry/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||||
|
url = "https://github.com/nvim-tree/nvim-web-devicons"
|
||||||
|
},
|
||||||
|
["packer.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/thierry/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||||
|
url = "https://github.com/wbthomason/packer.nvim"
|
||||||
|
},
|
||||||
|
["tokyonight.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/home/thierry/.local/share/nvim/site/pack/packer/start/tokyonight.nvim",
|
||||||
|
url = "https://github.com/folke/tokyonight.nvim"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
time([[Defining packer_plugins]], false)
|
||||||
|
|
||||||
|
_G._packer.inside_compile = false
|
||||||
|
if _G._packer.needs_bufread == true then
|
||||||
|
vim.cmd("doautocmd BufRead")
|
||||||
|
end
|
||||||
|
_G._packer.needs_bufread = false
|
||||||
|
|
||||||
|
if should_profile then save_profiles() end
|
||||||
|
|
||||||
|
end)
|
||||||
|
|
||||||
|
if not no_errors then
|
||||||
|
error_msg = error_msg:gsub('"', '\\"')
|
||||||
|
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user