Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added some personal tweaks #178

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ spec "user.alpha"
spec "user.project"
spec "user.indentline"
spec "user.toggleterm"
spec "user.extras.neoscroll"
require "user.lazy"
26 changes: 23 additions & 3 deletions lua/user/colorscheme.lua
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions lua/user/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ vim.g.maplocalleader = " "

keymap("n", "<C-i>", "<C-i>", opts)

-- Press jk to enter normal mode
keymap("i", "jk", "<ESC>", opts)

-- Better save
keymap("n", "<leader>s", ":w<CR>", opts)

-- Resize with arrows
keymap("n", "<C-Up>", ":resize -2<CR>", opts)
keymap("n", "<C-Down>", ":resize +2<CR>", opts)
keymap("n", "<C-Left>", ":vertical resize -2<CR>", opts)
keymap("n", "<C-Right>", ":vertical resize +2<CR>", opts)

-- -- Navigate buffers
keymap("n", "<leader>k", ":bnext<CR>", opts)
keymap("n", "<leader>j", ":bprevious<CR>", opts)

-- Clear highlights
keymap("n", "<leader>h", "<cmd>nohlsearch<CR>", opts)

-- Better window navigation
keymap("n", "<m-h>", "<C-w>h", opts)
keymap("n", "<m-j>", "<C-w>j", opts)
Expand Down
2 changes: 2 additions & 0 deletions lua/user/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ function M.config()
"bashls",
"jsonls",
"yamlls",
"clangd",
"jdtls",
}

local default_diagnostic_config = {
Expand Down
12 changes: 12 additions & 0 deletions lua/user/lspsettings/pyright.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
return {
settings = {
python = {
analysis = {
auto_search_paths = true,
typeCheckingMode = "off",
diagnosticMode = "workspace",
useLibraryCodeForTypes = true,
},
},
},
}
2 changes: 2 additions & 0 deletions lua/user/mason.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function M.config()
"pyright",
"bashls",
"jsonls",
"clangd",
"jdtls",
}

require("mason").setup {
Expand Down
5 changes: 3 additions & 2 deletions lua/user/none-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/user/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
}
Expand Down