You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.5 KiB
Lua

-- set this early so plugins etc can all use it
vim.g.mapleader = " "
-- disable netrw at the very start of your init.lua (strongly advised)
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- bootstrap & set up 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)
require("lazy").setup("plugins", {
install = {
colorscheme = { "catppuccin" },
missing = true,
},
change_detection = {
enabled = true,
notify = false,
},
ui = {
border = "rounded",
icons = {
list = { "" },
},
},
})
-- load remaining config
require("options")
require("binds")
-- highlight yank
vim.api.nvim_create_augroup("highlight_yank", {})
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
group = "highlight_yank",
pattern = { "*" },
callback = function()
vim.highlight.on_yank({
higroup = "Visual",
timeout = 150,
})
end,
})
-- Disable semantic highlights
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
client.server_capabilities.semanticTokensProvider = nil
end,
})