Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 149 additions & 15 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ vim.g.have_nerd_font = false
-- NOTE: You can change these options as you wish!
-- For more options, you can see `:help option-list`

-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1

-- optionally enable 24-bit colour
vim.opt.termguicolors = true

-- Make line numbers default
vim.o.number = true
-- You can also add relative line numbers, to help with jumping.
Expand All @@ -110,7 +117,7 @@ vim.o.mouse = 'a'
-- Don't show the mode, since it's already in the status line
vim.o.showmode = false

-- Sync clipboard between OS and Neovim.
-- Sync clipboard between OS a:nd Neovim.
-- Schedule the setting after `UiEnter` because it can increase startup-time.
-- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'`
Expand Down Expand Up @@ -152,6 +159,11 @@ vim.o.splitbelow = true
vim.o.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }

vim.opt.expandtab = false
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2

-- Preview substitutions live, as you type!
vim.o.inccommand = 'split'

Expand All @@ -161,9 +173,9 @@ vim.o.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor.
vim.o.scrolloff = 10

-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
-- instead raise a dialog asking if you wish to save the current file(s)
-- See `:help 'confirm'`
-- vs cresbezvat na bcrengvba gung jbhyq snvy qhr gb hafnirq punatrf va gur ohssre (yvxr `:d`),
-- vafgrnq envfr n qvnybt nfxvat vs lbh jvfu gb fnir gur pheerag svyr(f)
-- Frr `:uryc 'pbasvez'`
vim.o.confirm = true

-- [[ Basic Keymaps ]]
Expand All @@ -175,7 +187,8 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')

-- Diagnostic keymaps
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })

vim.keymap.set('n', '<C-n>', ':Neotree<CR>', { desc = 'Toggles Neotree' })
vim.keymap.set('n', '<C-t>', ':colorscheme theme<CR>', { desc = 'Toggles the theme bc wow its annoying asf' })
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
-- is not what someone will guess without a bit more experience.
Expand All @@ -202,12 +215,22 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J",i { desc = "Move window to the lower" })
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })

-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`

vim.lsp.config('*', {
capabilities = {
workspace = {
didChangeWatchedFiles = {
dynamicRegistration = true,
},
},
},
})

-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.hl.on_yank()`
Expand Down Expand Up @@ -248,7 +271,50 @@ rtp:prepend(lazypath)
require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically

