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/
|
||||
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! :)
|
||||
--]]
|
||||
|
||||
vim.o.background = 'light'
|
||||
-- Set <space> as the leader key
|
||||
-- See `:help mapleader`
|
||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||
vim.g.have_nerd_font = false
|
||||
-- Set to true if you have a Nerd Font installed
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.opt`
|
||||
-- NOTE: You can change these options as you wish!
|
||||
-- For more options, you can see `:help option-list`
|
||||
|
||||
-- Make line numbers default
|
||||
vim.opt.number = true
|
||||
-- You can also add relative line numbers, to help with jumping.
|
||||
-- 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!
|
||||
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
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.colorcolumn = '100'
|
||||
-- Keep signcolumn on by default
|
||||
vim.opt.signcolumn = 'yes'
|
||||
|
||||
-- Decrease update time
|
||||
vim.opt.updatetime = 250
|
||||
vim.opt.updatetime = 50
|
||||
|
||||
-- Decrease mapped sequence wait time
|
||||
vim.opt.timeoutlen = 300
|
||||
|
@ -158,6 +159,8 @@ vim.opt.scrolloff = 10
|
|||
|
||||
-- [[ Basic Keymaps ]]
|
||||
-- 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
|
||||
-- See `:help hlsearch`
|
||||
|
@ -266,63 +269,24 @@ require('lazy').setup({
|
|||
-- which loads which-key before all the UI elements are loaded. Events can be
|
||||
-- normal autocommands events (`:help autocmd-events`).
|
||||
--
|
||||
-- Then, because we use the `opts` key (recommended), the configuration runs
|
||||
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
||||
|
||||
-- Then, because we use the `config` key, the configuration only runs
|
||||
-- after the plugin has been loaded:
|
||||
-- config = function() ... end
|
||||
--
|
||||
{ -- Useful plugin to show you pending keybinds.
|
||||
'folke/which-key.nvim',
|
||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||
opts = {
|
||||
-- delay between pressing a key and opening which-key (milliseconds)
|
||||
-- this setting is independent of vim.opt.timeoutlen
|
||||
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' } },
|
||||
event = 'VeryLazy', -- Sets the loading event to 'VimEnter'
|
||||
keys = {
|
||||
{ '<leader>c', group = '[C]ode' },
|
||||
{ '<leader>c_', hidden = true },
|
||||
{ '<leader>d', group = '[D]ocument' },
|
||||
{ '<leader>d_', hidden = true },
|
||||
{ '<leader>r', group = '[R]ename' },
|
||||
{ '<leader>r_', hidden = true },
|
||||
{ '<leader>s', group = '[S]earch' },
|
||||
{ '<leader>s_', hidden = true },
|
||||
{ '<leader>w', group = '[W]orkspace' },
|
||||
{ '<leader>t', group = '[T]oggle' },
|
||||
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
||||
},
|
||||
{ '<leader>w_', hidden = true },
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -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><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||
|
||||
vim.keymap.set('i', 'jj', '<ESC>', { silent = true })
|
||||
|
||||
-- Slightly advanced example of overriding default behavior and theme
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
-- 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.
|
||||
-- - 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/
|
||||
local nvim_lsp = require 'lspconfig'
|
||||
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 = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
|
@ -716,8 +710,13 @@ require('lazy').setup({
|
|||
-- Conform can also run multiple formatters sequentially
|
||||
-- python = { "isort", "black" },
|
||||
--
|
||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||
-- 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,
|
||||
},
|
||||
|
||||
{ -- You can easily change to a different colorscheme.
|
||||
-- Change the name of the colorscheme plugin below, and then
|
||||
-- change the command in the config to whatever the name of that colorscheme is.
|
||||
--
|
||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
'folke/tokyonight.nvim',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
{
|
||||
'zenbones-theme/zenbones.nvim',
|
||||
name = 'zenbones',
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
dependencies = 'rktjmp/lush.nvim',
|
||||
init = function()
|
||||
-- Load the colorscheme here.
|
||||
-- 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'
|
||||
vim.cmd.colorscheme 'zenbones'
|
||||
end,
|
||||
},
|
||||
{
|
||||
'rktjmp/lush.nvim',
|
||||
},
|
||||
|
||||
-- Highlight todo, notes, etc in comments
|
||||
{ '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