diff options
author | crupest <crupest@outlook.com> | 2024-09-07 03:09:26 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2024-09-07 03:09:26 +0800 |
commit | 4b64e3d37ece2d7251347b3df8551e98363f845f (patch) | |
tree | 003c295cfd5b2615e566a07db76478aad427b906 /configs/nvim/config-root/init.lua | |
parent | faeef2cd919939ad9a3a276f2c603d7be9acb9ba (diff) | |
download | crupest-4b64e3d37ece2d7251347b3df8551e98363f845f.tar.gz crupest-4b64e3d37ece2d7251347b3df8551e98363f845f.tar.bz2 crupest-4b64e3d37ece2d7251347b3df8551e98363f845f.zip |
config(nvim): create new file structure.
Diffstat (limited to 'configs/nvim/config-root/init.lua')
-rw-r--r-- | configs/nvim/config-root/init.lua | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/configs/nvim/config-root/init.lua b/configs/nvim/config-root/init.lua new file mode 100644 index 0000000..a2b84aa --- /dev/null +++ b/configs/nvim/config-root/init.lua @@ -0,0 +1,60 @@ +if vim.g.neovide then + -- spellchecker: disable-next-line + vim.opt.guifont = "FiraCode Nerd Font"; + vim.g.neovide_window_blurred = true; + vim.g.neovide_transparency = 0.85; + vim.g.neovide_input_ime = false; + vim.g.neovide_cursor_animate_in_insert_mode = false + vim.g.neovide_cursor_vfx_mode = "pixiedust"; +end + +local is_win = vim.fn.has("win32") ~= 0 + +-- spellchecker: disable +if is_win then + vim.cmd([[ + let &shell = executable('pwsh') ? 'pwsh' : 'powershell' + let &shellcmdflag = '-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;' + let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode' + let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode' + set shellquote= shellxquote= + ]]) + vim.opt.completeslash = 'slash' +end +-- spellchecker: enable + +-- spellchecker: disable +vim.opt.termguicolors = true; +vim.opt.fileformats = "unix,dos"; +vim.opt.softtabstop = 4; +vim.opt.shiftwidth = 4; +vim.opt.expandtab = true; +vim.opt.wrap = false; +vim.opt.number = true; +-- spellchecker: enable + +vim.g.load_doxygen_syntax = true; +vim.g.doxygen_javadoc_autobrief = false; + +-- Init lazy.nvim +local lazy_path = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.uv.fs_stat(lazy_path) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazy_path, + }) +end +vim.opt.rtp:prepend(lazy_path) + +-- Use lazy.nvim +require("lazy").setup("plugins") + +vim.cmd("colorscheme catppuccin-macchiato") + +require("crupest.nvim.lsp").setup() +require("crupest.nvim.plugins").setup() +require("crupest.nvim.keymap").setup() |