{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require('lualine').setup {
options = {
theme = 'ayu_light',
},
}
end,
},
{
'mason-org/mason-lspconfig.nvim',
opts = {},
dependencies = {
{ 'mason-org/mason.nvim', opts = {} },
'neovim/nvim-lspconfig',
},
},
{
'lopi-py/luau-lsp.nvim',
opts = {
...,
},
dependencies = {
'nvim-lua/plenary.nvim',
},
},
--[[{
'nvim-tree/nvim-tree.lua',
version = '*',
lazy = false,
dependencies = {
'nvim-tree/nvim-web-devicons',
},
config = function()
require('nvim-tree').setup {
view = {
width = 25,
},
}
end,
},]]
--
-- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following
-- keys can be used to configure plugin behavior/loading/etc.
Expand Down Expand Up @@ -517,7 +583,6 @@ require('lazy').setup({
--
-- If you're wondering about lsp vs treesitter, you can check out the wonderfully
-- and elegantly composed help section, `:help lsp-vs-treesitter`

-- This function gets run when an LSP attaches to a particular buffer.
-- That is to say, every time a new file is opened that is associated with
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
Expand Down Expand Up @@ -835,7 +900,7 @@ require('lazy').setup({
-- <c-k>: Toggle signature help
--
-- See :h blink-cmp-config-keymap for defining your own keymap
preset = 'default',
preset = 'super-tab',

-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
Expand Down Expand Up @@ -876,7 +941,7 @@ require('lazy').setup({
},
},

{ -- You can easily change to a different colorscheme.
--[[{ -- You can easily change to a different colorscheme.
-- Change the name of the colorscheme plugin below, and then
-- change the command in the config to whatever the name of that colorscheme is.
--
Expand All @@ -894,9 +959,10 @@ require('lazy').setup({
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night'
vim.cmd.colorscheme 'theme'
end,
},
},]]
--

-- Highlight todo, notes, etc in comments
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
Expand Down Expand Up @@ -963,7 +1029,6 @@ require('lazy').setup({
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
},

-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
-- init.lua. If you want these files, they are in the repository, so you can just download them and
-- place them in the correct locations.
Expand All @@ -973,11 +1038,11 @@ require('lazy').setup({
-- Here are some example plugins that I've included in the Kickstart repository.
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',
require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps

-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
Expand All @@ -990,6 +1055,9 @@ require('lazy').setup({
-- Or use telescope!
-- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
-- you can continue same window with `<space>sr` which resumes last telescope search
{
dir = '~/AppData/Local/nvim/theme',
},
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the
Expand All @@ -1012,5 +1080,71 @@ require('lazy').setup({
},
})

vim.api.nvim_create_autocmd({ 'WinEnter', 'BufWinEnter' }, {
pattern = { 'NvimTree*' },
callback = function()
vim.opt.guicursor = '' -- Hide the cursor
end,
})

vim.api.nvim_create_autocmd({ 'WinLeave', 'BufWinLeave' }, {
pattern = { 'NvimTree*' },
callback = function()
-- Restore your desired cursor settings for other windows/buffers
-- Example: Restore default block cursor for normal mode
vim.opt.guicursor = 'n-v-c:block,i-ci-r:ver25,sm:block'
end,
})

vim.lsp.config('luau-lsp', {
settings = {
['luau-lsp'] = {
completion = {
imports = {
enabled = true, -- enable auto imports
},
},
},
},
})

require('mason-lspconfig').setup {
automatic_enable = {
exclude = { 'luau_lsp' },
},
platform = {
type = 'roblox',
},
types = {
roblox_security_level = 'PluginSecurity',
},
sourcemap = {
enabled = true,
autogenerate = true, -- automatic generation when the server is initialized
rojo_project_file = 'default.project.json',
sourcemap_file = 'sourcemap.json',
},
}

require('luau-lsp').setup {
plugin = {
enabled = true,
port = 3667,
},
fflags = {
enable_new_solver = true, -- enables the fflags required for luau's new type solver
sync = true, -- sync currently enabled fflags with roblox's published fflags
override = { -- override fflags passed to luau
LuauTableTypeMaximumStringifierLength = '100',
},
},
}

vim.api.nvim_create_autocmd('Colorscheme', {
callback = function()
require('theme').setup()
end,
})

-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et
5 changes: 0 additions & 5 deletions lua/custom/plugins/init.lua

This file was deleted.

1 change: 1 addition & 0 deletions theme/colors/theme.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('theme').setup()
92 changes: 92 additions & 0 deletions theme/lua/theme/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
local M = {}

function M.setup()
local colors = {
purple = '#7f8cff',
black = '#000000',
white = '#ededed',
orange = '#ffaa00',
green = '#00c427',
red = '#e60000',
blue = '#00a6ff',
}

local highlights = {

Normal = { fg = colors.black, bg = colors.white },
CursorLine = { bg = '#e6e6e6' },
LineNr = { fg = colors.purple },

-- Neovim text configurations --
Function = { fg = colors.purple },
Identifier = { fg = colors.purple },
MoreMsg = { fg = colors.purple },
String = { fg = colors.purple },
QuickFixLine = { fg = colors.purple },
Question = { fg = colors.purple },

-- Other configuratiosn --
Special = { fg = colors.purple },

-- Todo configurations --
TodoFgTODO = { fg = colors.blue },
TodoFgNOTE = { fg = colors.blue },

TodoBgTODO = { fg = colors.white, bg = colors.blue },
TodoBgNOTE = { fg = colors.white, bg = colors.blue },

-- [ TREESITTER RELATED / TEXT CONFIGURATIONS ] --

-- Literals --
['@string'] = { fg = colors.purple },
['@boolean'] = { fg = colors.purple },
['@character'] = { fg = colors.purple },
['@number'] = { fg = colors.orange },

-- Identifiers --
['@variable'] = { fg = colors.black },
['@module'] = { fg = colors.black },

-- Types --
['@type'] = { fg = colors.purple },
['@property'] = { fg = colors.purple },

-- Keyword related --
['@keyword'] = { fg = colors.purple },

-- Comment related --
['@comment'] = { fg = colors.orange },
['@comment.warning'] = { fg = colors.orange },
['@comment.todo'] = { fg = colors.green },
['@comment.documentation'] = { fg = colors.blue },
['@comment.note'] = { fg = colors.blue },
['@comment.error'] = { fg = colors.red },

-- Functions --
['@function'] = { fg = colors.purple },
['@function.builtin'] = { fg = colors.black },
['@constructor'] = { fg = colors.black },
['@operator'] = { fg = colors.black },

-- Punctuation --
['@punctuation'] = { fg = colors.black },

-- [ NEOTREE COLOR CONFIGURATIONS ] --
Removed = { fg = colors.red },
NeoTreeGitUntracked = { fg = colors.purple },
Changed = { fg = colors.purple },
Directory = { fg = colors.purple },
Added = { fg = colors.green },

-- Diagnostic colors --
DiagnosticInfo = { fg = colors.purple },
DiagnosticOk = { fg = colors.purple },
DiagnosticWarn = { fg = colors.orange },
}

for group, opts in pairs(highlights) do
vim.api.nvim_set_hl(0, group, opts)
end
end

return M