moreeeee updates . ..

This commit is contained in:
Jimmy Bates 2024-04-21 04:50:58 -07:00
parent 0ed010f399
commit b94345a27a
7 changed files with 30 additions and 10 deletions

View File

@ -176,7 +176,7 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
-- --
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping -- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
-- or just use <C-\><C-n> to exit terminal mode -- or just use <C-\><C-n> to exit terminal mode
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' }) vim.keymap.set('t', '<Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })
-- TIP: Disable arrow keys in normal mode -- TIP: Disable arrow keys in normal mode
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>') -- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
@ -524,8 +524,8 @@ require('lazy').setup({
-- --
require 'kickstart.plugins.debug', require 'kickstart.plugins.debug',
require 'kickstart.plugins.indent_line', require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint', require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs', require 'kickstart.plugins.autopairs',
require 'kickstart.plugins.neo-tree', require 'kickstart.plugins.neo-tree',
require 'custom.plugins.autocomplete', require 'custom.plugins.autocomplete',
require 'custom.plugins.autoformat', require 'custom.plugins.autoformat',
@ -566,3 +566,9 @@ require('lazy').setup({
}) })
require 'custom' require 'custom'
vim.api.nvim_create_autocmd('VimEnter', {
callback = function()
vim.cmd 'Trouble'
end,
})

View File

@ -147,9 +147,13 @@ return { -- LSP Configuration & Plugins
clangd = { clangd = {
cmd = { cmd = {
'clangd', 'clangd',
'--offset-encoding=UTF-8', '--query-driver=/bin/clang-tidy,/usr/bin/**/clang-*,/bin/clang,/bin/clang++,/usr/bin/gcc,/usr/bin/g++',
'--clang-tidy',
'--clang-tidy-checks=*',
'--style=file ~/.config/nvim/clang-format', '--style=file ~/.config/nvim/clang-format',
'--background-index',
}, },
capabilities = capabilities,
}, },
-- gopls = {}, -- gopls = {},
pyright = {}, pyright = {},
@ -199,6 +203,7 @@ return { -- LSP Configuration & Plugins
local ensure_installed = vim.tbl_keys(servers or {}) local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, { vim.list_extend(ensure_installed, {
'stylua', -- Used to format Lua code 'stylua', -- Used to format Lua code
'cpplint',
'clangd', 'clangd',
'clang-format', 'clang-format',
'codelldb', 'codelldb',

View File

@ -2,6 +2,16 @@ return {
'akinsho/toggleterm.nvim', 'akinsho/toggleterm.nvim',
version = '*', version = '*',
config = true, config = true,
init = function()
local opts = { buffer = 0 }
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts)
vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], opts)
vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd j<CR>]], opts)
vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]], opts)
vim.keymap.set('t', '<C-l>', [[<Cmd>wincmd l<CR>]], opts)
vim.keymap.set('t', '<C-w>', [[<C-\><C-n><C-w>]], opts)
end,
keys = { keys = {
{ {
'<leader>to', '<leader>to',
@ -10,7 +20,8 @@ return {
}, },
{ {
'<A-i>', '<A-i>',
'<Cmd>ToggleTermToggle<CR>', '<Cmd>ToggleTerm<CR>',
mode = { 'n', 't' },
}, },
{ {
'<leader>tt', '<leader>tt',

View File

@ -90,6 +90,6 @@ return {
-- Install golang specific config -- Install golang specific config
require('dap-go').setup() require('dap-go').setup()
require('dap-python').setup() require('dap-python').setup '~/.config/nvim/.venv/bin/python'
end, end,
} }

View File

@ -6,13 +6,10 @@ return {
config = function() config = function()
local lint = require 'lint' local lint = require 'lint'
lint.linters_by_ft = { lint.linters_by_ft = {
markdown = { 'markdownlint' },
python = { 'mypy', 'ruff' }, python = { 'mypy', 'ruff' },
yaml = { 'yamllint' },
cmake = { 'cmakelint' }, cmake = { 'cmakelint' },
cpp = { 'cppcheck' }, cpp = { 'cppcheck' },
c = { 'cppcheck' }, c = { 'cppcheck' },
json = { 'jsonlint' },
javascript = { 'eslint' }, javascript = { 'eslint' },
css = { 'stylelint' }, css = { 'stylelint' },
html = { 'tidy' }, html = { 'tidy' },

View File

@ -13,6 +13,7 @@ return {
keys = { keys = {
{ '<C-e>', ':Neotree toggle<CR>', { desc = 'NeoTree toggle' } }, { '<C-e>', ':Neotree toggle<CR>', { desc = 'NeoTree toggle' } },
{ '<leader>e', ':Neotree reveal<CR>', mode = '', desc = '[E]xplore files' }, { '<leader>e', ':Neotree reveal<CR>', mode = '', desc = '[E]xplore files' },
{ '<leader>E', ':Neotree buffers<CR>', mode = '', desc = '[E]xplore buffers' },
}, },
opts = { opts = {
filesystem = { filesystem = {

View File

@ -5,7 +5,7 @@ python3 -m venv .venv
.venv/bin/pip install debugpy .venv/bin/pip install debugpy
# Install dependencies # Install dependencies
PKGS=("clang" "cmake" "npm") PKGS=("cppcheck" "clang" "cmake" "npm")
# Get distro # Get distro
distro=$(cat /etc/os-release | grep PRETTY_NAME= | awk '{print $1}' | cut -d \" -f 2) distro=$(cat /etc/os-release | grep PRETTY_NAME= | awk '{print $1}' | cut -d \" -f 2)