Last active
November 24, 2023 12:11
-
-
Save c3rb3ru5d3d53c/43abe4f8d1afbbd6f57cdfacb9fd60f0 to your computer and use it in GitHub Desktop.
NeoVIM Config
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
--[[ | |
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