Updated things, following TJ Devries advent of Neovim.
This commit is contained in:
parent
61417e64f5
commit
2c749ac329
5 changed files with 36 additions and 18 deletions
|
|
@ -2,13 +2,13 @@ local port = os.getenv('GDScript_Port') or '6005'
|
|||
local cmd = vim.lsp.rpc.connect('127.0.0.1', port)
|
||||
local pipe = '/tmp/godot.pipe'
|
||||
|
||||
vim.print("Hello, World from gdscript")
|
||||
|
||||
vim.lsp.start({
|
||||
name = 'Godot',
|
||||
cmd = cmd,
|
||||
root_dir = vim.fs.dirname(vim.fs.find({ 'project.godot', '.git' }, { upaward = true })[1]),
|
||||
root_dir = vim.fs.dirname(vim.fs.find({ 'project.godot', '.git' }, { upward = true })[1]),
|
||||
on_attach = function(client, bufnr)
|
||||
vim.api.nvim_command('echo serverstart("' .. pipe .. '")')
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
3
after/ftplugin/lua.lua
Normal file
3
after/ftplugin/lua.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
local set = vim.opt_local
|
||||
|
||||
set.shiftwidth = 2
|
||||
29
init.lua
29
init.lua
|
|
@ -1,19 +1,15 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require("config.lazy")
|
||||
|
||||
require("lazy").setup("plugins")
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"pylsp",
|
||||
"clangd",
|
||||
"gopls",
|
||||
-- "dcm",
|
||||
"ols",
|
||||
},
|
||||
})
|
||||
|
||||
-- My user settings:
|
||||
vim.opt.number = true
|
||||
|
|
@ -27,9 +23,14 @@ vim.opt.foldenable = false
|
|||
vim.cmd([[colorscheme everforest]])
|
||||
|
||||
-- My custom keybinds
|
||||
-- vim.keymap.set("n", "<space><space>x", "<cmd>source %<CR>") -- Can't do this with lazy.nvim apparently
|
||||
vim.keymap.set("n", "<space>x", ":.lua<CR>")
|
||||
vim.keymap.set("v", "<space>x", ":lua<CR>")
|
||||
vim.api.nvim_set_keymap('t', '<ESC>', [[<C-\><C-n>]], {noremap = true})
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.pylsp.setup{}
|
||||
lspconfig.clangd.setup{}
|
||||
lspconfig.gopls.setup{}
|
||||
--lspconfig.dcm.setup{}
|
||||
lspconfig.ols.setup{}
|
||||
|
|
|
|||
14
lua/config/lazy.lua
Normal file
14
lua/config/lazy.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup("plugins")
|
||||
|
|
@ -5,7 +5,7 @@ return {{
|
|||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc", "python", "html", "gdscript", "odin" },
|
||||
ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc", "python", "html", "gdscript", "odin" , "dart"},
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true, }, --disable = { "gdscript"} },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue