From c431b6c3566eb30d10421969cd6022cd97775e66 Mon Sep 17 00:00:00 2001 From: maxwelbm Date: Wed, 4 Oct 2023 20:16:01 -0300 Subject: [PATCH] feat: adjusting theme dark and alsome use --- init.lua | 412 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 370 insertions(+), 42 deletions(-) diff --git a/init.lua b/init.lua index 7d91dc02..acdd9fc1 100644 --- a/init.lua +++ b/init.lua @@ -49,11 +49,11 @@ require('lazy').setup({ { 'williamboman/mason.nvim', config = true }, 'williamboman/mason-lspconfig.nvim', - -- Useful status updates for LSP + -- Additional lua configuration, makes nvim stuff amazing! -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` { 'j-hui/fidget.nvim', tag = 'legacy', opts = {} }, - -- Additional lua configuration, makes nvim stuff amazing! + -- Useful status updates for LSP 'folke/neodev.nvim', }, }, @@ -110,7 +110,8 @@ require('lazy').setup({ }, { - 'catppuccin/nvim', + -- Theme inspired by Atom + 'navarasu/onedark.nvim', lazy = true, }, @@ -118,27 +119,14 @@ require('lazy').setup({ -- Set lualine as statusline 'nvim-lualine/lualine.nvim', -- See `:help lualine.txt` - opts = { - options = { - icons_enabled = false, - theme = "catppuccin", - component_separators = '|', - section_separators = '', - }, - }, + lazy = true, }, { -- Add indentation guides even on blank lines - 'lukas-reineke/indent-blankline.nvim', + 'lukas-reineke/indent-blankline.nvim', main = "ibl", -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` - main = "ibl", - opts = { - char = '┊', - show_trailing_blankline_indent = true, - space_char_blankline = " ", - }, }, -- "gc" to comment visual regions/lines @@ -192,6 +180,9 @@ require('lazy').setup({ { 'akinsho/toggleterm.nvim' }, { 'nvim-tree/nvim-web-devicons' }, { 'terrortylor/nvim-comment' }, + { 'crispgm/nvim-go' }, + { 'doums/darcula' }, + { 'andweeb/presence.nvim' }, }, {}) -- [[ Setting options ]] @@ -235,6 +226,10 @@ vim.o.completeopt = 'menuone,noselect' -- NOTE: You should make sure your terminal supports this vim.o.termguicolors = true +-- tabs +vim.o.tabstop = 4 +vim.o.shiftwidth = 4 + -- [[ Basic Keymaps ]] -- Keymaps for better default experience @@ -516,27 +511,28 @@ cmp.setup { require("neoscroll").setup() -require("catppuccin").setup({ - flavour = "frappe", -- latte, frappe, macchiato, mocha - background = { -- :h background - dark = "frappe", - }, - transparent_background = false, -- disables setting the background color. - - color_overrides = {}, - custom_highlights = {}, - integrations = { - cmp = true, - gitsigns = true, - nvimtree = true, - treesitter = true, - notify = false, - mini = false, - }, -}) +-- require("catppuccin").setup({ +-- flavour = "frappe", -- latte, frappe, macchiato, mocha +-- background = { -- :h background +-- dark = "frappe", +-- }, +-- transparent_background = true, -- disables setting the background color. +-- +-- color_overrides = {}, +-- custom_highlights = {}, +-- integrations = { +-- cmp = true, +-- gitsigns = true, +-- nvimtree = true, +-- treesitter = true, +-- notify = false, +-- mini = false, +-- }, +-- }) -- setup must be called before loading -vim.cmd.colorscheme "catppuccin" +-- vim.cmd.colorscheme "darcula" +-- vim.cmd.colorscheme "catppuccin" require("nvim-tree").setup({ filters = { @@ -629,10 +625,10 @@ vim.keymap.set("t", "", "wincmd j", { desc = "window: Focus down" }) vim.keymap.set("t", "", "wincmd k", { desc = "window: Focus up" }) -- Visual mode -vim.keymap.set("v", "", ":m '<-2gv=gv", { desc = "edit: Move this line up" }) -vim.keymap.set("v", "", ":m '>+1gv=gv", { desc = "edit: Move this line down" }) -vim.keymap.set("v", "<<>", ">", ">gv", { desc = "edit: Increase indent" }) +-- vim.keymap.set("v", "", ":m '<-2gv=gv", { desc = "edit: Move this line up" }) +-- vim.keymap.set("v", "", ":m '>+1gv=gv", { desc = "edit: Move this line down" }) +-- vim.keymap.set("v", "<<>", ">", ">gv", { desc = "edit: Increase indent" }) require("toggleterm").setup({ open_mapping = [[]], @@ -655,7 +651,339 @@ require('nvim_comment').setup({ hook = nil }) -vim.o.laststatus = 0 +require('go').setup({ + -- notify: use nvim-notify + notify = false, + -- auto commands + auto_format = true, + auto_lint = true, + -- linters: revive, errcheck, staticcheck, golangci-lint + linter = 'golangci-lint', + -- linter_flags: e.g., {revive = {'-config', '/path/to/config.yml'}} + linter_flags = {}, + -- lint_prompt_style: qf (quickfix), vt (virtual text) + lint_prompt_style = 'vt', + -- formatter: goimports, gofmt, gofumpt, lsp + formatter = 'goimports', + -- maintain cursor position after formatting loaded buffer + maintain_cursor_pos = false, + -- test flags: -count=1 will disable cache + test_flags = {'-v'}, + test_timeout = '30s', + test_env = {}, + -- show test result with popup window + test_popup = true, + test_popup_auto_leave = false, + test_popup_width = 80, + test_popup_height = 10, + -- test open + test_open_cmd = 'edit', + -- struct tags + tags_name = 'json', + tags_options = {'json=omitempty'}, + tags_transform = 'snakecase', + tags_flags = {'-skip-unexported'}, + -- quick type + quick_type_flags = {'--just-types'}, +}) + +require("ibl").setup { + indent = { char = '┊' }, +} + +-- The setup config table shows all available config options with their default values: +require("presence").setup({ + -- General options + auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`) + neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image + main_image = "neovim", -- Main image display (either "neovim" or "file") + client_id = "793271441293967371", -- Use your own Discord application client id (not recommended) + log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error") + debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(, true)`) + enable_line_number = false, -- Displays the current line number instead of the current project + blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches + buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "