Skip to content

Commit c225ecd

Browse files
committed
update
1 parent 34e7d29 commit c225ecd

File tree

8 files changed

+201
-48
lines changed

8 files changed

+201
-48
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ nvim
55

66
spell/
77
lazy-lock.json
8+
9+
.DS_Store

init.lua

Lines changed: 102 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
9191
vim.g.maplocalleader = ' '
9292

9393
-- Set to true if you have a Nerd Font installed and selected in the terminal
94-
vim.g.have_nerd_font = false
94+
vim.g.have_nerd_font = true
9595

9696
-- [[ Setting options ]]
9797
-- See `:help vim.opt`
@@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
102102
vim.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
105+
vim.opt.relativenumber = true
106106

107107
-- Enable mouse mode, can be useful for resizing splits for example!
108108
vim.opt.mouse = 'a'
@@ -253,16 +253,16 @@ require('lazy').setup({
253253
--
254254
-- See `:help gitsigns` to understand what the configuration keys do
255255
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
256-
'lewis6991/gitsigns.nvim',
257-
opts = {
258-
signs = {
259-
add = { text = '+' },
260-
change = { text = '~' },
261-
delete = { text = '_' },
262-
topdelete = { text = '' },
263-
changedelete = { text = '~' },
264-
},
265-
},
256+
-- 'lewis6991/gitsigns.nvim',
257+
-- opts = {
258+
-- signs = {
259+
-- add = { text = '+' },
260+
-- change = { text = '~' },
261+
-- delete = { text = '_' },
262+
-- topdelete = { text = '‾' },
263+
-- changedelete = { text = '~' },
264+
-- },
265+
-- },
266266
},
267267

268268
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
@@ -658,9 +658,9 @@ require('lazy').setup({
658658
-- - settings (table): Override the default settings passed when initializing the server.
659659
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
660660
local servers = {
661-
-- clangd = {},
661+
clangd = {"--offset-encoding=utf-16"},
662662
-- gopls = {},
663-
-- pyright = {},
663+
pyright = {},
664664
-- rust_analyzer = {},
665665
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
666666
--
@@ -758,7 +758,7 @@ require('lazy').setup({
758758
formatters_by_ft = {
759759
lua = { 'stylua' },
760760
-- Conform can also run multiple formatters sequentially
761-
-- python = { "isort", "black" },
761+
python = { "isort", "black" },
762762
--
763763
-- You can use 'stop_after_first' to run the first available formatter from the list
764764
-- javascript = { "prettierd", "prettier", stop_after_first = true },
@@ -834,13 +834,13 @@ require('lazy').setup({
834834
-- Accept ([y]es) the completion.
835835
-- This will auto-import if your LSP supports it.
836836
-- This will expand snippets if the LSP sent a snippet.
837-
['<C-y>'] = cmp.mapping.confirm { select = true },
837+
-- ['<C-y>'] = cmp.mapping.confirm { select = true },
838838

839839
-- If you prefer more traditional completion keymaps,
840840
-- you can uncomment the following lines
841-
--['<CR>'] = cmp.mapping.confirm { select = true },
842-
--['<Tab>'] = cmp.mapping.select_next_item(),
843-
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
841+
['<CR>'] = cmp.mapping.confirm { select = true },
842+
-- ['<Tab>'] = cmp.mapping.select_next_item(),
843+
-- ['<S-Tab>'] = cmp.mapping.select_prev_item(),
844844

845845
-- Manually trigger a completion from nvim-cmp.
846846
-- Generally you don't need this, because nvim-cmp will display
@@ -889,22 +889,76 @@ require('lazy').setup({
889889
-- change the command in the config to whatever the name of that colorscheme is.
890890
--
891891
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
892-
'folke/tokyonight.nvim',
892+
'navarasu/onedark.nvim',
893893
priority = 1000, -- Make sure to load this before all the other start plugins.
894894
config = function()
895895
---@diagnostic disable-next-line: missing-fields
896-
require('tokyonight').setup {
897-
styles = {
898-
comments = { italic = false }, -- Disable italics in comments
899-
},
900-
}
901-
896+
-- require('tokyonight').setup {
897+
-- styles = {
898+
-- comments = { italic = false }, -- Disable italics in comments
899+
-- },
900+
-- }
902901
-- Load the colorscheme here.
903902
-- Like many other themes, this one has different styles, and you could load
904903
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
905-
vim.cmd.colorscheme 'tokyonight-night'
904+
905+
906+
require('onedark').setup {
907+
-- Main options --
908+
style = 'darker', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
909+
transparent = false, -- Show/hide background
910+
term_colors = true, -- Change terminal color as per the selected theme style
911+
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
912+
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
913+
914+
-- toggle theme style ---
915+
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"
916+
toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light'}, -- List of styles to toggle between
917+
918+
-- Change code style ---
919+
-- Options are italic, bold, underline, none
920+
-- You can configure multiple style with comma separated, For e.g., keywords = 'italic,bold'
921+
code_style = {
922+
comments = 'italic',
923+
keywords = 'none',
924+
functions = 'none',
925+
strings = 'none',
926+
variables = 'none'
927+
},
928+
929+
-- Lualine options --
930+
lualine = {
931+
transparent = false, -- lualine center bar transparency
932+
},
933+
934+
-- Custom Highlights --
935+
colors = {}, -- Override default colors
936+
highlights = {}, -- Override highlight groups
937+
938+
-- Plugins Config --
939+
diagnostics = {
940+
darker = true, -- darker colors for diagnostic
941+
undercurl = true, -- use undercurl instead of underline for diagnostics
942+
background = true, -- use background color for virtual text
943+
},
944+
}
945+
946+
-- vim.cmd.colorscheme 'onedark'
906947
end,
907948
},
949+
{
950+
'sainnhe/sonokai',
951+
lazy = false,
952+
priority = 1000,
953+
config = function()
954+
-- Optionally configure and load the colorscheme
955+
-- directly inside the plugin declaration.
956+
vim.g.sonokai_enable_italic = true
957+
-- vim.g.sonokai_transparent_background = 1
958+
vim.cmd.colorscheme('sonokai')
959+
end
960+
},
961+
908962

909963
-- Highlight todo, notes, etc in comments
910964
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
@@ -921,7 +975,7 @@ require('lazy').setup({
921975
require('mini.ai').setup { n_lines = 500 }
922976

923977
-- Add/delete/replace surroundings (brackets, quotes, etc.)
924-
--
978+
925979
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
926980
-- - sd' - [S]urround [D]elete [']quotes
927981
-- - sr)' - [S]urround [R]eplace [)] [']
@@ -981,18 +1035,18 @@ require('lazy').setup({
9811035
-- Here are some example plugins that I've included in the Kickstart repository.
9821036
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
9831037
--
984-
-- require 'kickstart.plugins.debug',
985-
-- require 'kickstart.plugins.indent_line',
986-
-- require 'kickstart.plugins.lint',
987-
-- require 'kickstart.plugins.autopairs',
988-
-- require 'kickstart.plugins.neo-tree',
989-
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
1038+
require 'kickstart.plugins.debug',
1039+
require 'kickstart.plugins.indent_line',
1040+
require 'kickstart.plugins.lint',
1041+
require 'kickstart.plugins.autopairs',
1042+
require 'kickstart.plugins.neo-tree',
1043+
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
9901044

9911045
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
9921046
-- This is the easiest way to modularize your config.
9931047
--
9941048
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
995-
-- { import = 'custom.plugins' },
1049+
{ import = 'custom.plugins' },
9961050
--
9971051
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
9981052
-- Or use telescope!
@@ -1003,19 +1057,19 @@ require('lazy').setup({
10031057
-- If you are using a Nerd Font: set icons to an empty table which will use the
10041058
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
10051059
icons = vim.g.have_nerd_font and {} or {
1006-
cmd = '',
1007-
config = '🛠',
1008-
event = '📅',
1009-
ft = '📂',
1010-
init = '',
1011-
keys = '🗝',
1012-
plugin = '🔌',
1013-
runtime = '💻',
1014-
require = '🌙',
1015-
source = '📄',
1016-
start = '🚀',
1017-
task = '📌',
1018-
lazy = '💤 ',
1060+
-- cmd = '⌘',
1061+
-- config = '🛠',
1062+
-- event = '📅',
1063+
-- ft = '📂',
1064+
-- init = '⚙',
1065+
-- keys = '🗝',
1066+
-- plugin = '🔌',
1067+
-- runtime = '💻',
1068+
-- require = '🌙',
1069+
-- source = '📄',
1070+
-- start = '🚀',
1071+
-- task = '📌',
1072+
-- lazy = '💤 ',
10191073
},
10201074
},
10211075
})

lua/custom/plugins/copilot.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
return {
2+
"github/copilot.vim",
3+
init = function()
4+
vim.keymap.set('i', '<C-J>', 'copilot#Accept("\\<CR>")', {
5+
expr = true,
6+
replace_keycodes = false
7+
})
8+
vim.g.copilot_no_tab_map = true
9+
end
10+
11+
-- "zbirenbaum/copilot.lua",
12+
}

lua/custom/plugins/docker.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
return {
2+
"jamestthompson3/nvim-remote-containers",
3+
-- set statusline+=%#Container#%{g:currentContainer}
4+
5+
init = function()
6+
vim.cmd [[set statusline+=%#Container#%{g:currentContainer}]]
7+
end
8+
}

lua/custom/plugins/lean.lua

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
return {
2+
'Julian/lean.nvim',
3+
event = { 'BufReadPre *.lean', 'BufNewFile *.lean' },
4+
5+
dependencies = {
6+
'neovim/nvim-lspconfig',
7+
'nvim-lua/plenary.nvim',
8+
9+
-- optional dependencies:
10+
11+
-- a completion engine
12+
-- hrsh7th/nvim-cmp or Saghen/blink.cmp are popular choices
13+
14+
-- 'nvim-telescope/telescope.nvim', -- for 2 Lean-specific pickers
15+
-- 'andymass/vim-matchup', -- for enhanced % motion behavior
16+
-- 'andrewradev/switch.vim', -- for switch support
17+
-- 'tomtom/tcomment_vim', -- for commenting
18+
},
19+
20+
---@type lean.Config
21+
opts = { -- see below for full configuration options
22+
mappings = true,
23+
}
24+
}

lua/custom/plugins/neoscroll.lua

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
return {
2+
"karb94/neoscroll.nvim",
3+
opts = {
4+
mappings = { -- Keys to be mapped to their corresponding default scrolling animation
5+
'<C-u>', '<C-d>',
6+
'<C-b>', '<C-f>',
7+
'<C-y>', '<C-e>',
8+
'zt', 'zz', 'zb',
9+
},
10+
hide_cursor = true, -- Hide cursor while scrolling
11+
stop_eof = true, -- Stop at <EOF> when scrolling downwards
12+
respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
13+
cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
14+
duration_multiplier = 2.0, -- Global duration multiplier
15+
easing = 'linear', -- Default easing function
16+
pre_hook = nil, -- Function to run before the scrolling animation starts
17+
post_hook = nil, -- Function to run after the scrolling animation ends
18+
performance_mode = false, -- Disable "Performance Mode" on all buffers.
19+
ignored_events = { -- Events ignored while scrolling
20+
'WinScrolled', 'CursorMoved'
21+
}
22+
},
23+
}

lua/custom/plugins/toggleterm.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
return {
2+
"akinsho/toggleterm.nvim",
3+
version = "*",
4+
-- config = true,
5+
opts = {
6+
shade_terminals = false,
7+
}
8+
-- set_terminal_keymaps = function()
9+
-- local opts = {buffer = 0}
10+
-- vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
11+
-- vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts)
12+
-- vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], opts)
13+
-- vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd j<CR>]], opts)
14+
-- vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]], opts)
15+
-- vim.keymap.set('t', '<C-l>', [[<Cmd>wincmd l<CR>]], opts)
16+
-- vim.keymap.set('t', '<C-w>', [[<C-\><C-n><C-w>]], opts)
17+
-- end
18+
--
19+
-- -- if you only want these mappings for toggle term use term://*toggleterm#* instead
20+
-- vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
21+
}

lua/custom/plugins/vimtex.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
return {
2+
"lervag/vimtex",
3+
lazy = false, -- we don't want to lazy load VimTeX
4+
-- tag = "v2.15", -- uncomment to pin to a specific release
5+
init = function()
6+
-- VimTeX configuration goes here, e.g.
7+
vim.g.vimtex_view_method = "skim"
8+
end
9+
}

0 commit comments

Comments
 (0)