diff --git a/.gitignore b/.gitignore index 005b535b..42cdf68c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ nvim spell/ lazy-lock.json + +.DS_Store \ No newline at end of file diff --git a/init.lua b/init.lua index 5cac3d14..0409a302 100644 --- a/init.lua +++ b/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. - [''] = cmp.mapping.confirm { select = true }, + -- [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines - --[''] = cmp.mapping.confirm { select = true }, - --[''] = cmp.mapping.select_next_item(), - --[''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.confirm { select = true }, + -- [''] = cmp.mapping.select_next_item(), + -- [''] = 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 = 'ts', -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "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 = '💤 ', }, }, }) diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua new file mode 100644 index 00000000..a16449a2 --- /dev/null +++ b/lua/custom/plugins/copilot.lua @@ -0,0 +1,12 @@ +return { + "github/copilot.vim", + init = function() + vim.keymap.set('i', '', 'copilot#Accept("\\")', { + expr = true, + replace_keycodes = false + }) + vim.g.copilot_no_tab_map = true + end + + -- "zbirenbaum/copilot.lua", +} diff --git a/lua/custom/plugins/docker.lua b/lua/custom/plugins/docker.lua new file mode 100644 index 00000000..49e08d96 --- /dev/null +++ b/lua/custom/plugins/docker.lua @@ -0,0 +1,8 @@ +return { + "jamestthompson3/nvim-remote-containers", + -- set statusline+=%#Container#%{g:currentContainer} + + init = function() + vim.cmd [[set statusline+=%#Container#%{g:currentContainer}]] + end +} diff --git a/lua/custom/plugins/lean.lua b/lua/custom/plugins/lean.lua new file mode 100644 index 00000000..f16429ae --- /dev/null +++ b/lua/custom/plugins/lean.lua @@ -0,0 +1,24 @@ +return { + 'Julian/lean.nvim', + event = { 'BufReadPre *.lean', 'BufNewFile *.lean' }, + + dependencies = { + 'neovim/nvim-lspconfig', + 'nvim-lua/plenary.nvim', + + -- optional dependencies: + + -- a completion engine + -- hrsh7th/nvim-cmp or Saghen/blink.cmp are popular choices + + -- 'nvim-telescope/telescope.nvim', -- for 2 Lean-specific pickers + -- 'andymass/vim-matchup', -- for enhanced % motion behavior + -- 'andrewradev/switch.vim', -- for switch support + -- 'tomtom/tcomment_vim', -- for commenting + }, + + ---@type lean.Config + opts = { -- see below for full configuration options + mappings = true, + } +} diff --git a/lua/custom/plugins/neoscroll.lua b/lua/custom/plugins/neoscroll.lua new file mode 100644 index 00000000..e3f8a891 --- /dev/null +++ b/lua/custom/plugins/neoscroll.lua @@ -0,0 +1,23 @@ +return { + "karb94/neoscroll.nvim", + opts = { + mappings = { -- Keys to be mapped to their corresponding default scrolling animation + '', '', + '', '', + '', '', + 'zt', 'zz', 'zb', + }, + hide_cursor = true, -- Hide cursor while scrolling + stop_eof = true, -- Stop at when scrolling downwards + respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file + cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further + duration_multiplier = 2.0, -- Global duration multiplier + easing = 'linear', -- Default easing function + pre_hook = nil, -- Function to run before the scrolling animation starts + post_hook = nil, -- Function to run after the scrolling animation ends + performance_mode = false, -- Disable "Performance Mode" on all buffers. + ignored_events = { -- Events ignored while scrolling + 'WinScrolled', 'CursorMoved' + } + }, +} diff --git a/lua/custom/plugins/toggleterm.lua b/lua/custom/plugins/toggleterm.lua new file mode 100644 index 00000000..cdecbe01 --- /dev/null +++ b/lua/custom/plugins/toggleterm.lua @@ -0,0 +1,21 @@ +return { + "akinsho/toggleterm.nvim", + version = "*", + -- config = true, + opts = { + shade_terminals = false, + } + -- set_terminal_keymaps = function() + -- local opts = {buffer = 0} + -- vim.keymap.set('t', '', [[]], opts) + -- vim.keymap.set('t', 'jk', [[]], opts) + -- vim.keymap.set('t', '', [[wincmd h]], opts) + -- vim.keymap.set('t', '', [[wincmd j]], opts) + -- vim.keymap.set('t', '', [[wincmd k]], opts) + -- vim.keymap.set('t', '', [[wincmd l]], opts) + -- vim.keymap.set('t', '', [[]], opts) + -- end + -- + -- -- if you only want these mappings for toggle term use term://*toggleterm#* instead + -- vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') +} diff --git a/lua/custom/plugins/vimtex.lua b/lua/custom/plugins/vimtex.lua new file mode 100644 index 00000000..50688d85 --- /dev/null +++ b/lua/custom/plugins/vimtex.lua @@ -0,0 +1,9 @@ +return { + "lervag/vimtex", + lazy = false, -- we don't want to lazy load VimTeX + -- tag = "v2.15", -- uncomment to pin to a specific release + init = function() + -- VimTeX configuration goes here, e.g. + vim.g.vimtex_view_method = "skim" + end +}