diff --git a/init.vim b/init.vim index 62fa87b..681087c 100644 --- a/init.vim +++ b/init.vim @@ -49,6 +49,7 @@ source ~/.vim/plugin-confs/wakatime.vim source ~/.config/nvim/plugin-confs/dracula.lua source ~/.config/nvim/plugin-confs/github-theme.lua source ~/.config/nvim/plugin-confs/onedarkpro.lua +source ~/.config/nvim/plugin-confs/catppuccin.lua source ~/.config/nvim/lua/toggle_lsp_diagnostics.lua @@ -78,4 +79,4 @@ command! Aniwrapper execute ":FloatermNew aniwrapper -qtdoomone -D 144" set termguicolors " colorscheme doom-one colorscheme onedark -" colorscheme github_dark +" colorscheme catppuccin diff --git a/lua/plugins.lua b/lua/plugins.lua index 53749ff..c20de23 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -35,7 +35,7 @@ require('packer').startup(function(use) }, }, suggestion = { - enabled = true, + enabled = false, auto_trigger = true, debounce = 75, keymap = { @@ -191,6 +191,9 @@ require('packer').startup(function(use) use { 'hrsh7th/cmp-buffer' } + use { + 'hrsh7th/cmp-nvim-lsp-document-symbol' + } use { 'j-hui/fidget.nvim' } @@ -340,4 +343,8 @@ require('packer').startup(function(use) "nvim-telescope/telescope.nvim" } }) + + use 'khaveesh/vim-fish-syntax' + + use { "catppuccin/nvim", as = "catppuccin" } end) diff --git a/lua/settings.lua b/lua/settings.lua index b7ae5a6..7ff3eee 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -1,6 +1,7 @@ local g = vim.g local o = vim.o local A = vim.api +local l = vim.lsp g.mapleader = " " g.maplocalleader = ',' @@ -41,3 +42,17 @@ o.cmdheight = 1 o.updatetime = 300 o.timeoutlen = 500 o.pumwidth=35 + +local border = { + { "╭", "FloatBorder" }, + { "─", "FloatBorder" }, + { "╮", "FloatBorder" }, + { "│", "FloatBorder" }, + { "╯", "FloatBorder" }, + { "─", "FloatBorder" }, + { "╰", "FloatBorder" }, + { "│", "FloatBorder" }, +} + +l.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border }) +l.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border }) diff --git a/plugin-confs/catppuccin.lua b/plugin-confs/catppuccin.lua new file mode 100644 index 0000000..d6281ac --- /dev/null +++ b/plugin-confs/catppuccin.lua @@ -0,0 +1,68 @@ +require("catppuccin").setup({ + flavour = "macchiato", -- latte, frappe, macchiato, mocha + background = { -- :h background + light = "latte", + -- dark = "mocha", + dark = "macchiato", + }, + transparent_background = false, + show_end_of_buffer = false, -- show the '~' characters after the end of buffers + term_colors = false, + dim_inactive = { + enabled = false, + shade = "dark", + percentage = 0.15, + }, + no_italic = false, -- Force no italic + no_bold = false, -- Force no bold + styles = { + comments = { "italic" }, + conditionals = { "italic" }, + loops = { "bold" }, + functions = { "bold", "italic" }, + keywords = { "bold" }, + strings = { "italic" }, + variables = { "italic" }, + numbers = {}, + booleans = {}, + properties = {}, + types = { "bold" }, + operators = {}, + }, + color_overrides = {}, + custom_highlights = {}, + integrations = { + cmp = true, + gitsigns = true, + treesitter = true, + nvimtree = true, + telescope = true, + which_key = true, + notify = false, + mini = false + -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) + }, + native_lsp = { + enabled = true, + virtual_text = { + errors = { "italic" }, + hints = { "italic" }, + warnings = { "italic" }, + information = { "italic" }, + }, + underlines = { + errors = { "underline" }, + hints = { "underline" }, + warnings = { "underline" }, + information = { "underline" }, + }, + }, + +}) + +require("nvim-treesitter.configs").setup { + highlight = { + enable = true, + additional_vim_regex_highlighting = false + }, +} diff --git a/plugin-confs/nvim-cmp.lua b/plugin-confs/nvim-cmp.lua index 089abd5..31c3cc0 100644 --- a/plugin-confs/nvim-cmp.lua +++ b/plugin-confs/nvim-cmp.lua @@ -56,10 +56,10 @@ cmp.setup({ [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete(), - [''] = cmp.mapping.close(), + [''] = cmp.mapping.abort(), [''] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, - select = true, + select = false, }, -- [""] = cmp.mapping(function(fallback) -- if cmp.visible() then @@ -140,9 +140,10 @@ cmp.setup({ }, sources = cmp.config.sources({ { name = "copilot", group_index = 2 }, + { name = "path", group_index = 2 }, { name = 'nvim_lsp', group_index = 2 }, { name = 'nvim_lsp_signature_help', group_index = 2 }, - { name = "path", group_index = 2 }, + { name = 'nvim_lsp_document_symbol', group_index = 2 }, { name = 'luasnip', group_index = 2 }, -- For luasnip users. { name = 'buffer', @@ -175,6 +176,27 @@ cmp.setup({ } }) +cmp.setup.cmdline('/', { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } +}) + +cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { + name = 'cmdline', + option = { + ignore_cmds = { 'Man', '!' } + } + } + }) +}) + local capabilities = require('cmp_nvim_lsp').default_capabilities() local servers = { 'bashls', 'jedi_language_server', 'sqlls', 'jsonls', 'yamlls', 'vimls', 'dotls', 'dockerls', 'html', 'cssls' } diff --git a/plugin-confs/onedarkpro.lua b/plugin-confs/onedarkpro.lua index 5835f59..0ff6453 100644 --- a/plugin-confs/onedarkpro.lua +++ b/plugin-confs/onedarkpro.lua @@ -1,29 +1,74 @@ -local onedarkpro = require("onedarkpro") -onedarkpro.setup({ - theme = "onedark", - -- colors = {}, -- Override default colors. Can specify colors for "onelight" or "onedark" themes by passing in a table - -- hlgroups = {}, -- Override default highlight groups - plugins = { -- Override which plugins highlight groups are loaded - native_lsp = true, - polygot = true, - treesitter = true, +require("onedarkpro").setup({ + colors = {}, -- Override default colors or create your own + filetypes = { -- Override which filetype highlight groups are loaded + java = true, + javascript = true, + lua = true, + markdown = true, + php = true, + python = true, + ruby = true, + rust = true, + toml = true, + typescript = true, + typescriptreact = true, + vue = true, + yaml = true, }, - styles = { - comments = "italic", - functions = "italic,bold", - keywords = "italic,bold", - strings = "NONE", - variables = "bold" + plugins = { -- Override which plugin highlight groups are loaded + aerial = false, + barbar = false, + copilot = true, + dashboard = true, + gitsigns = true, + hop = false, + indentline = false, + leap = false, + lsp_saga = false, + marks = true, + neotest = false, + neo_tree = true, + nvim_cmp = true, + nvim_bqf = false, + nvim_dap = true, + nvim_dap_ui = true, + nvim_hlslens = true, + nvim_lsp = true, + nvim_navic = false, + nvim_notify = true, + nvim_tree = true, + nvim_ts_rainbow = true, + op_nvim = false, + packer = true, + polygot = true, + startify = false, + telescope = true, + toggleterm = true, + treesitter = true, + trouble = true, + vim_ultest = false, + which_key = true, + }, + highlights = {}, -- Override default highlight groups or create your own + styles = { -- For example, to apply bold and italic, use "bold,italic" + types = "bold", -- Style that is applied to types + methods = "NONE", -- Style that is applied to methods + numbers = "NONE", -- Style that is applied to numbers + strings = "italic", -- Style that is applied to strings + comments = "italic", -- Style that is applied to comments + keywords = "bold,italic", -- Style that is applied to keywords + constants = "bold", -- Style that is applied to constants + functions = "bold,italic", -- Style that is applied to functions + operators = "NONE", -- Style that is applied to operators + variables = "italic", -- Style that is applied to variables + parameters = "italic", -- Style that is applied to parameters + conditionals = "NONE", -- Style that is applied to conditionals + virtual_text = "italic", -- Style that is applied to virtual text }, options = { - bold = true, -- Use the themes opinionated bold styles? - italic = true, -- Use the themes opinionated italic styles? - underline = true, -- Use the themes opinionated underline styles? - undercurl = false, -- Use the themes opinionated undercurl styles? - cursorline = true, -- Use cursorline highlighting? - transparency = false, -- Use a transparent background? - terminal_colors = false, -- Use the theme's colors for Neovim's :terminal? - window_unfocussed_color = false, -- When the window is out of focus, change the normal background? + cursorline = true, -- Use cursorline highlighting? + transparency = false, -- Use a transparent background? + terminal_colors = true, -- Use the theme's colors for Neovim's :terminal? + highlight_inactive_windows = false, -- When the window is out of focus, change the normal background? } }) -onedarkpro.load()