created a tokyo night theme for hyprland
This commit is contained in:
@@ -6,10 +6,9 @@ require("config.keymaps")
|
||||
require("config.lazy")
|
||||
|
||||
-- Plugin settings
|
||||
require("config.plugins.mason")
|
||||
require("config.plugins.treesitter")
|
||||
require("config.plugins.lsp")
|
||||
require("config.plugins.completion")
|
||||
require("config.plugins.telescope")
|
||||
require("config.plugins.explorer")
|
||||
require("config.plugins.whichkey")
|
||||
|
||||
|
@@ -1,19 +1,13 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "4aa03a08c3705e622f2e7886783fd450f7749cdd" },
|
||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "059e89495b3ec09395262f16b1ad441a38081d04" },
|
||||
"nvim-deus": { "branch": "master", "commit": "b930172dc75d00084233abc6f19f0708c298d8be" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "3e873195f501b1e02d9fd7e5af5cbe74fc2f98c1" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "d3ad666b7895f958d088cceb6f6c199672c404fe" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "c3c193594213c5e2f89ec5d7729cad805f76b256" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "523a9e148919f58eb5a013f76787e57696e00c93" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
}
|
||||
|
0
.config/nvim/lua/cmp.lua
Normal file
0
.config/nvim/lua/cmp.lua
Normal file
@@ -1,21 +1,27 @@
|
||||
local global = vim.g
|
||||
local o = vim.opt
|
||||
|
||||
-- Basic settings
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.tabstop = 2
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.expandtab = true
|
||||
vim.o.smartindent = true
|
||||
vim.o.wrap = false
|
||||
vim.o.cursorline = true
|
||||
vim.o.termguicolors = true
|
||||
vim.o.ruler = true
|
||||
vim.o.visualbell = true
|
||||
vim.o.modelines = 0
|
||||
vim.o.colorcolumn = '+1,100,120'
|
||||
vim.o.hidden = true
|
||||
vim.o.showmode = true
|
||||
-- Editor options
|
||||
|
||||
-- Syntax highlighting and filetype plugins
|
||||
vim.cmd('syntax enable')
|
||||
vim.cmd('filetype plugin indent on')
|
||||
o.number = true -- Print the line number in front of each line
|
||||
o.relativenumber = true -- Show the line number relative to the line with the cursor in front of each line.
|
||||
o.clipboard = "unnamedplus" -- uses the clipboard register for all operations except yank.
|
||||
o.syntax = "on" -- When this option is set, the syntax with this name is loaded.
|
||||
o.autoindent = true -- Copy indent from current line when starting a new line.
|
||||
o.cursorline = true -- Highlight the screen line of the cursor with CursorLine.
|
||||
o.expandtab = true -- In Insert mode: Use the appropriate number of spaces to insert a <Tab>.
|
||||
o.shiftwidth = 2 -- Number of spaces to use for each step of (auto)indent.
|
||||
o.tabstop = 2 -- Number of spaces that a <Tab> in the file counts for.
|
||||
o.encoding = "UTF-8" -- Sets the character encoding used inside Vim.
|
||||
o.ruler = true -- Show the line and column number of the cursor position, separated by a comma.
|
||||
o.mouse = "a" -- Enable the use of the mouse. "a" you can use on all modes
|
||||
o.title = true -- When on, the title of the window will be set to the value of 'titlestring'
|
||||
o.hidden = true -- When on a buffer becomes hidden when it is |abandon|ed
|
||||
o.ttimeoutlen = 0 -- The time in milliseconds that is waited for a key code or mapped key sequence to complete.
|
||||
o.wildmenu = true -- When 'wildmenu' is on, command-line completion operates in an enhanced mode.
|
||||
o.showcmd = true -- Show (partial) command in the last line of the screen. Set this option off if your terminal is slow.
|
||||
o.showmatch = true -- When a bracket is inserted, briefly jump to the matching one.
|
||||
o.inccommand = "split" -- When nonempty, shows the effects of :substitute, :smagic, :snomagic and user commands with the :command-preview flag as you type.
|
||||
o.splitright = true
|
||||
o.splitbelow = true -- When on, splitting a window will put the new window below the current one
|
||||
o.termguicolors = true
|
||||
|
@@ -1,81 +0,0 @@
|
||||
-- completion.lua
|
||||
local has_cmp, cmp = pcall(require, 'cmp')
|
||||
if not has_cmp then
|
||||
print("Warning: nvim-cmp not found. Autocompletion won't be available.")
|
||||
return
|
||||
end
|
||||
|
||||
local has_luasnip, luasnip = pcall(require, 'luasnip')
|
||||
if not has_luasnip then
|
||||
print("Warning: luasnip not found. Snippet expansion won't be available.")
|
||||
return
|
||||
end
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept explicitly selected item
|
||||
|
||||
-- Tab support
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
}),
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
-- Add icons
|
||||
vim_item.menu = ({
|
||||
nvim_lsp = "[LSP]",
|
||||
luasnip = "[Snippet]",
|
||||
buffer = "[Buffer]",
|
||||
path = "[Path]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
-- Enable command-line completion
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' },
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
|
||||
print("Completion system initialized!")
|
||||
|
@@ -1,26 +1,18 @@
|
||||
-- lsp.lua
|
||||
-- Install Mason first for managing servers
|
||||
require("mason").setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
-- Connect Mason with lspconfig
|
||||
require("mason-lspconfig").setup({
|
||||
-- Automatically install these servers
|
||||
ensure_installed = {
|
||||
"lua_ls", -- Lua
|
||||
"pyright", -- Python
|
||||
"biome", -- TypeScript/JavaScript
|
||||
"rust_analyzer", -- Rust
|
||||
"gopls", -- Go
|
||||
"clangd", -- C/C++
|
||||
"bashls", -- Bash
|
||||
"lua_ls", -- Lua
|
||||
"pyright", -- Python
|
||||
"biome", -- TypeScript/JavaScript
|
||||
"rust_analyzer", -- Rust
|
||||
"gopls", -- Go
|
||||
"clangd", -- C/C++
|
||||
"bashls", -- Bash
|
||||
"emmet_language_server", -- Emmet
|
||||
"somesass_ls", -- SASS
|
||||
"hyprls", -- Hyprlang
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
10
.config/nvim/lua/config/plugins/mason.lua
Normal file
10
.config/nvim/lua/config/plugins/mason.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Install Mason first for managing servers
|
||||
require("mason").setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
})
|
@@ -1,56 +0,0 @@
|
||||
-- telescope.lua
|
||||
-- Check if telescope is available
|
||||
local has_telescope, telescope = pcall(require, "telescope")
|
||||
if not has_telescope then
|
||||
print("Warning: telescope not found. Fuzzy finding won't be available.")
|
||||
return
|
||||
end
|
||||
|
||||
-- Set up telescope with error handling
|
||||
local setup_ok, _ = pcall(telescope.setup, {
|
||||
defaults = {
|
||||
prompt_prefix = "🔍 ",
|
||||
selection_caret = "❯ ",
|
||||
path_display = { "truncate" },
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
preview_width = 0.55,
|
||||
results_width = 0.8,
|
||||
},
|
||||
width = 0.87,
|
||||
height = 0.80,
|
||||
preview_cutoff = 120,
|
||||
},
|
||||
file_ignore_patterns = {
|
||||
"node_modules/",
|
||||
".git/",
|
||||
".DS_Store"
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
-- Configure any extensions here
|
||||
}
|
||||
})
|
||||
|
||||
if not setup_ok then
|
||||
print("Error setting up telescope. Some features might not work correctly.")
|
||||
return
|
||||
end
|
||||
|
||||
-- Load telescope extensions if available
|
||||
pcall(function() require('telescope').load_extension('fzf') end)
|
||||
|
||||
-- Useful Telescope mappings with error handling
|
||||
local builtin_ok, builtin = pcall(require, 'telescope.builtin')
|
||||
if builtin_ok then
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = "Find files" })
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = "Live grep" })
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = "Buffers" })
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = "Help tags" })
|
||||
-- LSP-related searches
|
||||
vim.keymap.set('n', '<leader>fd', builtin.lsp_definitions, { desc = "Find definitions" })
|
||||
vim.keymap.set('n', '<leader>fr', builtin.lsp_references, { desc = "Find references" })
|
||||
end
|
||||
|
||||
print("Fuzzy finder initialized!")
|
||||
|
@@ -1,2 +1,2 @@
|
||||
-- theme.lua
|
||||
vim.cmd[[colorscheme deus]]
|
||||
vim.cmd[[colorscheme tokyonight]]
|
||||
|
@@ -1,11 +0,0 @@
|
||||
-- Autocompletion system
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp", -- LSP source for nvim-cmp
|
||||
"hrsh7th/cmp-buffer", -- Buffer source
|
||||
"hrsh7th/cmp-path", -- Path source
|
||||
"L3MON4D3/LuaSnip", -- Snippet engine
|
||||
"saadparwaiz1/cmp_luasnip", -- Snippet source
|
||||
},
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
-- Color scheme
|
||||
return {
|
||||
"theniceboy/nvim-deus"
|
||||
}
|
@@ -2,8 +2,6 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig", -- Base LSP configurations
|
||||
dependencies = {
|
||||
-- Server installation manager
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
7
.config/nvim/lua/plugins/mason.lua
Normal file
7
.config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
},
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
-- Fuzzy finder
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" }
|
||||
}
|
6
.config/nvim/lua/plugins/tokyonight.lua
Normal file
6
.config/nvim/lua/plugins/tokyonight.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opt = {},
|
||||
}
|
Reference in New Issue
Block a user