mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-21 11:14:42 +02:00
Define shell + php lsp + dart lsp + flutter + relative number (#188)
This commit is contained in:
parent
48286254b7
commit
5f22c1bace
7 changed files with 27 additions and 1 deletions
2
init.lua
2
init.lua
|
@ -45,6 +45,8 @@ vim.cmd('source ~/.config/nvim/vimscript/functions.vim')
|
|||
-- LSP
|
||||
require('lsp')
|
||||
require('lsp.clangd')
|
||||
require('lsp.php-ls')
|
||||
require('lsp.dart-ls')
|
||||
require('lsp.lua-ls')
|
||||
require('lsp.bash-ls')
|
||||
require('lsp.go-ls')
|
||||
|
|
11
lua/lsp/dart-ls.lua
Normal file
11
lua/lsp/dart-ls.lua
Normal file
|
@ -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
|
||||
}
|
||||
}
|
4
lua/lsp/php-ls.lua
Normal file
4
lua/lsp/php-ls.lua
Normal file
|
@ -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
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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 = '',
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue