more personalized

This commit is contained in:
ramintheredmn 2024-03-20 01:21:00 +03:30
parent 773e482d4b
commit 1d16292ce9
5 changed files with 118 additions and 11 deletions

View File

@ -89,9 +89,17 @@ P.S. You can delete this when you're done too. It's your config now! :)
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.filetype.add {
extension = {
html = 'html',
},
pattern = {
['*.html'] = 'html',
},
}
-- Set to true if you have a Nerd Font installed
vim.g.have_nerd_font = false
vim.g.have_nerd_font = true
-- [[ Setting options ]]
-- See `:help vim.opt`
@ -99,6 +107,7 @@ vim.g.have_nerd_font = false
-- For more options, you can see `:help option-list`
-- Make line numbers default
vim.opt.relativenumber = true
vim.opt.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
@ -401,6 +410,12 @@ require('lazy').setup({
end, { desc = '[S]earch [N]eovim files' })
end,
},
-- autopair
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
opts = {}, -- this is equalent to setup({}) function
},
{ -- LSP Configuration & Plugins
'neovim/nvim-lspconfig',
@ -540,7 +555,8 @@ require('lazy').setup({
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
pyright = { capabilities = capabilities },
-- rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
@ -548,7 +564,32 @@ require('lazy').setup({
-- https://github.com/pmizio/typescript-tools.nvim
--
-- But for many setups, the LSP (`tsserver`) will work just fine
-- tsserver = {},
tsserver = { capabilities = capabilities },
htmx = { capabilities = capabilities },
html = { capabilities = capabilities, filetypes = { 'html' } },
tailwindcss = { capabilities = capabilities },
emmet_ls = {
capabilities = capabilities,
filetypes = {
'css',
'html',
'javascript',
'javascriptreact',
'less',
'sass',
'scss',
'svelte',
'typescriptreact',
},
init_options = {
html = {
options = {
-- For possible options, see: https://github.com/emmetio/emmet/blob/master/src/config.ts#L79-L267
['bem.enabled'] = true,
},
},
},
},
--
lua_ls = {
@ -615,15 +656,28 @@ require('lazy').setup({
formatters_by_ft = {
lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
python = { 'isort', 'black' },
--
-- You can use a sub-list to tell conform to run *until* a formatter
-- is found.
-- javascript = { { "prettierd", "prettier" } },
javascript = { { 'prettierd', 'prettier' } },
},
},
},
-- hop
{
'phaazon/hop.nvim',
branch = 'v2', -- optional but strongly recommended
config = function()
local hop = require 'hop'
local directions = require('hop.hint').HintDirection
vim.keymap.set('n', '<leader>fh', function()
hop.hint_char1 { direction = directions.AFTER_CURSOR, current_line_only = true }
end, { remap = true })
-- you can configure Hop the way you like here; see :h hop-config
require('hop').setup { keys = 'etovxqpdygfblzhckisuran' }
end,
},
{ -- Autocompletion
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
@ -836,7 +890,7 @@ require('lazy').setup({
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the

View File

@ -0,0 +1,10 @@
return {
'catppuccin/nvim',
lazy = false,
name = 'catppuccin',
priority = 1000,
config = function()
require('catppuccin').setup()
vim.cmd.colorscheme 'catppuccin'
end,
}

View File

@ -0,0 +1,40 @@
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local harpoon = require 'harpoon'
-- REQUIRED
harpoon:setup()
-- REQUIRED
vim.keymap.set('n', '<leader>a', function()
harpoon:list():append()
end)
vim.keymap.set('n', '<C-e>', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end)
vim.keymap.set('n', '<C-h>', function()
harpoon:list():select(1)
end)
vim.keymap.set('n', '<C-t>', function()
harpoon:list():select(2)
end)
vim.keymap.set('n', '<C-n>', function()
harpoon:list():select(3)
end)
vim.keymap.set('n', '<C-s>', function()
harpoon:list():select(4)
end)
-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set('n', '<C-S-P>', function()
harpoon:list():prev()
end)
vim.keymap.set('n', '<C-S-N>', function()
harpoon:list():next()
end)
end,
}

View File

@ -1,5 +1 @@
-- You can add your own plugins here or in other files in this directory!
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}

View File

@ -0,0 +1,7 @@
return {
'themaxmarchuk/tailwindcss-colors.nvim',
module = 'tailwindcss-colors',
config = function()
require('tailwindcss-colors').setup()
end,
}