diff --git a/nvim/init.lua b/nvim/init.lua index 807f0b5..4f5ceee 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -33,7 +33,20 @@ require("lazy").setup({ { "sindrets/diffview.nvim", dependencies = "nvim-lua/plenary.nvim" }, { "airblade/vim-gitgutter" }, { 'windwp/nvim-autopairs', event = "InsertEnter", config = true }, -{ "wnkz/monoglow.nvim", config = function() vim.cmd'colorscheme monoglow' end}, +{"FabijanZulj/blame.nvim"}, +{ + "rebelot/kanagawa.nvim", + config = function() + require("kanagawa").setup({ + commentStyle = { italic = true }, + keywordStyle = { italic = true }, + statementStyle = { bold = true }, + theme = "wave", + background = { dark = "wave", light = "lotus" }, + }) + vim.cmd("colorscheme kanagawa") + end, +}, { "scalameta/nvim-metals", ft = { "scala", "sbt", "java" }, @@ -68,9 +81,8 @@ vim.o.softtabstop = 4 vim.o.shiftwidth = 4 vim.o.expandtab = true vim.o.smartindent = true -vim.o.hidden = false vim.o.number = true -vim.o.relativenumber = true +-- breaks telescope vim.o.cursorline = true vim.o.clipboard = 'unnamedplus' vim.o.wildmenu = true @@ -85,7 +97,7 @@ vim.o.errorbells = false vim.g.mapleader = ' ' vim.o.mouse = nil vim.o.autoread = true -vim.o.swapfile = false +vim.o.swapfile = true vim.o.wildmode = longest -- Telescope Keybinds @@ -135,12 +147,49 @@ cmp.setup({ }) }) +vim.lsp.config["gopls"] = { + cmd = { vim.fn.stdpath("data") .. "/mason/bin/gopls" }, + capabilities = require('cmp_nvim_lsp').default_capabilities(), + root_markers = { "go.mod", "go.work", ".git" }, + settings = { + gopls = { + analyses = { + unusedparams = true, + shadow = true, + }, + staticcheck = true, + }, + }, +} + require("mason").setup() require("mason-lspconfig").setup({ automatic_installation = true, }) +-- Standalone gopls LSP (NO MASON) + +local capabilities = require('cmp_nvim_lsp').default_capabilities() + +vim.lsp.config('gopls', { + cmd = { 'gopls' }, -- uses system-installed gopls from PATH + filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' }, + root_markers = { 'go.mod', 'go.work', '.git' }, + capabilities = capabilities, + settings = { + gopls = { + analyses = { + unusedparams = true, + shadow = true, + }, + staticcheck = true, + } + } +}) + +vim.lsp.enable('gopls') + require('lualine').setup { options = { theme = 'iceberg_dark',