Last active
March 1, 2024 13:32
-
-
Save CristaLCorp/ffccba64c8abc5e3e7d6f05005050629 to your computer and use it in GitHub Desktop.
NVIM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---@type ChadrcConfig | |
local M = {} | |
M.ui = { theme = 'onedark' } | |
M.plugins = 'custom.plugins' | |
M.mappings = require "custom.mappings" | |
vim.wo.relativenumber = true | |
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local config = require("plugins.configs.lspconfig") | |
local on_attach = config.on_attach | |
local capabilities = config.capabilities | |
local lspconfig = require("lspconfig") | |
lspconfig.pyright.setup({ | |
on_attach = on_attach, | |
capabilities = capabilities, | |
filetypes = {"python"}, | |
}) | |
lspconfig.rust_analyzer.setup({ | |
on_attach = on_attach, | |
capabilities = capabilities, | |
filetypes = {"rust"}, | |
root_dir = lspconfig.util.root_pattern("Cargo.toml") | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---@type MappingsTable | |
local M = {} | |
-- changing the navigation key binding | |
M.general = { | |
n = { | |
["<C-h>"] = { "<cmd> TmuxNavigateLeft<CR>", "window left" }, | |
["<C-l>"] = { "<cmd> TmuxNavigateRight<CR>", "window right" }, | |
["<C-j>"] = { "<cmd> TmuxNavigateDown<CR>", "window down" }, | |
["<C-k>"] = { "<cmd> TmuxNavigateUp<CR>", "window up" } | |
}, | |
} | |
-- changing comment key binding | |
M.comment = { | |
plugin = true, | |
-- toggle comment in both modes | |
n = { | |
["<leader>:"] = { | |
function() | |
require("Comment.api").toggle.linewise.current() | |
end, | |
"Toggle comment", | |
}, | |
}, | |
v = { | |
["<leader>:"] = { | |
"<ESC><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<CR>", | |
"Toggle comment", | |
}, | |
}, | |
} | |
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local plugins = { | |
{ | |
"christoomey/vim-tmux-navigator", | |
lazy = false | |
}, | |
{ | |
"ThePrimeagen/vim-be-good", | |
lazy = false | |
}, | |
{ | |
"williamboman/mason.nvim", | |
opts = { | |
ensure_installed = { | |
"pyright", | |
}, | |
}, | |
}, | |
{ | |
"neovim/nvim-lspconfig", | |
config = function() | |
require "plugins.configs.lspconfig" | |
require "custom.configs.lspconfig" | |
end, | |
}, | |
} | |
return plugins |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment