Ver Fonte

working setup from bwf

Sven Eppler há 1 mês atrás
pai
commit
d98e72f30a

+ 19 - 0
init.lua

@@ -0,0 +1,19 @@
+require("config.lazy")
+
+vim.lsp.enable("clangd")
+vim.cmd(":set number")
+vim.cmd(":colorscheme dracula")
+
+vim.diagnostic.config({
+         -- virtual_lines = true,
+         virtual_text = true,
+	 signs = false
+
+      })
+
+vim.cmd(":set scrolloff=5")
+
+vim.api.nvim_set_hl(0, 'DiffAdd', { fg = 'none', bg = '#2e4b2e', bold = true })
+          vim.api.nvim_set_hl(0, 'DiffDelete', { fg = 'none', bg = '#4c1e15', bold = true })
+          vim.api.nvim_set_hl(0, 'DiffChange', { fg = 'none', bg = '#45565c', bold = true })
+          vim.api.nvim_set_hl(0, 'DiffText', { fg = 'none', bg = '#996d74', bold = true })

+ 16 - 0
lazy-lock.json

@@ -0,0 +1,16 @@
+{
+  "catppuccin": { "branch": "main", "commit": "af58927c55c9f3272c940ff02b3cee94a1249f26" },
+  "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
+  "dracula.nvim": { "branch": "main", "commit": "041d923368d540a1e438989ce8f915628081a56a" },
+  "lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" },
+  "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
+  "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
+  "neo-tree.nvim": { "branch": "v3.x", "commit": "c4c168e459395275c552179a1baf9c3d885d6a74" },
+  "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
+  "nvim-lspconfig": { "branch": "master", "commit": "ac98db2f9f06a56498ec890a96928774eae412c3" },
+  "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
+  "nvim-web-devicons": { "branch": "master", "commit": "b8221e42cf7287c4dcde81f232f58d7b947c210d" },
+  "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
+  "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
+  "tokyonight.nvim": { "branch": "main", "commit": "d14614cbfc63b6037bfccd48bb982d2ad2003352" }
+}

+ 35 - 0
lua/config/lazy.lua

@@ -0,0 +1,35 @@
+-- Bootstrap lazy.nvim
+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+if not (vim.uv or vim.loop).fs_stat(lazypath) then
+  local lazyrepo = "https://github.com/folke/lazy.nvim.git"
+  local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
+  if vim.v.shell_error ~= 0 then
+    vim.api.nvim_echo({
+      { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
+      { out, "WarningMsg" },
+      { "\nPress any key to exit..." },
+    }, true, {})
+    vim.fn.getchar()
+    os.exit(1)
+  end
+end
+vim.opt.rtp:prepend(lazypath)
+
+-- Make sure to setup `mapleader` and `maplocalleader` before
+-- loading lazy.nvim so that mappings are correct.
+-- This is also a good place to setup other settings (vim.opt)
+vim.g.mapleader = " "
+vim.g.maplocalleader = "\\"
+
+-- Setup lazy.nvim
+require("lazy").setup({
+  spec = {
+    -- import your plugins
+    { import = "plugins" },
+  },
+  -- Configure any other settings here. See the documentation for more details.
+  -- colorscheme that will be used when installing plugins.
+  install = { colorscheme = { "habamax" } },
+  -- automatically check for plugin updates
+  checker = { enabled = true, notify = false },
+})

+ 1 - 0
lua/plugins/catppuccin.lua

@@ -0,0 +1 @@
+return { "catppuccin/nvim", name = "catppuccin", priority = 1000 }

+ 1 - 0
lua/plugins/diffview.lua

@@ -0,0 +1 @@
+return { "sindrets/diffview.nvim" }

+ 1 - 0
lua/plugins/dracula.lua

@@ -0,0 +1 @@
+return { "Mofiqul/dracula.nvim" }

+ 1 - 0
lua/plugins/lsp-config.lua

@@ -0,0 +1 @@
+return { "neovim/nvim-lspconfig" }

+ 8 - 0
lua/plugins/lualine.lua

@@ -0,0 +1,8 @@
+return { 'nvim-lualine/lualine.nvim',
+	dependencies = {
+	    'nvim-tree/nvim-web-devicons'
+	},
+	config = function()
+		require('lualine').setup()
+	end
+}

+ 19 - 0
lua/plugins/mason.lua

@@ -0,0 +1,19 @@
+return {
+    "mason-org/mason.nvim",
+    opts = {
+        ui = {
+            icons = {
+                package_installed = "✓",
+                package_pending = "➜",
+                package_uninstalled = "✗"
+            }
+        }
+    },
+    config = function() 
+		-- Disable LSPs in diff mode
+		if(vim.opt.diff:get()) then
+			return
+		end
+	end
+
+}

+ 13 - 0
lua/plugins/neotree.lua

@@ -0,0 +1,13 @@
+return {
+    "nvim-neo-tree/neo-tree.nvim",
+    branch = "v3.x",
+    dependencies = {
+      "nvim-lua/plenary.nvim",
+      "MunifTanjim/nui.nvim",
+      "nvim-tree/nvim-web-devicons", -- optional, but recommended
+    },
+    lazy = false, -- neo-tree will lazily load itself
+    config = function()
+	vim.keymap.set("n", "<c-b>", "<Cmd>Neotree toggle<CR>")
+    end
+  }

+ 12 - 0
lua/plugins/telescope.lua

@@ -0,0 +1,12 @@
+return {
+	'nvim-telescope/telescope.nvim', tag = '0.1.8',
+	dependencies = { 'nvim-lua/plenary.nvim' },
+	config = function()
+		local builtin = require('telescope.builtin')
+		vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
+		vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
+		vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
+		vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
+	end
+
+}

+ 6 - 0
lua/plugins/tokynight.lua

@@ -0,0 +1,6 @@
+return {
+  "folke/tokyonight.nvim",
+  lazy = false,
+  priority = 1000,
+  opts = {},
+}

+ 6 - 0
lua/plugins/treesitter.lua

@@ -0,0 +1,6 @@
+return {
+	"nvim-treesitter/nvim-treesitter",
+	branch = 'master',
+	lazy = false,
+	build = ":TSUpdate"
+}