@@ -84,26 +84,26 @@ I hope you enjoy your Neovim journey,
8484P.S. You can delete this when you're done too. It's your config now! :)
8585--]]
8686
87+ vim .o .background = ' light'
8788-- Set <space> as the leader key
8889-- See `:help mapleader`
8990-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
9091vim .g .mapleader = ' '
9192vim .g .maplocalleader = ' '
9293
93- -- Set to true if you have a Nerd Font installed and selected in the terminal
94- vim .g .have_nerd_font = false
94+ -- Set to true if you have a Nerd Font installed
95+ vim .g .have_nerd_font = true
9596
9697-- [[ Setting options ]]
9798-- See `:help vim.opt`
9899-- NOTE: You can change these options as you wish!
99100-- For more options, you can see `:help option-list`
100-
101101-- Make line numbers default
102102vim .opt .number = true
103103-- You can also add relative line numbers, to help with jumping.
104104-- Experiment for yourself to see if you like it!
105- -- vim.opt.relativenumber = true
106-
105+ vim .opt .relativenumber = true
106+ vim . opt . termguicolors = true
107107-- Enable mouse mode, can be useful for resizing splits for example!
108108vim .opt .mouse = ' a'
109109
@@ -127,12 +127,13 @@ vim.opt.undofile = true
127127-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
128128vim .opt .ignorecase = true
129129vim .opt .smartcase = true
130-
130+ vim .opt .scrolloff = 8
131+ vim .opt .colorcolumn = ' 100'
131132-- Keep signcolumn on by default
132133vim .opt .signcolumn = ' yes'
133134
134135-- Decrease update time
135- vim .opt .updatetime = 250
136+ vim .opt .updatetime = 50
136137
137138-- Decrease mapped sequence wait time
138139vim .opt .timeoutlen = 300
@@ -158,6 +159,8 @@ vim.opt.scrolloff = 10
158159
159160-- [[ Basic Keymaps ]]
160161-- See `:help vim.keymap.set()`
162+ vim .keymap .set (' n' , ' <leader>x' , ' <cmd>Ex<CR>' )
163+ vim .keymap .set (' n' , ' <leader>ef' , vim .cmd .EslintFixAll )
161164
162165-- Clear highlights on search when pressing <Esc> in normal mode
163166-- See `:help hlsearch`
@@ -266,63 +269,24 @@ require('lazy').setup({
266269 -- which loads which-key before all the UI elements are loaded. Events can be
267270 -- normal autocommands events (`:help autocmd-events`).
268271 --
269- -- Then, because we use the `opts` key (recommended), the configuration runs
270- -- after the plugin has been loaded as `require(MODULE).setup(opts)`.
271-
272+ -- Then, because we use the `config` key, the configuration only runs
273+ -- after the plugin has been loaded:
274+ -- config = function() ... end
275+ --
272276 { -- Useful plugin to show you pending keybinds.
273277 ' folke/which-key.nvim' ,
274- event = ' VimEnter' , -- Sets the loading event to 'VimEnter'
275- opts = {
276- -- delay between pressing a key and opening which-key (milliseconds)
277- -- this setting is independent of vim.opt.timeoutlen
278- delay = 0 ,
279- icons = {
280- -- set icon mappings to true if you have a Nerd Font
281- mappings = vim .g .have_nerd_font ,
282- -- If you are using a Nerd Font: set icons.keys to an empty table which will use the
283- -- default which-key.nvim defined Nerd Font icons, otherwise define a string table
284- keys = vim .g .have_nerd_font and {} or {
285- Up = ' <Up> ' ,
286- Down = ' <Down> ' ,
287- Left = ' <Left> ' ,
288- Right = ' <Right> ' ,
289- C = ' <C-…> ' ,
290- M = ' <M-…> ' ,
291- D = ' <D-…> ' ,
292- S = ' <S-…> ' ,
293- CR = ' <CR> ' ,
294- Esc = ' <Esc> ' ,
295- ScrollWheelDown = ' <ScrollWheelDown> ' ,
296- ScrollWheelUp = ' <ScrollWheelUp> ' ,
297- NL = ' <NL> ' ,
298- BS = ' <BS> ' ,
299- Space = ' <Space> ' ,
300- Tab = ' <Tab> ' ,
301- F1 = ' <F1>' ,
302- F2 = ' <F2>' ,
303- F3 = ' <F3>' ,
304- F4 = ' <F4>' ,
305- F5 = ' <F5>' ,
306- F6 = ' <F6>' ,
307- F7 = ' <F7>' ,
308- F8 = ' <F8>' ,
309- F9 = ' <F9>' ,
310- F10 = ' <F10>' ,
311- F11 = ' <F11>' ,
312- F12 = ' <F12>' ,
313- },
314- },
315-
316- -- Document existing key chains
317- spec = {
318- { ' <leader>c' , group = ' [C]ode' , mode = { ' n' , ' x' } },
319- { ' <leader>d' , group = ' [D]ocument' },
320- { ' <leader>r' , group = ' [R]ename' },
321- { ' <leader>s' , group = ' [S]earch' },
322- { ' <leader>w' , group = ' [W]orkspace' },
323- { ' <leader>t' , group = ' [T]oggle' },
324- { ' <leader>h' , group = ' Git [H]unk' , mode = { ' n' , ' v' } },
325- },
278+ event = ' VeryLazy' , -- Sets the loading event to 'VimEnter'
279+ keys = {
280+ { ' <leader>c' , group = ' [C]ode' },
281+ { ' <leader>c_' , hidden = true },
282+ { ' <leader>d' , group = ' [D]ocument' },
283+ { ' <leader>d_' , hidden = true },
284+ { ' <leader>r' , group = ' [R]ename' },
285+ { ' <leader>r_' , hidden = true },
286+ { ' <leader>s' , group = ' [S]earch' },
287+ { ' <leader>s_' , hidden = true },
288+ { ' <leader>w' , group = ' [W]orkspace' },
289+ { ' <leader>w_' , hidden = true },
326290 },
327291 },
328292
@@ -413,6 +377,8 @@ require('lazy').setup({
413377 vim .keymap .set (' n' , ' <leader>s.' , builtin .oldfiles , { desc = ' [S]earch Recent Files ("." for repeat)' })
414378 vim .keymap .set (' n' , ' <leader><leader>' , builtin .buffers , { desc = ' [ ] Find existing buffers' })
415379
380+ vim .keymap .set (' i' , ' jj' , ' <ESC>' , { silent = true })
381+
416382 -- Slightly advanced example of overriding default behavior and theme
417383 vim .keymap .set (' n' , ' <leader>/' , function ()
418384 -- You can pass additional configuration to Telescope to change the theme, layout, etc.
@@ -615,7 +581,35 @@ require('lazy').setup({
615581 -- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
616582 -- - settings (table): Override the default settings passed when initializing the server.
617583 -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
584+ local nvim_lsp = require ' lspconfig'
618585 local servers = {
586+ svelte = {},
587+ solargraph = {},
588+ volar = {},
589+ tailwindcss = {},
590+ prettier = {},
591+ html = {},
592+ cssls = {},
593+ ts_ls = {
594+ init_options = {
595+ plugins = {
596+ {
597+ name = ' @vue/typescript-plugin' ,
598+ location = ' /Users/notfun/.nvm/versions/node/v22.13.1/lib/node_modules/@vue/typescript-plugin' ,
599+ languages = { ' javascript' , ' typescript' , ' vue' },
600+ },
601+ },
602+ },
603+ filetypes = {
604+ ' javascript' ,
605+ ' typescriptreact' ,
606+ ' javascriptreact' ,
607+ ' typescript' ,
608+ ' vue' ,
609+ },
610+ root_dir = nvim_lsp .util .root_pattern ' package.json' ,
611+ single_file_support = false ,
612+ },
619613 -- clangd = {},
620614 -- gopls = {},
621615 -- pyright = {},
@@ -716,8 +710,13 @@ require('lazy').setup({
716710 -- Conform can also run multiple formatters sequentially
717711 -- python = { "isort", "black" },
718712 --
719- -- You can use 'stop_after_first' to run the first available formatter from the list
720- -- javascript = { "prettierd", "prettier", stop_after_first = true },
713+ -- You can use a sub-list to tell conform to run *until* a formatter
714+ -- is found.
715+ -- javascript = { { "prettierd", "prettier" } },
716+ vue = { { ' prettierd' , ' prettier' } },
717+ javascript = { { ' prettierd' , ' prettier' } },
718+ typescript = { { ' prettierd' , ' prettier' } },
719+ volar = { { ' prettierd' , ' prettier' } },
721720 },
722721 },
723722 },
@@ -837,24 +836,19 @@ require('lazy').setup({
837836 }
838837 end ,
839838 },
840-
841- { -- You can easily change to a different colorscheme.
842- -- Change the name of the colorscheme plugin below, and then
843- -- change the command in the config to whatever the name of that colorscheme is.
844- --
845- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
846- ' folke/tokyonight.nvim' ,
847- priority = 1000 , -- Make sure to load this before all the other start plugins.
839+ {
840+ ' zenbones-theme/zenbones.nvim' ,
841+ name = ' zenbones' ,
842+ priority = 1000 ,
843+ lazy = false ,
844+ dependencies = ' rktjmp/lush.nvim' ,
848845 init = function ()
849- -- Load the colorscheme here.
850- -- Like many other themes, this one has different styles, and you could load
851- -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
852- vim .cmd .colorscheme ' tokyonight-night'
853-
854- -- You can configure highlights by doing something like:
855- vim .cmd .hi ' Comment gui=none'
846+ vim .cmd .colorscheme ' zenbones'
856847 end ,
857848 },
849+ {
850+ ' rktjmp/lush.nvim' ,
851+ },
858852
859853 -- Highlight todo, notes, etc in comments
860854 { ' folke/todo-comments.nvim' , event = ' VimEnter' , dependencies = { ' nvim-lua/plenary.nvim' }, opts = { signs = false } },
0 commit comments