Compare commits
4 Commits
212ce3d301
...
f230ae7a11
Author | SHA1 | Date | |
---|---|---|---|
f230ae7a11 | |||
d59ba5dd0e | |||
a8e0ec4b3b | |||
902912b0b8 |
12
after/ftplugin/gdscript.lua
Normal file
12
after/ftplugin/gdscript.lua
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
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.lsp.start({
|
||||||
|
name = "Godot",
|
||||||
|
cmd = cmd,
|
||||||
|
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,
|
||||||
|
})
|
@ -12,11 +12,6 @@ sign_define({ name = "DiagnosticSignWarn", text = "W" })
|
|||||||
sign_define({ name = "DiagnosticSignHint", text = "H" })
|
sign_define({ name = "DiagnosticSignHint", text = "H" })
|
||||||
sign_define({ name = "DiagnosticSignInfo", text = "I" })
|
sign_define({ name = "DiagnosticSignInfo", text = "I" })
|
||||||
|
|
||||||
-- enable diagnostics virtual text
|
|
||||||
vim.diagnostic.config({
|
|
||||||
virtual_text = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- diagnostic's aren't lsp dependent
|
-- diagnostic's aren't lsp dependent
|
||||||
vim.keymap.set("n", "<leader>vd", function()
|
vim.keymap.set("n", "<leader>vd", function()
|
||||||
vim.diagnostic.open_float()
|
vim.diagnostic.open_float()
|
||||||
@ -28,10 +23,14 @@ vim.keymap.set("n", "]d", function()
|
|||||||
vim.diagnostic.goto_prev()
|
vim.diagnostic.goto_prev()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- lsp related bindings
|
-- lsp capabilites enabler
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
desc = "LSP Actions",
|
desc = "LSP Actions",
|
||||||
callback = function(event)
|
callback = function(event)
|
||||||
|
-- Enable omnifunc
|
||||||
|
vim.bo[event.buf].omnifunc = "v:lua.MiniCompletion.completefunc_lsp"
|
||||||
|
|
||||||
|
-- Buffer local mappings
|
||||||
local opts = { buffer = event.buf }
|
local opts = { buffer = event.buf }
|
||||||
vim.keymap.set("n", "K", function()
|
vim.keymap.set("n", "K", function()
|
||||||
vim.lsp.buf.hover()
|
vim.lsp.buf.hover()
|
||||||
@ -77,6 +76,7 @@ require("lspconfig").hls.setup({})
|
|||||||
require("mini.completion").setup({
|
require("mini.completion").setup({
|
||||||
lsp_completion = {
|
lsp_completion = {
|
||||||
source_func = "omnifunc",
|
source_func = "omnifunc",
|
||||||
|
auto_setup = false,
|
||||||
},
|
},
|
||||||
fallback_action = "<C-x><C-n>",
|
fallback_action = "<C-x><C-n>",
|
||||||
})
|
})
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
require("telescope").setup({
|
||||||
|
extensions = {
|
||||||
|
["ui-select"] = {
|
||||||
|
require("telescope.themes").get_dropdown({}),
|
||||||
|
},
|
||||||
|
["fzf"] = {
|
||||||
|
fuzzy = true,
|
||||||
|
override_generic_sorter = true,
|
||||||
|
override_file_sorter = true,
|
||||||
|
case_mode = "smart_case",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
local builtin = require("telescope.builtin")
|
local builtin = require("telescope.builtin")
|
||||||
vim.keymap.set("n", "<leader>pf", builtin.find_files, { desc = "Find files" })
|
vim.keymap.set("n", "<leader>pf", builtin.find_files, { desc = "Find files" })
|
||||||
vim.keymap.set("n", "<C-p>", "<cmd>Telescope git_files<cr>", { desc = "Find git files" })
|
vim.keymap.set("n", "<C-p>", "<cmd>Telescope git_files<cr>", { desc = "Find git files" })
|
||||||
@ -5,3 +19,6 @@ vim.keymap.set("n", "<leader>ps", function()
|
|||||||
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
||||||
end, { desc = "Find string" })
|
end, { desc = "Find string" })
|
||||||
vim.keymap.set("n", "<leader>vh", builtin.help_tags, { desc = "Find help tags" })
|
vim.keymap.set("n", "<leader>vh", builtin.help_tags, { desc = "Find help tags" })
|
||||||
|
|
||||||
|
require("telescope").load_extension("ui-select")
|
||||||
|
require("telescope").load_extension("fzf")
|
||||||
|
@ -15,9 +15,17 @@ vim.opt.rtp:prepend(lazypath)
|
|||||||
-- plugins installation and configuration
|
-- plugins installation and configuration
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
-- LSP Support
|
-- LSP Support
|
||||||
{ "neovim/nvim-lspconfig" },
|
"neovim/nvim-lspconfig",
|
||||||
{ "williamboman/mason.nvim" },
|
-- lsp download manager
|
||||||
{ "williamboman/mason-lspconfig.nvim" },
|
"williamboman/mason.nvim",
|
||||||
|
-- automatic lsp setup
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
-- additional formater support
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
-- additional linter support
|
||||||
|
"mfussenegger/nvim-lint",
|
||||||
|
-- mason autoinstaller for formatter's and linter's
|
||||||
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
|
|
||||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
@ -45,9 +53,13 @@ require("lazy").setup({
|
|||||||
-- Fuzzy Finder (files, lsp, etc)
|
-- Fuzzy Finder (files, lsp, etc)
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
lazy = true,
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-telescope/telescope-ui-select.nvim",
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
build = "make",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -74,23 +86,6 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"stevearc/dressing.nvim",
|
|
||||||
opts = {
|
|
||||||
input = { default_prompt = "➤ " },
|
|
||||||
select = { backend = { "telescope", "builtin" } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- additional formater support
|
|
||||||
"stevearc/conform.nvim",
|
|
||||||
|
|
||||||
-- additional linter support
|
|
||||||
"mfussenegger/nvim-lint",
|
|
||||||
|
|
||||||
-- mason autoinstaller for formatter's and linter's
|
|
||||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
|
||||||
|
|
||||||
-- Trying out writting plugins
|
-- Trying out writting plugins
|
||||||
{ dir = "~/repos/neovim/plugins/md-tools.nvim" },
|
{ dir = "~/repos/neovim/plugins/md-tools.nvim" },
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user