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
-- 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, {})
-- 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)
local c = code[vim.bo.filetype]
if(c) then c.run() end
end)
+