Skip to content

Instantly share code, notes, and snippets.

@c3rb3ru5d3d53c
Last active November 24, 2023 12:11
Show Gist options
  • Save c3rb3ru5d3d53c/43abe4f8d1afbbd6f57cdfacb9fd60f0 to your computer and use it in GitHub Desktop.
Save c3rb3ru5d3d53c/43abe4f8d1afbbd6f57cdfacb9fd60f0 to your computer and use it in GitHub Desktop.
NeoVIM Config
--[[
NeoVIM NVChad Configuration Setup
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt update
sudo apt install -y neovim clangd python-is-python3 python3-pip
sudo pip install pyright
git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1
curl https://gist.github.com/c3rb3ru5d3d53c/init.lua >> ~/.config/nvim/init.lua
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/DroidSansMono.zip
unzip DroidSansMono.zip -d ~/.fonts/
fc-cache -fv
nvim
]]--
-- Key Bindings
vim.api.nvim_set_keymap('i', 'jk', '<Esc>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', 'U', ':redo<CR>', { noremap = true, silent = true })
-- Set Default Terminal
require("nvterm").setup({
terminals = {
shell = '/usr/bin/fish',
list = {},
type_opts = {
float = {
relative = 'editor',
row = 0.3,
col = 0.25,
width = 0.5,
height = 0.4,
border = "single",
},
horizontal = { location = "rightbelow", split_ratio = .3, },
vertical = { location = "rightbelow", split_ratio = .5 },
}
},
behavior = {
autoclose_on_quit = {
enabled = false,
confirm = true,
},
close_on_exit = true,
auto_insert = true,
},
})
-- LLM
require('gen').model = 'mistral:latest'
require'nvim-treesitter.configs'.setup {
ensure_installed = {
"c",
"lua",
"vim",
"vimdoc",
"query",
"javascript",
"markdown",
"python",
"rust",
"go"
},
sync_install = false,
auto_install = true,
highlight = {
enable = true,
}
}
-- Language Servers
require'lspconfig'.clangd.setup({
cmd = {"clangd", "--background-index"},
filetypes = {"c", "cpp", "h", "hpp"}
})
require'lspconfig'.pyright.setup({
cmd = { 'pyright-langserver', '--stdio' },
filetypes = { 'python' },
settings = {
python = {
analysis = {
typeCheckingMode = "off",
signatureHelp = true,
includeSnippets = true,
functionDocumentation = true,
},
},
}
})
require 'lsp_signature'.setup({
bind = true,
hint_enable = true,
hint_prefix = '',
handler_opts = {
border = 'rounded'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment