Create init.lua from work computer

This commit is contained in:
Nickiel12 2023-10-02 09:44:28 -07:00 committed by GitHub
parent c7b8df63d0
commit 525c4ca77f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

132
windows-files/init.lua Normal file
View file

@ -0,0 +1,132 @@
-- Put in ~/AppData/Local/nvim
vim.opt.signcolumn = 'yes';
vim.opt.scrolloff = 8;
vim.opt.autoindent = true;
vim.opt.expandtab = true;
vim.opt.foldlevel = 20;
vim.opt.number = true;
vim.opt.shiftwidth = 4;
vim.opt.tabstop = 4;
vim.g.mapleader = ' ';
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv");
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv");
vim.keymap.set("n", "<C-d>", "<C-d>zz");
vim.keymap.set("n", "<C-u>", "<C-u>zz");
vim.keymap.set("n", "n", "nzzzv");
vim.keymap.set("n", "N", "Nzzzv");
vim.keymap.set("x", "<leader>p", "\"_dP");
vim.keymap.set("n", "<leader>y", "\"+y");
vim.keymap.set("v", "<leader>y", "\"+y");
vim.keymap.set("n", "<leader>Y", "\"+Y");
vim.keymap.set("n", "<leader>d", "\"_d");
vim.keymap.set("v", "<leader>d", "\"_d");
require("monokai-pro").setup({
transparent_background = false,
terminal_colors = true,
devicons = true, -- highlight the icons of `nvim-web-devicons`
styles = {
comment = { italic = true },
keyword = { italic = true }, -- any other keyword
type = { italic = true }, -- (preferred) int, long, char, etc
storageclass = { italic = true }, -- static, register, volatile, etc
structure = { italic = true }, -- struct, union, enum, etc
parameter = { italic = true }, -- parameter pass in function
annotation = { italic = true },
tag_attribute = { italic = true }, -- attribute of tag in reactjs
},
filter = "pro", -- classic | octagon | pro | machine | ristretto | spectrum
-- Enable this will disable filter option
day_night = {
enable = false, -- turn off by default
day_filter = "pro", -- classic | octagon | pro | machine | ristretto | spectrum
night_filter = "spectrum", -- classic | octagon | pro | machine | ristretto | spectrum
},
inc_search = "background", -- underline | background
background_clear = {
-- "float_win",
"toggleterm",
"telescope",
-- "which-key",
"renamer",
"notify",
-- "nvim-tree",
-- "neo-tree",
-- "bufferline", -- better used if background of `neo-tree` or `nvim-tree` is cleared
},-- "float_win", "toggleterm", "telescope", "which-key", "renamer", "neo-tree", "nvim-tree", "bufferline"
plugins = {
bufferline = {
underline_selected = false,
underline_visible = false,
},
indent_blankline = {
context_highlight = "default", -- default | pro
context_start_underline = false,
},
},
---@param c Colorscheme
override = function(c) end,
})
-- lua
vim.cmd([[colorscheme monokai-pro]])
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use {
"loctvl842/monokai-pro.nvim",
config = function()
require("monokai-pro").setup()
end
}
use {
'nvim-telescope/telescope.nvim', tag = '0.1.0',
-- or , branch = '0.1.x',
requires = { {'nvim-lua/plenary.nvim'} }
}
use {
'nvim-treesitter/nvim-treesitter',
run = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update()
end,}
use("nvim-treesitter/playground")
use("nvim-treesitter/nvim-treesitter-context");
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v1.x',
requires = {
-- LSP Support
{'neovim/nvim-lspconfig'},
{'williamboman/mason.nvim'},
{'williamboman/mason-lspconfig.nvim'},
-- Autocompletion
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-buffer'},
{'hrsh7th/cmp-path'},
{'saadparwaiz1/cmp_luasnip'},
{'hrsh7th/cmp-nvim-lsp'},
{'hrsh7th/cmp-nvim-lua'},
-- Snippets
{'L3MON4D3/LuaSnip'},
{'rafamadriz/friendly-snippets'},
}
}
end)