diff --git a/init.lua b/init.lua index 45a983e19..8fe378187 100644 --- a/init.lua +++ b/init.lua @@ -27,4 +27,5 @@ spec "user.alpha" spec "user.project" spec "user.indentline" spec "user.toggleterm" +spec "user.extras.neoscroll" require "user.lazy" diff --git a/lua/user/colorscheme.lua b/lua/user/colorscheme.lua index 54cbc3cdc..249ccbb4d 100644 --- a/lua/user/colorscheme.lua +++ b/lua/user/colorscheme.lua @@ -1,11 +1,31 @@ +-- local M = { +-- "LunarVim/darkplus.nvim", +-- lazy = false, -- make sure we load this during startup if it is your main colorscheme +-- priority = 1000, -- make sure to load this before all the other start plugins +-- } +-- +-- function M.config() +-- vim.cmd.colorscheme "darkplus" +-- end +-- +-- return M local M = { - "LunarVim/darkplus.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme +"ellisonleao/gruvbox.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme priority = 1000, -- make sure to load this before all the other start plugins + config = true, + opts = ... } +M.name = "gruvbox" function M.config() - vim.cmd.colorscheme "darkplus" + require("gruvbox").setup { + transparent_mode = true, + } + local status_ok, _ = pcall(vim.cmd.colorscheme, M.name) + if not status_ok then + return + end end return M diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua index cdd28a30a..b2756072b 100644 --- a/lua/user/keymaps.lua +++ b/lua/user/keymaps.lua @@ -7,6 +7,25 @@ vim.g.maplocalleader = " " keymap("n", "", "", opts) +-- Press jk to enter normal mode +keymap("i", "jk", "", opts) + +-- Better save +keymap("n", "s", ":w", opts) + +-- Resize with arrows +keymap("n", "", ":resize -2", opts) +keymap("n", "", ":resize +2", opts) +keymap("n", "", ":vertical resize -2", opts) +keymap("n", "", ":vertical resize +2", opts) + +-- -- Navigate buffers +keymap("n", "k", ":bnext", opts) +keymap("n", "j", ":bprevious", opts) + +-- Clear highlights +keymap("n", "h", "nohlsearch", opts) + -- Better window navigation keymap("n", "", "h", opts) keymap("n", "", "j", opts) diff --git a/lua/user/lspconfig.lua b/lua/user/lspconfig.lua index 01ef2f55b..ffbce975f 100644 --- a/lua/user/lspconfig.lua +++ b/lua/user/lspconfig.lua @@ -76,6 +76,8 @@ function M.config() "bashls", "jsonls", "yamlls", + "clangd", + "jdtls", } local default_diagnostic_config = { diff --git a/lua/user/lspsettings/pyright.lua b/lua/user/lspsettings/pyright.lua new file mode 100644 index 000000000..c44ade266 --- /dev/null +++ b/lua/user/lspsettings/pyright.lua @@ -0,0 +1,12 @@ +return { + settings = { + python = { + analysis = { + auto_search_paths = true, + typeCheckingMode = "off", + diagnosticMode = "workspace", + useLibraryCodeForTypes = true, + }, + }, + }, +} diff --git a/lua/user/mason.lua b/lua/user/mason.lua index 3e51b30d0..e7ca54e8d 100644 --- a/lua/user/mason.lua +++ b/lua/user/mason.lua @@ -15,6 +15,8 @@ function M.config() "pyright", "bashls", "jsonls", + "clangd", + "jdtls", } require("mason").setup { diff --git a/lua/user/none-ls.lua b/lua/user/none-ls.lua index 603c9237b..3028afe88 100644 --- a/lua/user/none-ls.lua +++ b/lua/user/none-ls.lua @@ -15,15 +15,16 @@ function M.config() debug = false, sources = { formatting.stylua, - formatting.prettier, + -- formatting.prettier, formatting.black, -- formatting.prettier.with { -- extra_filetypes = { "toml" }, -- -- extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" }, -- }, -- formatting.eslint, - null_ls.builtins.diagnostics.flake8, -- diagnostics.flake8, + -- diagnostics.cpplint, + diagnostics.jdtls, null_ls.builtins.completion.spell, }, } diff --git a/lua/user/treesitter.lua b/lua/user/treesitter.lua index f6768bdb2..41efaeef9 100644 --- a/lua/user/treesitter.lua +++ b/lua/user/treesitter.lua @@ -6,7 +6,7 @@ local M = { function M.config() require("nvim-treesitter.configs").setup { - ensure_installed = { "lua", "markdown", "markdown_inline", "bash", "python" }, + ensure_installed = { "lua", "markdown", "markdown_inline", "bash", "python", "cpp", "java"}, highlight = { enable = true }, indent = { enable = true }, }