Skip to content

Instantly share code, notes, and snippets.

@tk3
Created January 21, 2024 13:14
Show Gist options
  • Save tk3/eecd141d2f316b4e4da03a1dc53ae9af to your computer and use it in GitHub Desktop.
Save tk3/eecd141d2f316b4e4da03a1dc53ae9af to your computer and use it in GitHub Desktop.
~/.config/nvim/init.lua
local options = {
fileencoding = "utf-8",
backup = false,
swapfile = false,
number = true,
signcolumn = "yes",
mouse = "a",
mousemoveevent = true,
clipboard = "unnamedplus",
wrap = true,
ignorecase = true,
}
for k, v in pairs(options) do
vim.opt[k] = v
end
vim.cmd("autocmd TermOpen * :startinsert")
vim.cmd("autocmd TermOpen * setlocal norelativenumber")
vim.cmd("autocmd TermOpen * setlocal nonumber")
-- vim.api.nvim_create_autocmd({"TermOpen"}, {
-- pattern = {"*"},
-- callback = "startinsert",
-- })
-- lazy
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
local plugins = {
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
config = function()
vim.cmd.colorscheme "tokyonight-night"
-- vim.cmd.colorscheme "tokyonight-storm"
-- vim.cmd.colorscheme "tokyonight-day"
-- vim.cmd.colorscheme "tokyonight-moon"
end
},
{
"wakatime/vim-wakatime",
lazy = false
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
"3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
}
},
{
"nvim-tree/nvim-tree.lua",
lazy = true,
dependencies = {
"nvim-tree/nvim-web-devicons",
},
},
}
require("lazy").setup(plugins)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment