more personalized
This commit is contained in:
parent
773e482d4b
commit
1d16292ce9
5 changed files with 118 additions and 11 deletions
68
init.lua
68
init.lua
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue