summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorBiser Stoilov <[email protected]>2021-03-30 09:17:40 +0300
committerGitHub <[email protected]>2021-03-30 02:17:40 -0400
commit5f22c1bace8b5e77d33d4a8cf5ebe6c1a763f0d8 (patch)
treef411690f41faaf55185bfdbd887a13a4456d12c9 /lua
parent48286254b7761da2f85bd7bd361188cb448139b5 (diff)
Define shell + php lsp + dart lsp + flutter + relative number (#188)
Diffstat (limited to 'lua')
-rw-r--r--lua/lsp/dart-ls.lua11
-rw-r--r--lua/lsp/php-ls.lua4
-rw-r--r--lua/nv-floaterm/init.lua1
-rw-r--r--lua/nv-globals.lua6
-rw-r--r--lua/plugins.lua3
-rw-r--r--lua/settings.lua1
6 files changed, 25 insertions, 1 deletions
diff --git a/lua/lsp/dart-ls.lua b/lua/lsp/dart-ls.lua
new file mode 100644
index 00000000..99f41311
--- /dev/null
+++ b/lua/lsp/dart-ls.lua
@@ -0,0 +1,11 @@
+require'lspconfig'.dartls.setup{
+ cmd = { "dart", O.dart.sdk_path, "--lsp" },
+ on_attach = require'lsp'.common_on_attach,
+ init_options = {
+ closingLabels = false,
+ flutterOutline = false,
+ onlyAnalyzeProjectsWithOpenFiles = false,
+ outline = false,
+ suggestFromUnimportedLibraries = true
+ }
+} \ No newline at end of file
diff --git a/lua/lsp/php-ls.lua b/lua/lsp/php-ls.lua
new file mode 100644
index 00000000..abc90092
--- /dev/null
+++ b/lua/lsp/php-ls.lua
@@ -0,0 +1,4 @@
+require'lspconfig'.intelephense.setup {
+ cmd = { DATA_PATH .. "/lspinstall/php/node_modules/.bin/intelephense", "--stdio" },
+ on_attach = require'lsp'.common_on_attach
+} \ No newline at end of file
diff --git a/lua/nv-floaterm/init.lua b/lua/nv-floaterm/init.lua
index 633df350..b8ecbd40 100644
--- a/lua/nv-floaterm/init.lua
+++ b/lua/nv-floaterm/init.lua
@@ -6,6 +6,7 @@ vim.g.floaterm_keymap_new = '<F4>'
vim.g.floaterm_title=''
vim.g.floaterm_gitcommit='floaterm'
+vim.g.floaterm_shell=O.shell
vim.g.floaterm_autoinsert=1
vim.g.floaterm_width=0.8
vim.g.floaterm_height=0.8
diff --git a/lua/nv-globals.lua b/lua/nv-globals.lua
index 845eccbd..62af193d 100644
--- a/lua/nv-globals.lua
+++ b/lua/nv-globals.lua
@@ -2,6 +2,8 @@ O = {
auto_close_tree = 0,
auto_complete = true,
colorscheme = 'nvcode',
+ relative_number = true,
+ shell = "bash",
python = {
linter = '',
-- @usage can be 'yapf', 'black'
@@ -10,7 +12,9 @@ O = {
isort = false,
diagnostics = {virtual_text = true, signs = true, underline = true}
},
-
+ dart = {
+ sdk_path = '/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot'
+ },
lua = {
-- @usage can be 'lua-format'
formatter = '',
diff --git a/lua/plugins.lua b/lua/plugins.lua
index 06cad5b4..84ce1920 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -87,6 +87,9 @@ return require('packer').startup(function(use)
-- use 'gennaro-tedesco/nvim-jqx'
-- use 'turbio/bracey.vim'
+ -- Flutter
+ use 'thosakwe/vim-flutter'
+
-- Registers
-- use 'gennaro-tedesco/nvim-peekup'
diff --git a/lua/settings.lua b/lua/settings.lua
index 40fc24d4..db0178cf 100644
--- a/lua/settings.lua
+++ b/lua/settings.lua
@@ -19,6 +19,7 @@ vim.cmd('set sw=4') -- Change the number of space characters inserted for indent
vim.bo.expandtab = true -- Converts tabs to spaces
vim.bo.smartindent = true -- Makes indenting smart
vim.wo.number = true -- set numbered lines
+vim.wo.relativenumber = O.relative_number -- set relative number
vim.wo.cursorline = true -- Enable highlighting of the current line
vim.o.showtabline = 2 -- Always show tabs
vim.o.showmode = false -- We don't need to see things like -- INSERT -- anymore