mirror of
https://github.com/nvim-lua/kickstart.nvim.git
synced 2025-08-17 00:01:18 +02:00
Adds window resizing keymaps and Monokai theme
Implements keymaps for window resizing and maximizing, providing more flexibility in window management. Also, includes Monokai theme with classic palette as a user option. Adds cpp to ensure_installed languages for treesitter. Add C LSP in Mason Plugin Added after folder to make sure comment string isn't altered by other plugins
This commit is contained in:
parent
53a4625326
commit
5153613b3b
3 changed files with 51 additions and 16 deletions
19
ftplugin/c.lua
Normal file
19
ftplugin/c.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
-- local set = vim.opt_local
|
||||
|
||||
-- Define a custom command ':intmain' that inserts int main() {} template
|
||||
vim.api.nvim_create_user_command('IntMain', function()
|
||||
local current_line = vim.api.nvim_win_get_cursor(0)[1]
|
||||
local lines = {
|
||||
'#include <stdio.h>',
|
||||
'',
|
||||
'int main ()',
|
||||
'{',
|
||||
' ',
|
||||
' printf();',
|
||||
' return 0;',
|
||||
'}',
|
||||
}
|
||||
vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, lines)
|
||||
-- Position cursor inside the function body
|
||||
vim.api.nvim_win_set_cursor(0, { current_line + 1, 4 })
|
||||
end, {})
|
Loading…
Add table
Add a link
Reference in a new issue