From 8d570cccdea31ac128493efe1acd3a1ab48220f8 Mon Sep 17 00:00:00 2001 From: Tyce Herrman Date: Thu, 17 Apr 2025 14:52:02 -0400 Subject: [PATCH] dracula and lazydev --- init.lua | 4 ++-- lua/custom/plugins/dracula.lua | 8 +++++++ lua/custom/plugins/lazydev.lua | 41 ++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 lua/custom/plugins/dracula.lua create mode 100644 lua/custom/plugins/lazydev.lua diff --git a/init.lua b/init.lua index 5cac3d14..00b45e39 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -992,7 +992,7 @@ require('lazy').setup({ -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lua/custom/plugins/dracula.lua b/lua/custom/plugins/dracula.lua new file mode 100644 index 00000000..34a4a13f --- /dev/null +++ b/lua/custom/plugins/dracula.lua @@ -0,0 +1,8 @@ +return { + 'binhtran432k/dracula.nvim', + lazy = false, + priority = 1000, + config = function() + vim.cmd.colorscheme 'dracula' + end, +} diff --git a/lua/custom/plugins/lazydev.lua b/lua/custom/plugins/lazydev.lua new file mode 100644 index 00000000..a3851b94 --- /dev/null +++ b/lua/custom/plugins/lazydev.lua @@ -0,0 +1,41 @@ +return { + { + 'folke/lazydev.nvim', + ft = 'lua', -- only load on lua files + opts = { + library = { + -- See the configuration section for more details + -- Load luvit types when the `vim.uv` word is found + { path = '${3rd}/luv/library', words = { 'vim%.uv' } }, + }, + }, + }, + { -- optional cmp completion source for require statements and module annotations + 'hrsh7th/nvim-cmp', + opts = function(_, opts) + opts.sources = opts.sources or {} + table.insert(opts.sources, { + name = 'lazydev', + group_index = 0, -- set group index to 0 to skip loading LuaLS completions + }) + end, + }, + { -- optional blink completion source for require statements and module annotations + 'saghen/blink.cmp', + opts = { + sources = { + -- add lazydev to your completion providers + default = { 'lazydev', 'lsp', 'path', 'snippets', 'buffer' }, + providers = { + lazydev = { + name = 'LazyDev', + module = 'lazydev.integrations.blink', + -- make lazydev completions top priority (see `:h blink.cmp`) + score_offset = 100, + }, + }, + }, + }, + }, + -- { "folke/neodev.nvim", enabled = false }, -- make sure to uninstall or disable neodev.nvim +}