Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
- -- option
- vim.opt.background = dark
- vim.opt.number = true
- vim.opt.shell = "fish"
- vim.opt.wrap = false
- vim.opt.title = true
- vim.opt.termguicolors = true
- vim.opt.list = true
- vim.opt.listchars:append("space:⋅")
- vim.opt.listchars:append("eol:↴")
- vim.opt.clipboard = "unnamedplus"
- vim.g.mapleader = " "
- vim.g.loaded_netrw = 1
- vim.g.loaded_netrwPlugin = 1
- vim.g.markdown_fenced_languages = {
- "ts=typescript",
- }
- vim.wo.number = true
- -- keymap
- local keymap = vim.keymap
- -- increase/decrease
- keymap.set("n", "<C-+>", "<C-a>")
- keymap.set("n", "<C-->", "<C-x>")
- --select all
- keymap.set("n", "<C-a>", "gg<S-v>G")
- -- new tab
- keymap.set("n", "<C-n>", ":tabedit")
- --move window
- keymap.set("n", "<space>ww", "<C-w>w")
- keymap.set("n", "<Tab>", "<Cmd>BufferLineCycleNext<CR>", {})
- keymap.set("n", "<S-Tab>", "<Cmd>BufferLineCyclePrev<CR>", {})
- keymap.set("n", "<leader>c", "<cmd>e .config/nvim/init.lua<CR>", {})
- --plugin
- require("lazy").setup({
- {
- "nvim-neorg/neorg", --taking note
- build = ":Neorg sync-parsers",
- dependencies = { "nvim-lua/plenary.nvim" },
- config = function()
- require("neorg").setup({
- load = {
- ["core.defaults"] = {}, -- Loads default behaviour
- ["core.concealer"] = {}, -- Adds pretty icons to your documents
- ["core.dirman"] = { -- Manages Neorg workspaces
- config = {
- workspaces = {
- notes = "~/notes",
- },
- },
- },
- },
- })
- end,
- },
- {
- "VonHeikemen/lsp-zero.nvim",
- branch = "v1.x",
- dependencies = {
- -- 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" },
- },
- },
- { "nvimdev/guard.nvim", lazy = false },
- {
- "williamboman/mason.nvim",
- lazy = false,
- config = function()
- require("mason").setup()
- end,
- },
- {
- "williamboman/mason-lspconfig.nvim",
- lazy = false,
- config = function()
- require("mason-lspconfig")
- end,
- },
- {
- "nvim-treesitter/nvim-treesitter",
- build = ":TSUpdate",
- config = function()
- local configs = require("nvim-treesitter.configs")
- configs.setup({
- ensure_installed = { "lua", "javascript", "java", "html", "python" },
- sync_install = false,
- highlight = { enable = true },
- indent = { enable = true },
- })
- end,
- },
- {
- "folke/noice.nvim", -- noice
- event = "VeryLazy",
- config = function()
- require("noice").setup({
- lsp = {
- -- override markdown rendering so that **cmp** and other plugins use **Treesitter**
- override = {
- ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
- ["vim.lsp.util.stylize_markdown"] = true,
- ["cmp.entry.get_documentation"] = true,
- },
- },
- -- you can enable a preset for easier configuration
- presets = {
- bottom_search = true, -- use a classic bottom cmdline for search
- command_palette = true, -- position the cmdline and popupmenu together
- long_message_to_split = true, -- long messages will be sent to a split
- inc_rename = false, -- enables an input dialog for inc-rename.nvim
- lsp_doc_border = false, -- add a border to hover docs and signature help
- },
- })
- end,
- dependencies = {
- "MunifTanjim/nui.nvim",
- -- OPTIONAL:
- -- `nvim-notify` is only needed, if you want to use the notification view.
- -- If not available, we use `mini` as the fallback
- "rcarriga/nvim-notify",
- },
- },
- {
- "akinsho/bufferline.nvim",
- version = "*",
- config = function()
- require("bufferline").setup({
- options = {
- mode = "tabs",
- separator_style = "slant",
- always_show_bufferline = false,
- show_buffer_close_icons = false,
- show_close_icon = false,
- color_icons = true,
- },
- highlights = {
- separator = {
- fg = "#073642",
- bg = "#002b36",
- },
- separator_selected = {
- fg = "#073642",
- },
- background = {
- fg = "#657b83",
- bg = "#002b36",
- },
- buffer_selected = {
- fg = "#fdf6e3",
- bold = true,
- },
- fill = {
- bg = "#073642",
- },
- },
- })
- end,
- dependencies = "nvim-tree/nvim-web-devicons",
- }, --bufferline
- {
- "echasnovski/mini.indentscope",
- lazy = false,
- version = "*", -- wait till new 0.7.0 release to put it back on semver
- event = { "BufReadPre", "BufNewFile" },
- opts = {
- symbol = "│",
- options = { try_as_border = true },
- },
- init = function()
- vim.api.nvim_create_autocmd("FileType", {
- pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
- callback = function()
- vim.b.miniindentscope_disable = true
- end,
- })
- end,
- },
- {
- "rcarriga/nvim-notify",
- config = function()
- require("notify").setup({
- background_color = "#000000",
- })
- end,
- },
- {
- "pwntester/nautilus.nvim",
- lazy = false,
- config = function()
- vim.cmd([[colorscheme nautilus]])
- end,
- },
- {
- "goolord/alpha-nvim",
- config = function()
- require("alpha").setup(require("alpha.themes.dashboard").config)
- end,
- },
- {
- "nvim-tree/nvim-tree.lua",
- keys = {
- { "<space>e", "<cmd>NvimTreeFocus<cr>", desc = "focus nvim-tree" },
- { "<C-n>", "<cmd>NvimTreeToggle<cr>", desc = "toggle nvim-tree" },
- },
- config = function()
- require("nvim-tree").setup({
- filters = {
- dotfiles = false,
- exclude = { vim.fn.stdpath("config") .. "/lua/custom" },
- },
- disable_netrw = true,
- hijack_netrw = true,
- hijack_cursor = true,
- hijack_unnamed_buffer_when_opening = false,
- sync_root_with_cwd = true,
- update_focused_file = {
- enable = true,
- update_root = false,
- },
- view = {
- adaptive_size = false,
- side = "left",
- width = 30,
- preserve_window_proportions = true,
- },
- git = {
- enable = false,
- ignore = true,
- },
- filesystem_watchers = {
- enable = true,
- },
- actions = {
- open_file = {
- resize_window = true,
- },
- },
- renderer = {
- root_folder_label = false,
- highlight_git = false,
- highlight_opened_files = "none",
- indent_markers = {
- enable = false,
- },
- icons = {
- show = {
- file = true,
- folder = true,
- folder_arrow = true,
- git = false,
- },
- glyphs = {
- default = "",
- symlink = "",
- folder = {
- default = "",
- empty = "",
- empty_open = "",
- open = "",
- symlink = "",
- symlink_open = "",
- arrow_open = "",
- arrow_closed = "",
- },
- git = {
- unstaged = "✗",
- staged = "✓",
- unmerged = "",
- renamed = "➜",
- untracked = "★",
- deleted = "",
- ignored = "◌",
- },
- },
- },
- },
- })
- end,
- },
- {
- "windwp/nvim-autopairs",
- event = "InsertEnter",
- opts = {},
- },
- {
- "sudormrfbin/cheatsheet.nvim",
- dependencies = {
- "nvim-telescope/telescope.nvim",
- "nvim-lua/popup.nvim",
- "nvim-lua/plenary.nvim",
- },
- keys = { "<C-e>", "<cmd>Cheatsheet<cr>", desc = "toggle cheatsheet" },
- },
- {
- "MaximilianLloyd/ascii.nvim",
- dependencies = { "MunifTanjim/nui.nvim" },
- },
- {
- "nvim-telescope/telescope.nvim",
- lazy = false,
- tag = "0.1.2",
- dependencies = { "nvim-lua/plenary.nvim" },
- },
- {
- "folke/which-key.nvim",
- event = "VeryLazy",
- keys = { "<leader>", "<cmd>WhickKey<cr>", desc = "toggle whichkey" },
- init = function()
- vim.o.timeout = true
- vim.o.timeoutlen = 300
- end,
- opts = {
- -- your configuration comes here
- -- or leave it empty to use the default settings
- -- refer to the configuration section below
- },
- },
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement