]> localhost Git - nvim.git/commitdiff
feat: open neovide instance
authorJansen <[email protected]>
Wed, 6 Nov 2024 14:13:53 +0000 (10:13 -0400)
committerJansen <[email protected]>
Wed, 6 Nov 2024 14:14:46 +0000 (10:14 -0400)
init.lua

index d0b33a03c8b8ef430cabdba0a4e0372f43e5bf66..8731e1bff3a6982de6b6cd418648f8a4a4cdf0a3 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -167,6 +167,7 @@ require("lazy").setup({
       for i in pairs(automatic) do
         lspconfig[automatic[i]].setup { on_attach = lsp_keymaps_on_attach }
       end
+      lspconfig['dartls'].setup { on_attach = lsp_keymaps_on_attach }
 
       -- Manual setup
       vim.g.zig_fmt_autosave = 0
@@ -200,7 +201,6 @@ require("lazy").setup({
 
 -- CustomCommands ==============================================================
 local function edit_config()
-  vim.cmd [[cd ~/.config/nvim]]
   vim.cmd [[e ~/.config/nvim/init.lua]]
 end
 vim.api.nvim_create_user_command('Econfig', edit_config, {})
@@ -208,6 +208,13 @@ vim.api.nvim_create_user_command('Econfig', edit_config, {})
 -- KeyBindings =================================================================
 vim.g.mapleader = vim.keycode' '
 
+-- Neovide
+if vim.g.neovide then
+  vim.keymap.set('n', '<leader>ni', function()
+    vim.system({"neovide"}, {detach = true})
+  end)
+end
+
 -- Utils
 vim.keymap.set('n', '<leader>H', function() vim.cmd [[nohl]] end)
 vim.keymap.set('n', '<leader>`', function() vim.cmd [[Neogit]] end)
@@ -338,3 +345,4 @@ vim.keymap.set('n', '<leader>xr', function()
   local c = code[vim.bo.filetype]
   if(c) then c.run() end
 end)
+