From 508883c3c227d8078baaa782134516a3bc9ea232 Mon Sep 17 00:00:00 2001 From: Alexander Gehrke Date: Tue, 1 Aug 2023 16:28:47 +0200 Subject: [PATCH] Update lots of things --- after/plugin/gitgutter.vim | 5 -- after/plugin/telescope.lua | 1 + ftdetect/turtle.vim | 2 +- init.lua | 35 ++++++------ lazy-lock.json | 78 +++++++++++++++++++++++++++ lua/my-lsp.lua | 2 - lua/plugins/beamer.lua | 7 +++ lua/plugins/chroma.lua | 5 +- lua/plugins/cmp.lua | 3 +- lua/plugins/fugitive.lua | 3 ++ lua/plugins/init.lua | 2 +- lua/plugins/lspconfig.lua | 8 +-- lua/plugins/lush.lua | 4 ++ lua/plugins/metals.lua | 1 + lua/plugins/tabline.lua | 45 +++------------- lua/plugins/treesitter.lua | 6 ++- syntax/{rdf_turtle.vim => turtle.vim} | 0 17 files changed, 133 insertions(+), 74 deletions(-) delete mode 100644 after/plugin/gitgutter.vim create mode 100644 lazy-lock.json create mode 100644 lua/plugins/beamer.lua create mode 100644 lua/plugins/fugitive.lua create mode 100644 lua/plugins/lush.lua rename syntax/{rdf_turtle.vim => turtle.vim} (100%) diff --git a/after/plugin/gitgutter.vim b/after/plugin/gitgutter.vim deleted file mode 100644 index 8fe5645..0000000 --- a/after/plugin/gitgutter.vim +++ /dev/null @@ -1,5 +0,0 @@ -hi link GitGutterAddLineNr DiffAdd -hi link GitGutterChangeLineNr DiffChange -hi link GitGutterDeleteLineNr DiffDelete -hi link GitGutterChangeDeleteLineNr GitGutterChangeLine -GitGutterLineNrHighlightsEnable diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua index fde5ea6..29dd1e3 100644 --- a/after/plugin/telescope.lua +++ b/after/plugin/telescope.lua @@ -32,3 +32,4 @@ map('n', 'g/', telescope.builtin.live_grep) map('n', '', telescope.builtin.current_buffer_fuzzy_find) map('n', '*', telescope.builtin.grep_string) map('n', 'gb', telescope.builtin.buffers) +map('n', '', telescope.builtin.registers) diff --git a/ftdetect/turtle.vim b/ftdetect/turtle.vim index 0bec6f9..002c820 100644 --- a/ftdetect/turtle.vim +++ b/ftdetect/turtle.vim @@ -1 +1 @@ -au BufRead,BufNewFile *.ttl set filetype=rdf_turtle +au BufRead,BufNewFile *.ttl set filetype=turtle diff --git a/init.lua b/init.lua index 6e69387..db5a34c 100644 --- a/init.lua +++ b/init.lua @@ -7,17 +7,23 @@ end -- lazy.nvim bootstrap local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) -require("lazy").setup("plugins") +require("lazy").setup("plugins", { + dev = { + path = "~/projects/nvim/", + patterns = {"crater2150"}, + fallback = true + } +}) vim.opt.background = "dark" vim.g.chroma_italic_style = "bold" @@ -34,9 +40,6 @@ vim.opt.whichwrap = "b,s,<,>,[,],h,l" vim.opt.timeout = false -vim.opt.foldmethod = "expr" -vim.opt.foldlevelstart = 99 -vim.opt.foldexpr = 'v:lua.vim.treesitter.foldexpr()' vim.opt.foldenable = false -- todo visualbell needed? @@ -88,10 +91,10 @@ key('n', '', 'j') key('n', '', 'k') key('n', '', 'l') -- -key('n', '', "',<") -key('n', '', "',>',") -key('n', '', "',-") -key('n', '', "',+") +key('n', '', "<") +key('n', '', ">") +key('n', '', "-") +key('n', '', "+") key('n', '', function() vim.fn.search('^[^[:space:])\\]}]', 'be') end, { desc = 'jump to previous unindented line' }) key('n', '', function() vim.fn.search('^[^[:space:])\\]}]', 'e') end, { desc = 'jump to next unindented line' }) diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..70cc0f4 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,78 @@ +{ + "bluloco.nvim": { "branch": "main", "commit": "27ad647f0fc3270e732add1533ad9bcbf702f24e" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, + "copilot-cmp": { "branch": "master", "commit": "c2cdb3c0f5078b0619055af192295830a7987790" }, + "copilot.lua": { "branch": "master", "commit": "e48bd7020a98be217d85c006a298656294fd6210" }, + "deepl.vim": { "branch": "main", "commit": "2397b16d4070080b695321a1fe7958fd0812176b" }, + "dressing.nvim": { "branch": "master", "commit": "39611852fd7bbac117e939a26759bb37361f0c90" }, + "gina.vim": { "branch": "master", "commit": "ff6c2ddeca98f886b57fb42283c12e167d6ab575" }, + "gitsigns.nvim": { "branch": "main", "commit": "adcf2c7f2f495f5df148683764bf7cba6a70f34c" }, + "gitv": { "branch": "master", "commit": "a73599c34202709eaa7da78f4fe32b97c6ef83f8" }, + "hledger-vim": { "branch": "master", "commit": "165eb483a10fd610bd9cad5d5246e457bf5fe285" }, + "indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" }, + "lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" }, + "lsp-colors.nvim": { "branch": "main", "commit": "2bbe7541747fd339bdd8923fc45631a09bb4f1e5" }, + "lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" }, + "lsp_signature.nvim": { "branch": "master", "commit": "58d4e810801da74c29313da86075d6aea537501f" }, + "lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, + "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, + "lush.nvim": { "branch": "main", "commit": "b10ef2bfff0647e701b691019ade3edd5e44eb50" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" }, + "mason.nvim": { "branch": "main", "commit": "3f6b544c75c01549f7a2a9e395e0f1cea42b25dd" }, + "neoconf.nvim": { "branch": "main", "commit": "08f146d53e075055500dca35e93281faff95716b" }, + "neodev.nvim": { "branch": "main", "commit": "866b6b6e687a93ba98851a03a74bf6d9211b7299" }, + "null-ls.nvim": { "branch": "main", "commit": "db09b6c691def0038c456551e4e2772186449f35" }, + "nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" }, + "nvim-dap": { "branch": "master", "commit": "d17d1bba23ec72a157bd183c57840c39e323f515" }, + "nvim-genghis": { "branch": "main", "commit": "9f04102a6f591c231dfb23b58ad3b49cd0a43c03" }, + "nvim-jdtls": { "branch": "master", "commit": "96e3978c3fdae3950f6ccda548775e8b8952f74a" }, + "nvim-lspconfig": { "branch": "master", "commit": "dd11ba7b3c8f82d51b6d4dd7d68fce2d78bf78a0" }, + "nvim-metals": { "branch": "main", "commit": "92e2085f08da4598c6ae0c19c332c5c04b33a2c5" }, + "nvim-treesitter": { "branch": "master", "commit": "7b04e8b67eec7d92daadf9f0717dd272ddfc81a3" }, + "nvim-treesitter-context": { "branch": "master", "commit": "6f8f788738b968f24a108ee599c5be0031f94f06" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ef32a5c24b767d165ed63fd2b24ac8dc52742521" }, + "nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" }, + "playground": { "branch": "master", "commit": "2b81a018a49f8e476341dfcb228b7b808baba68b" }, + "plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" }, + "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, + "shipwright.nvim": { "branch": "master", "commit": "ab70e80bb67b7ed3350bec89dd73473539893932" }, + "splice.vim": { "branch": "master", "commit": "815a28e687fdf78b67e9b9cd4c21277bbe658873" }, + "suda.vim": { "branch": "master", "commit": "8b0fc3711760195aba104e2d190cff9af8267052" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, + "telescope-lsp-handlers.nvim": { "branch": "trunk", "commit": "de02085d6af1633942549a238bc7a5524fa9b201" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, + "telescope.nvim": { "branch": "master", "commit": "1228f3b15ca3d9b95dcb92efda6a3448871030bd" }, + "text-to-colorscheme": { "branch": "main", "commit": "a6226a2d771b52dfadea81b308069a8655e0c978" }, + "trouble.nvim": { "branch": "main", "commit": "0e6703c1d37d2d34ed029ab54f9bd66e3f2ecbf7" }, + "vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" }, + "vim-characterize": { "branch": "master", "commit": "1ba0fcf208464647e2df2e9f693247a2207f22a4" }, + "vim-commentary": { "branch": "master", "commit": "e87cd90dc09c2a203e13af9704bd0ef79303d755" }, + "vim-easy-align": { "branch": "master", "commit": "12dd6316974f71ce333e360c0260b4e1f81169c3" }, + "vim-fugitive": { "branch": "master", "commit": "b3b838d690f315a503ec4af8c634bdff3b200aaf" }, + "vim-gitignore": { "branch": "master", "commit": "641dfa648d2581a5e5e9b0d11ffee37da8de49d7" }, + "vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" }, + "vim-highlightedyank": { "branch": "master", "commit": "fa3f57b097e9521ce41a66b6c7cf5d9adea70ea3" }, + "vim-hocon": { "branch": "master", "commit": "bb8fb14e00f8fc1eec27dd39dcc605aac43328a3" }, + "vim-indent-object": { "branch": "master", "commit": "5c5b24c959478929b54a9e831a8e2e651a465965" }, + "vim-kitty": { "branch": "main", "commit": "20a2625b600f26ef8ce664c098c78ca5256695a0" }, + "vim-ledger": { "branch": "master", "commit": "8e735f84d2d954229ee65f4dc71bfc0bec897d98" }, + "vim-markdown-composer": { "branch": "master", "commit": "e6f99bc20cfcb277c63041b1f766e6d5940bcc76" }, + "vim-mkdir": { "branch": "master", "commit": "f0ba7a7dc190a0cedf1d827958c99f3718109cf0" }, + "vim-nftables": { "branch": "master", "commit": "26f8a506c6f3e41f1e4a8d6aa94c9a79a666bbff" }, + "vim-pandoc": { "branch": "master", "commit": "d4fc6f8234c37eef16b6de8055c5fe53b7d7316a" }, + "vim-pandoc-syntax": { "branch": "master", "commit": "4268535e1d33117a680a91160d845cd3833dfe28" }, + "vim-pass": { "branch": "master", "commit": "9bd30f675ea66e3f413d6f45db3be008dd70bbad" }, + "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, + "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, + "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, + "vim-textobj-comment": { "branch": "master", "commit": "58ae4571b76a5bf74850698f23d235eef991dd4b" }, + "vim-textobj-user": { "branch": "master", "commit": "41a675ddbeefd6a93664a4dc52f302fe3086a933" }, + "vim-vsnip": { "branch": "master", "commit": "7753ba9c10429c29d25abfd11b4c60b76718c438" }, + "vim-vsnip-integ": { "branch": "master", "commit": "1914e72cf3de70df7f5dde476cd299aba2440aef" }, + "vimtex": { "branch": "master", "commit": "53464eb5df497eb015da773f7a309e3bf2dfa16e" }, + "which-key.nvim": { "branch": "main", "commit": "38b990f6eabf62014018b4aae70a97d7a6c2eb88" } +} \ No newline at end of file diff --git a/lua/my-lsp.lua b/lua/my-lsp.lua index 01be8fe..f3f4b61 100644 --- a/lua/my-lsp.lua +++ b/lua/my-lsp.lua @@ -48,8 +48,6 @@ local on_attach = function(client, bufnr) vim.cmd [[autocmd BufEnter,BufWrite lua vim.lsp.codelens.refresh()]] vim.cmd [[autocmd CursorHoldI * silent! lua vim.lsp.buf.signature_help()]] vim.cmd [[autocmd CursorHold * lua vim.diagnostic.open_float({max_width = 100, focusable = false})]] - - vim.lsp.codelens.refresh() end require("lsp.installer")(on_attach) diff --git a/lua/plugins/beamer.lua b/lua/plugins/beamer.lua new file mode 100644 index 0000000..b3fa6cd --- /dev/null +++ b/lua/plugins/beamer.lua @@ -0,0 +1,7 @@ +return { + 'uloco/bluloco.nvim', + dependencies = { 'rktjmp/lush.nvim' }, + opts = { + italics = true, + }, +} diff --git a/lua/plugins/chroma.lua b/lua/plugins/chroma.lua index daad375..71cb32a 100644 --- a/lua/plugins/chroma.lua +++ b/lua/plugins/chroma.lua @@ -1,5 +1,8 @@ return { + --'crater2150/vim-theme-chroma-lush', 'crater2150/vim-theme-chroma', - lazy = false, priority = 1000, + dev = true, + lazy = false, + priority = 1000, config = function() vim.cmd.colorscheme("chroma") end } diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index cefab5e..109a19c 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -9,7 +9,6 @@ return { "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", 'hrsh7th/cmp-buffer', - 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-path', 'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', @@ -29,7 +28,7 @@ return { text = false, } } - } + }, }, config = function () require("copilot_cmp").setup() diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua new file mode 100644 index 0000000..db4be56 --- /dev/null +++ b/lua/plugins/fugitive.lua @@ -0,0 +1,3 @@ +return { + 'tpope/vim-fugitive' +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e8f2bf2..f99e3d8 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -17,7 +17,7 @@ return { }, -- ii / ai 'michaeljsmith/vim-indent-object', - 'airblade/vim-gitgutter', + {'lewis6991/gitsigns.nvim', config=true}, 'neovim/nvim-lspconfig', diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 354fdb1..de53eb9 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -9,12 +9,7 @@ return { "mason.nvim", "williamboman/mason-lspconfig.nvim", 'nvim-lua/lsp-status.nvim', - { - "hrsh7th/cmp-nvim-lsp", - cond = function() - return require("lazy.core.config").plugins["nvim-cmp"] ~= nil - end, - }, + "hrsh7th/cmp-nvim-lsp", }, ---@class PluginLspOpts opts = function() return { @@ -162,6 +157,7 @@ return { nls.builtins.completion.vsnip, nls.builtins.diagnostics.zsh, nls.builtins.formatting.beautysh, + nls.builtins.code_actions.gitsigns, }, } end, diff --git a/lua/plugins/lush.lua b/lua/plugins/lush.lua new file mode 100644 index 0000000..c4fcc84 --- /dev/null +++ b/lua/plugins/lush.lua @@ -0,0 +1,4 @@ +return { + 'rktjmp/lush.nvim', + 'rktjmp/shipwright.nvim', +} diff --git a/lua/plugins/metals.lua b/lua/plugins/metals.lua index 8cc94b5..8d7d25b 100644 --- a/lua/plugins/metals.lua +++ b/lua/plugins/metals.lua @@ -5,6 +5,7 @@ return { 'mfussenegger/nvim-dap', "hrsh7th/cmp-nvim-lsp", }, + ft = { 'scala', 'sbt' }, config = function() local metals_config = require('metals').bare_config() metals_config.init_options.statusBarProvider = "on" diff --git a/lua/plugins/tabline.lua b/lua/plugins/tabline.lua index 6f570ae..7f77a0c 100644 --- a/lua/plugins/tabline.lua +++ b/lua/plugins/tabline.lua @@ -1,47 +1,14 @@ -local colors = { - blue = '#00afff', - lightblue = '#87afff', - orange = '#ffaf5f', - yellow = '#ffd75f', - green = '#87d75f', - red = '#ff0000', - lightred = '#ff5f5f', - white = '#ffffff', - lightgray = '#c6c6c6', - gray = '#6a6a6a', - bggray = '#1c1c1c', - lightbggray = '#262626', - visualgray = '#303030', - black = '#000000', - normfg = '#ffffff', - normbg = '#000000', -} - return { - 'hoob3rt/lualine.nvim', + 'nvim-lualine/lualine.nvim', dependencies = { {'kyazdani42/nvim-web-devicons', lazy = true }, 'nvim-lua/lsp-status.nvim', + 'crater2150/vim-theme-chroma', }, - opts = { + event = "VeryLazy", + opts = function(_, opts) return { options = { - theme = { - normal = { - a = { fg = colors.black, bg = colors.gray }, - b = { fg = colors.yellow, bg = colors.lightbggray }, - c = { fg = colors.blue, bg = colors.bggray }, - z = { fg = colors.yellow, bg = colors.gray }, - }, - inactive = { - a = { fg = colors.black, bg = colors.gray }, - b = { fg = colors.red, bg = colors.lightbggray }, - c = { fg = colors.gray, bg = colors.bggray }, - z = { fg = colors.blue, bg = colors.gray }, - }, - insert = { a = { fg = colors.black, bg = colors.green } }, - visual = { a = { fg = colors.black, bg = colors.yellow } }, - replace = { a = { fg = colors.black, bg = colors.red } }, - } + theme = require('chroma-theme.lualine') }, tabline = { lualine_a = { 'branch' }, @@ -54,7 +21,6 @@ return { sections = { lualine_a = { 'filename' }, lualine_b = { 'diff', 'diagnostics' }, - lualine_c = {}, lualine_x = { "require'lsp-status'.status()" }, lualine_y = { 'filetype' }, lualine_z = { 'searchcount', 'location' } @@ -71,4 +37,5 @@ return { inactive_winbar = {}, extensions = {} } + end, } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index bcbecb9..0744781 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -83,7 +83,11 @@ return { }, { 'nvim-treesitter/playground', dependencies = { "nvim-treesitter/nvim-treesitter" }, - cmd = 'TSPlaygroundToggle' + cmd = { + 'TSPlaygroundToggle', + 'TSHighlightCapturesUnderCursor', + 'TSNodeUnderCursor', + } }, { "nvim-treesitter/nvim-treesitter-context", event = "VeryLazy", diff --git a/syntax/rdf_turtle.vim b/syntax/turtle.vim similarity index 100% rename from syntax/rdf_turtle.vim rename to syntax/turtle.vim