goneovim integration

This commit is contained in:
2024-05-25 14:11:57 +01:00
parent 713a652492
commit 27e1adad33
4 changed files with 116 additions and 2 deletions

3
goneovim.toml Normal file
View File

@@ -0,0 +1,3 @@
[Editor]
FontFamily = "CommitMono Nerd Font"
FontSize = 14

View File

@@ -95,6 +95,10 @@ function setup_plugins()
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
autotag = {
enable = true,
},
})
require("auto-dark-mode").setup({
@@ -257,6 +261,7 @@ function setup_plugins()
extensions = {},
})
local util = require("formatter.util")
require("formatter").setup({
filetype = {
javascript = {
@@ -274,11 +279,40 @@ function setup_plugins()
json = {
require("formatter.filetypes.json").biome,
},
css = {
require("formatter.filetypes.css").prettier,
},
astro = {
function()
return {
exe = "prettier",
args = {
"--stdin-filepath",
util.escape_path(util.get_current_buffer_file_path()),
"--parser",
"astro",
},
stdin = true,
try_node_modules = true,
}
end,
},
lua = { require("formatter.filetypes.lua").stylua },
cpp = { require("formatter.filetypes.cpp").clangformat },
dart = { require("formatter.filetypes.dart").dartformat },
python = { require("formatter.filetypes.python").black },
go = { require("formatter.filetypes.go").goimports },
sql = {
function()
return {
exe = "sqlfmt",
args = {
"-",
},
stdin = true,
}
end,
},
},
})
@@ -442,7 +476,6 @@ function config_vim()
end
PLUGINS = {
{ "EdenEast/nightfox.nvim" },
{ "catppuccin/nvim", name = "catppuccin", priority = 1000 },
{ "shortcuts/no-neck-pain.nvim" },
{ "nvim-tree/nvim-web-devicons" },
@@ -506,9 +539,12 @@ PLUGINS = {
event = "InsertEnter",
config = true,
},
{ "windwp/nvim-ts-autotag" },
}
init_lazy_nvim()
setup_plugins()
define_keymaps()
config_vim()
vim.cmd("source ~/dotfiles/nvim/macmap.vim")

View File

@@ -14,13 +14,13 @@
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"nightfox.nvim": { "branch": "main", "commit": "df75a6a94910ae47854341d6b5a6fd483192c0eb" },
"no-neck-pain.nvim": { "branch": "main", "commit": "34625be12649666b7ccb08761087cc97bb788552" },
"nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" },
"nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" },
"nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" },
"nvim-tree.lua": { "branch": "master", "commit": "347e1eb35264677f66a79466bb5e3d111968e12c" },
"nvim-treesitter": { "branch": "master", "commit": "cbf9090a4c715fa9eb38be71062bf19194b45bd2" },
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
"nvim-web-devicons": { "branch": "master", "commit": "794bba734ec95eaff9bb82fbd112473be2087283" },
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },

75
nvim/macmap.vim Normal file
View File

@@ -0,0 +1,75 @@
" System gvimrc file for Mac OS X
" Author: Benji Fisher <benji@member.AMS.org>
" Last Change: Thu Mar 09 09:00 AM 2006 EST
"
" Define Mac-standard keyboard shortcuts.
" We don't change 'cpoptions' here, because it would not be set properly when
" a .vimrc file is found later. Thus don't use line continuation and use
" <special> in mappings.
nnoremap <special> <D-n> :confirm enew<CR>
vmap <special> <D-n> <Esc><D-n>gv
imap <special> <D-n> <C-O><D-n>
cmap <special> <D-n> <C-C><D-n>
omap <special> <D-n> <Esc><D-n>
nnoremap <special> <D-o> :browse confirm e<CR>
vmap <special> <D-o> <Esc><D-o>gv
imap <special> <D-o> <C-O><D-o>
cmap <special> <D-o> <C-C><D-o>
omap <special> <D-o> <Esc><D-o>
nnoremap <silent> <special> <D-w> :if winheight(2) < 0 <Bar> confirm enew <Bar> else <Bar> confirm close <Bar> endif<CR>
vmap <special> <D-w> <Esc><D-w>gv
imap <special> <D-w> <C-O><D-w>
cmap <special> <D-w> <C-C><D-w>
omap <special> <D-w> <Esc><D-w>
nnoremap <silent> <special> <D-s> :if expand("%") == ""<Bar>browse confirm w<Bar> else<Bar>confirm w<Bar>endif<CR>
vmap <special> <D-s> <Esc><D-s>gv
imap <special> <D-s> <C-O><D-s>
cmap <special> <D-s> <C-C><D-s>
omap <special> <D-s> <Esc><D-s>
nnoremap <special> <D-S-s> :browse confirm saveas<CR>
vmap <special> <D-S-s> <Esc><D-s>gv
imap <special> <D-S-s> <C-O><D-s>
cmap <special> <D-S-s> <C-C><D-s>
omap <special> <D-S-s> <Esc><D-s>
" From the Edit menu of SimpleText:
nnoremap <special> <D-z> u
vmap <special> <D-z> <Esc><D-z>gv
imap <special> <D-z> <C-O><D-z>
cmap <special> <D-z> <C-C><D-z>
omap <special> <D-z> <Esc><D-z>
vnoremap <special> <D-x> "+x
vnoremap <special> <D-c> "+y
cnoremap <special> <D-c> <C-Y>
nnoremap <special> <D-v> "+gP
cnoremap <special> <D-v> <C-R>+
execute 'vnoremap <script> <special> <D-v>' paste#paste_cmd['v']
execute 'inoremap <script> <special> <D-v>' paste#paste_cmd['i']
nnoremap <silent> <special> <D-a> :if &slm != ""<Bar>exe ":norm gggH<C-O>G"<Bar> else<Bar>exe ":norm ggVG"<Bar>endif<CR>
vmap <special> <D-a> <Esc><D-a>
imap <special> <D-a> <Esc><D-a>
cmap <special> <D-a> <C-C><D-a>
omap <special> <D-a> <Esc><D-a>
nnoremap <special> <D-f> /
vmap <special> <D-f> <Esc><D-f>
imap <special> <D-f> <Esc><D-f>
cmap <special> <D-f> <C-C><D-f>
omap <special> <D-f> <Esc><D-f>
nnoremap <special> <D-g> n
vmap <special> <D-g> <Esc><D-g>
imap <special> <D-g> <C-O><D-g>
cmap <special> <D-g> <C-C><D-g>
omap <special> <D-g> <Esc><D-g>