initial commit
switch to papercolor fix which key [chore] a little cleanup
This commit is contained in:
parent
5bdde24dfb
commit
28b95faec0
|
@ -5,3 +5,4 @@ nvim
|
||||||
|
|
||||||
spell/
|
spell/
|
||||||
lazy-lock.json
|
lazy-lock.json
|
||||||
|
.DS_Store
|
||||||
|
|
144
init.lua
144
init.lua
|
@ -84,26 +84,26 @@ I hope you enjoy your Neovim journey,
|
||||||
P.S. You can delete this when you're done too. It's your config now! :)
|
P.S. You can delete this when you're done too. It's your config now! :)
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
|
vim.o.background = 'light'
|
||||||
-- Set <space> as the leader key
|
-- Set <space> as the leader key
|
||||||
-- See `:help mapleader`
|
-- See `:help mapleader`
|
||||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
-- Set to true if you have a Nerd Font installed
|
||||||
vim.g.have_nerd_font = false
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.opt`
|
-- See `:help vim.opt`
|
||||||
-- NOTE: You can change these options as you wish!
|
-- NOTE: You can change these options as you wish!
|
||||||
-- For more options, you can see `:help option-list`
|
-- For more options, you can see `:help option-list`
|
||||||
|
|
||||||
-- Make line numbers default
|
-- Make line numbers default
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
-- You can also add relative line numbers, to help with jumping.
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
-- Experiment for yourself to see if you like it!
|
-- Experiment for yourself to see if you like it!
|
||||||
-- vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
vim.opt.termguicolors = true
|
||||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
|
|
||||||
|
@ -127,12 +127,13 @@ vim.opt.undofile = true
|
||||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||||
vim.opt.ignorecase = true
|
vim.opt.ignorecase = true
|
||||||
vim.opt.smartcase = true
|
vim.opt.smartcase = true
|
||||||
|
vim.opt.scrolloff = 8
|
||||||
|
vim.opt.colorcolumn = '100'
|
||||||
-- Keep signcolumn on by default
|
-- Keep signcolumn on by default
|
||||||
vim.opt.signcolumn = 'yes'
|
vim.opt.signcolumn = 'yes'
|
||||||
|
|
||||||
-- Decrease update time
|
-- Decrease update time
|
||||||
vim.opt.updatetime = 250
|
vim.opt.updatetime = 50
|
||||||
|
|
||||||
-- Decrease mapped sequence wait time
|
-- Decrease mapped sequence wait time
|
||||||
vim.opt.timeoutlen = 300
|
vim.opt.timeoutlen = 300
|
||||||
|
@ -158,6 +159,8 @@ vim.opt.scrolloff = 10
|
||||||
|
|
||||||
-- [[ Basic Keymaps ]]
|
-- [[ Basic Keymaps ]]
|
||||||
-- See `:help vim.keymap.set()`
|
-- See `:help vim.keymap.set()`
|
||||||
|
vim.keymap.set('n', '<leader>x', '<cmd>Ex<CR>')
|
||||||
|
vim.keymap.set('n', '<leader>ef', vim.cmd.EslintFixAll)
|
||||||
|
|
||||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||||
-- See `:help hlsearch`
|
-- See `:help hlsearch`
|
||||||
|
@ -266,63 +269,24 @@ require('lazy').setup({
|
||||||
-- which loads which-key before all the UI elements are loaded. Events can be
|
-- which loads which-key before all the UI elements are loaded. Events can be
|
||||||
-- normal autocommands events (`:help autocmd-events`).
|
-- normal autocommands events (`:help autocmd-events`).
|
||||||
--
|
--
|
||||||
-- Then, because we use the `opts` key (recommended), the configuration runs
|
-- Then, because we use the `config` key, the configuration only runs
|
||||||
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
-- after the plugin has been loaded:
|
||||||
|
-- config = function() ... end
|
||||||
|
--
|
||||||
{ -- Useful plugin to show you pending keybinds.
|
{ -- Useful plugin to show you pending keybinds.
|
||||||
'folke/which-key.nvim',
|
'folke/which-key.nvim',
|
||||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
event = 'VeryLazy', -- Sets the loading event to 'VimEnter'
|
||||||
opts = {
|
keys = {
|
||||||
-- delay between pressing a key and opening which-key (milliseconds)
|
{ '<leader>c', group = '[C]ode' },
|
||||||
-- this setting is independent of vim.opt.timeoutlen
|
{ '<leader>c_', hidden = true },
|
||||||
delay = 0,
|
|
||||||
icons = {
|
|
||||||
-- set icon mappings to true if you have a Nerd Font
|
|
||||||
mappings = vim.g.have_nerd_font,
|
|
||||||
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
|
|
||||||
-- default which-key.nvim defined Nerd Font icons, otherwise define a string table
|
|
||||||
keys = vim.g.have_nerd_font and {} or {
|
|
||||||
Up = '<Up> ',
|
|
||||||
Down = '<Down> ',
|
|
||||||
Left = '<Left> ',
|
|
||||||
Right = '<Right> ',
|
|
||||||
C = '<C-…> ',
|
|
||||||
M = '<M-…> ',
|
|
||||||
D = '<D-…> ',
|
|
||||||
S = '<S-…> ',
|
|
||||||
CR = '<CR> ',
|
|
||||||
Esc = '<Esc> ',
|
|
||||||
ScrollWheelDown = '<ScrollWheelDown> ',
|
|
||||||
ScrollWheelUp = '<ScrollWheelUp> ',
|
|
||||||
NL = '<NL> ',
|
|
||||||
BS = '<BS> ',
|
|
||||||
Space = '<Space> ',
|
|
||||||
Tab = '<Tab> ',
|
|
||||||
F1 = '<F1>',
|
|
||||||
F2 = '<F2>',
|
|
||||||
F3 = '<F3>',
|
|
||||||
F4 = '<F4>',
|
|
||||||
F5 = '<F5>',
|
|
||||||
F6 = '<F6>',
|
|
||||||
F7 = '<F7>',
|
|
||||||
F8 = '<F8>',
|
|
||||||
F9 = '<F9>',
|
|
||||||
F10 = '<F10>',
|
|
||||||
F11 = '<F11>',
|
|
||||||
F12 = '<F12>',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Document existing key chains
|
|
||||||
spec = {
|
|
||||||
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
|
|
||||||
{ '<leader>d', group = '[D]ocument' },
|
{ '<leader>d', group = '[D]ocument' },
|
||||||
|
{ '<leader>d_', hidden = true },
|
||||||
{ '<leader>r', group = '[R]ename' },
|
{ '<leader>r', group = '[R]ename' },
|
||||||
|
{ '<leader>r_', hidden = true },
|
||||||
{ '<leader>s', group = '[S]earch' },
|
{ '<leader>s', group = '[S]earch' },
|
||||||
|
{ '<leader>s_', hidden = true },
|
||||||
{ '<leader>w', group = '[W]orkspace' },
|
{ '<leader>w', group = '[W]orkspace' },
|
||||||
{ '<leader>t', group = '[T]oggle' },
|
{ '<leader>w_', hidden = true },
|
||||||
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -413,6 +377,8 @@ require('lazy').setup({
|
||||||
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||||
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||||
|
|
||||||
|
vim.keymap.set('i', 'jj', '<ESC>', { silent = true })
|
||||||
|
|
||||||
-- Slightly advanced example of overriding default behavior and theme
|
-- Slightly advanced example of overriding default behavior and theme
|
||||||
vim.keymap.set('n', '<leader>/', function()
|
vim.keymap.set('n', '<leader>/', function()
|
||||||
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
|
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
|
||||||
|
@ -615,7 +581,35 @@ require('lazy').setup({
|
||||||
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
||||||
-- - settings (table): Override the default settings passed when initializing the server.
|
-- - settings (table): Override the default settings passed when initializing the server.
|
||||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
|
local nvim_lsp = require 'lspconfig'
|
||||||
local servers = {
|
local servers = {
|
||||||
|
svelte = {},
|
||||||
|
solargraph = {},
|
||||||
|
volar = {},
|
||||||
|
tailwindcss = {},
|
||||||
|
prettier = {},
|
||||||
|
html = {},
|
||||||
|
cssls = {},
|
||||||
|
ts_ls = {
|
||||||
|
init_options = {
|
||||||
|
plugins = {
|
||||||
|
{
|
||||||
|
name = '@vue/typescript-plugin',
|
||||||
|
location = '/Users/notfun/.nvm/versions/node/v22.13.1/lib/node_modules/@vue/typescript-plugin',
|
||||||
|
languages = { 'javascript', 'typescript', 'vue' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filetypes = {
|
||||||
|
'javascript',
|
||||||
|
'typescriptreact',
|
||||||
|
'javascriptreact',
|
||||||
|
'typescript',
|
||||||
|
'vue',
|
||||||
|
},
|
||||||
|
root_dir = nvim_lsp.util.root_pattern 'package.json',
|
||||||
|
single_file_support = false,
|
||||||
|
},
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
-- pyright = {},
|
-- pyright = {},
|
||||||
|
@ -716,8 +710,13 @@ require('lazy').setup({
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
-- python = { "isort", "black" },
|
||||||
--
|
--
|
||||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
-- is found.
|
||||||
|
-- javascript = { { "prettierd", "prettier" } },
|
||||||
|
vue = { { 'prettierd', 'prettier' } },
|
||||||
|
javascript = { { 'prettierd', 'prettier' } },
|
||||||
|
typescript = { { 'prettierd', 'prettier' } },
|
||||||
|
volar = { { 'prettierd', 'prettier' } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -837,24 +836,19 @@ require('lazy').setup({
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
{ -- You can easily change to a different colorscheme.
|
'zenbones-theme/zenbones.nvim',
|
||||||
-- Change the name of the colorscheme plugin below, and then
|
name = 'zenbones',
|
||||||
-- change the command in the config to whatever the name of that colorscheme is.
|
priority = 1000,
|
||||||
--
|
lazy = false,
|
||||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
dependencies = 'rktjmp/lush.nvim',
|
||||||
'folke/tokyonight.nvim',
|
|
||||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
|
||||||
init = function()
|
init = function()
|
||||||
-- Load the colorscheme here.
|
vim.cmd.colorscheme 'zenbones'
|
||||||
-- 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'
|
|
||||||
|
|
||||||
-- You can configure highlights by doing something like:
|
|
||||||
vim.cmd.hi 'Comment gui=none'
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'rktjmp/lush.nvim',
|
||||||
|
},
|
||||||
|
|
||||||
-- Highlight todo, notes, etc in comments
|
-- Highlight todo, notes, etc in comments
|
||||||
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"extras": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"news": {
|
||||||
|
"NEWS.md": "3314"
|
||||||
|
},
|
||||||
|
"version": 3
|
||||||
|
}
|
Loading…
Reference in New Issue