From 525c4ca77f39202d7218023841e9ac4d57560abb Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Mon, 2 Oct 2023 09:44:28 -0700 Subject: [PATCH] Create init.lua from work computer --- windows-files/init.lua | 132 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 windows-files/init.lua diff --git a/windows-files/init.lua b/windows-files/init.lua new file mode 100644 index 0000000..320b4ed --- /dev/null +++ b/windows-files/init.lua @@ -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 '>+1gv=gv"); +vim.keymap.set("v", "K", ":m '<-2gv=gv"); + +vim.keymap.set("n", "", "zz"); +vim.keymap.set("n", "", "zz"); + +vim.keymap.set("n", "n", "nzzzv"); +vim.keymap.set("n", "N", "Nzzzv"); + +vim.keymap.set("x", "p", "\"_dP"); +vim.keymap.set("n", "y", "\"+y"); +vim.keymap.set("v", "y", "\"+y"); +vim.keymap.set("n", "Y", "\"+Y"); + +vim.keymap.set("n", "d", "\"_d"); +vim.keymap.set("v", "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) +