update
This commit is contained in:
parent
34e7d29aa7
commit
c225ecda9a
8 changed files with 201 additions and 48 deletions
150
init.lua
150
init.lua
|
|
@ -91,7 +91,7 @@ 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
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.opt`
|
||||
|
|
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
|||
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
|
||||
|
||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||
vim.opt.mouse = 'a'
|
||||
|
|
@ -253,16 +253,16 @@ require('lazy').setup({
|
|||
--
|
||||
-- See `:help gitsigns` to understand what the configuration keys do
|
||||
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
},
|
||||
-- 'lewis6991/gitsigns.nvim',
|
||||
-- opts = {
|
||||
-- signs = {
|
||||
-- add = { text = '+' },
|
||||
-- change = { text = '~' },
|
||||
-- delete = { text = '_' },
|
||||
-- topdelete = { text = '‾' },
|
||||
-- changedelete = { text = '~' },
|
||||
-- },
|
||||
-- },
|
||||
},
|
||||
|
||||
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
||||
|
|
@ -658,9 +658,9 @@ require('lazy').setup({
|
|||
-- - 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 servers = {
|
||||
-- clangd = {},
|
||||
clangd = {"--offset-encoding=utf-16"},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
pyright = {},
|
||||
-- rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
|
|
@ -758,7 +758,7 @@ require('lazy').setup({
|
|||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
-- 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
|
||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
|
|
@ -834,13 +834,13 @@ require('lazy').setup({
|
|||
-- Accept ([y]es) the completion.
|
||||
-- This will auto-import if your LSP supports it.
|
||||
-- This will expand snippets if the LSP sent a snippet.
|
||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
-- ['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
|
||||
-- If you prefer more traditional completion keymaps,
|
||||
-- you can uncomment the following lines
|
||||
--['<CR>'] = cmp.mapping.confirm { select = true },
|
||||
--['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
['<CR>'] = cmp.mapping.confirm { select = true },
|
||||
-- ['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
-- ['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
|
||||
-- Manually trigger a completion from nvim-cmp.
|
||||
-- Generally you don't need this, because nvim-cmp will display
|
||||
|
|
@ -889,22 +889,76 @@ require('lazy').setup({
|
|||
-- 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',
|
||||
'navarasu/onedark.nvim',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
config = function()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require('tokyonight').setup {
|
||||
styles = {
|
||||
comments = { italic = false }, -- Disable italics in comments
|
||||
},
|
||||
}
|
||||
|
||||
-- require('tokyonight').setup {
|
||||
-- styles = {
|
||||
-- comments = { italic = false }, -- Disable italics in comments
|
||||
-- },
|
||||
-- }
|
||||
-- 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'
|
||||
|
||||
|
||||
require('onedark').setup {
|
||||
-- Main options --
|
||||
style = 'darker', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
|
||||
transparent = false, -- Show/hide background
|
||||
term_colors = true, -- Change terminal color as per the selected theme style
|
||||
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
|
||||
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
|
||||
|
||||
-- toggle theme style ---
|
||||
toggle_style_key = '<leader>ts', -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts"
|
||||
toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light'}, -- List of styles to toggle between
|
||||
|
||||
-- Change code style ---
|
||||
-- Options are italic, bold, underline, none
|
||||
-- You can configure multiple style with comma separated, For e.g., keywords = 'italic,bold'
|
||||
code_style = {
|
||||
comments = 'italic',
|
||||
keywords = 'none',
|
||||
functions = 'none',
|
||||
strings = 'none',
|
||||
variables = 'none'
|
||||
},
|
||||
|
||||
-- Lualine options --
|
||||
lualine = {
|
||||
transparent = false, -- lualine center bar transparency
|
||||
},
|
||||
|
||||
-- Custom Highlights --
|
||||
colors = {}, -- Override default colors
|
||||
highlights = {}, -- Override highlight groups
|
||||
|
||||
-- Plugins Config --
|
||||
diagnostics = {
|
||||
darker = true, -- darker colors for diagnostic
|
||||
undercurl = true, -- use undercurl instead of underline for diagnostics
|
||||
background = true, -- use background color for virtual text
|
||||
},
|
||||
}
|
||||
|
||||
-- vim.cmd.colorscheme 'onedark'
|
||||
end,
|
||||
},
|
||||
{
|
||||
'sainnhe/sonokai',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- Optionally configure and load the colorscheme
|
||||
-- directly inside the plugin declaration.
|
||||
vim.g.sonokai_enable_italic = true
|
||||
-- vim.g.sonokai_transparent_background = 1
|
||||
vim.cmd.colorscheme('sonokai')
|
||||
end
|
||||
},
|
||||
|
||||
|
||||
-- Highlight todo, notes, etc in comments
|
||||
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
||||
|
|
@ -921,7 +975,7 @@ require('lazy').setup({
|
|||
require('mini.ai').setup { n_lines = 500 }
|
||||
|
||||
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||
--
|
||||
|
||||
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||
-- - sd' - [S]urround [D]elete [']quotes
|
||||
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||
|
|
@ -981,18 +1035,18 @@ require('lazy').setup({
|
|||
-- Here are some example plugins that I've included in the Kickstart repository.
|
||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||
--
|
||||
-- require 'kickstart.plugins.debug',
|
||||
-- require 'kickstart.plugins.indent_line',
|
||||
-- require 'kickstart.plugins.lint',
|
||||
-- require 'kickstart.plugins.autopairs',
|
||||
-- require 'kickstart.plugins.neo-tree',
|
||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||
require 'kickstart.plugins.debug',
|
||||
require 'kickstart.plugins.indent_line',
|
||||
require 'kickstart.plugins.lint',
|
||||
require 'kickstart.plugins.autopairs',
|
||||
require 'kickstart.plugins.neo-tree',
|
||||
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||
|
||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||
-- This is the easiest way to modularize your config.
|
||||
--
|
||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||
-- { import = 'custom.plugins' },
|
||||
{ import = 'custom.plugins' },
|
||||
--
|
||||
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
||||
-- Or use telescope!
|
||||
|
|
@ -1003,19 +1057,19 @@ require('lazy').setup({
|
|||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
|
||||
icons = vim.g.have_nerd_font and {} or {
|
||||
cmd = '⌘',
|
||||
config = '🛠',
|
||||
event = '📅',
|
||||
ft = '📂',
|
||||
init = '⚙',
|
||||
keys = '🗝',
|
||||
plugin = '🔌',
|
||||
runtime = '💻',
|
||||
require = '🌙',
|
||||
source = '📄',
|
||||
start = '🚀',
|
||||
task = '📌',
|
||||
lazy = '💤 ',
|
||||
-- cmd = '⌘',
|
||||
-- config = '🛠',
|
||||
-- event = '📅',
|
||||
-- ft = '📂',
|
||||
-- init = '⚙',
|
||||
-- keys = '🗝',
|
||||
-- plugin = '🔌',
|
||||
-- runtime = '💻',
|
||||
-- require = '🌙',
|
||||
-- source = '📄',
|
||||
-- start = '🚀',
|
||||
-- task = '📌',
|
||||
-- lazy = '💤 ',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue